FX3 - Send debug log/prints to USB-UART Bridge (using example)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
ScMu_3165461
Level 1
Level 1

I do not have access to the UART pins on the device, so I am attempting to perform all debugging over the USB connection.

I know there is a `cyfxusbdebug` example, but there isn't any example host (Windows) code or applications which show how to retrieve and parse the log data dumped to the USB endpoint. If someone does know where such an example application is, let me know.

My other thought was to use the USB-UART Bridge example (https://www.cypress.com/documentation/code-examples/ez-usb-fx3-usb-uart-bridge-example ) and dump all of the debug logging to this USB-COM serial port.

However, while I *am* able to connect to the COM port w/ Putty or other serial-port software, I am unable to get any of the `CyU3PDebugPrint()` data to be sent over the port.

I have tried to call `CyU3PDebugInit()` and supply the endport socket ID created for the USB->UART endpoint, like so:

`CyU3PDebugInit(CY_FX_EP_CONSUMER1_SOCKET, 0);`

I also tried `CY_FX_EP_CONSUMER2_SOCKET`, but same thing. No debug data is sent to the UART connection.

How can I get this to work? Is it possible?

I've attached my primary source file for the attempt described above.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

I know there is a `cyfxusbdebug` example, but there isn't any example host (Windows) code or applications which show how to retrieve and parse the log data dumped to the USB endpoint.

>> The device enumerates as vendor-specific device and not CDC device when programmed with cyfxusbdebug example. Data can be retrieved using the control center application/ streamer application.

I have modified the default firmware to make it a CDC device so that it can be accessed through com port software like Tera Term. I am using CyU3PDebugPrint for printing "Cypress " to Serial port through USB

These are the results

tera_term.PNG

My other thought was to use the USB-UART Bridge example (https://www.cypress.com/documentation/code-examples/ez-usb-fx3-usb-uart-bridge-example ) and dump all of the debug logging to this USB-COM serial port.

>> This firmware if for sending data from UARt to USB and USB to UART. If the UART pins are pre occupied the firmware cannot be used directly.

Please see the  attached  UsbDebug firmware and let me know if it helps

Please let me know if any queries on this.

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
1 Reply
lock attach
Attachments are accessible only for community members.
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

I know there is a `cyfxusbdebug` example, but there isn't any example host (Windows) code or applications which show how to retrieve and parse the log data dumped to the USB endpoint.

>> The device enumerates as vendor-specific device and not CDC device when programmed with cyfxusbdebug example. Data can be retrieved using the control center application/ streamer application.

I have modified the default firmware to make it a CDC device so that it can be accessed through com port software like Tera Term. I am using CyU3PDebugPrint for printing "Cypress " to Serial port through USB

These are the results

tera_term.PNG

My other thought was to use the USB-UART Bridge example (https://www.cypress.com/documentation/code-examples/ez-usb-fx3-usb-uart-bridge-example ) and dump all of the debug logging to this USB-COM serial port.

>> This firmware if for sending data from UARt to USB and USB to UART. If the UART pins are pre occupied the firmware cannot be used directly.

Please see the  attached  UsbDebug firmware and let me know if it helps

Please let me know if any queries on this.

Regards,

Rashi

Regards,
Rashi
0 Likes