Showing results for 
Search instead for 
Did you mean: 

USB Superspeed Peripherals

New Contributor II

Hello, guys!

I hope this message finds you well!

We have a custom board with FX3 USB SuperSpeed controller on it. We clock it with external 19.2MHz clock and use it in USB Boot mode (PMODE[2:0] = F11). Also, there is a JTAG connector on the board where we connect J-Link Base Segger debugger. We are using latest J-Link drivers (J-Link GDB Server V6.60d).

Eclipse-based EZ-USB Suite (version 1.3.4) is used as firmware development environment for FX3. Our firmware starting point is AN75779 with multi-thread ThreadX RTOS.

I followed instructions from EzUsbSuite_UG.pdf document on how to set-up Eclipse project and debug it via JTAG.

However, when I resume debugging right after initial breakpoint here is what I get:

Reading 64 bytes @ address 0x10001FC0

Reading 72 bytes @ address 0x00000000

Reading 72 bytes @ address 0x00000000

Reading 72 bytes @ address 0x400061C8

Starting target CPU...

ERROR: Bad JTAG communication: Write to IR: Expected 0x1, got 0x0 (TAP Command : 2) @ Off 0x5.

According to some threads from this forum (link), this error occurs with the FX3 family during JTAG debugging using the Segger J-Link. This is due to change in FX3 CPU frequency during runtime. This is also suggested on the page 20 of the Cypress ES-USB FX3 SDK release note document. I tried what they suggest (adding some commands to the Startup tab of Debug Configurations) but with no success!

Some other threads (e.g. here) suggest setting breakpoints at application define function (CyFxApplicationDefine()) as well as UVCAppThread_Entry() function. Although it is not quite clear how to debug after setting above breakpoints, I tried to debug with Step Over (F6) button. After successfully pressing a button a few times I get again the same above error!

Am I missing something here?

Some threads (e.g. this) say it is complicated to debug AN75779 firmware due to the presence of multi-thread RTOS. Is that true?

Is there any known issue with debugging FX3 via Segger J-Link? From this thread on Segger forum (March 2019), it seems that the CYUSB3014 is currently not officially supported.

Also, to the best of my understanding, default debugging interface in AN75779 example is UART interface that is initialized with CyU3PDebugInit() function. After that, CyU3PDebugPrint () function is used to print debug messages. I did not touch that part thinking that UART and JTAG can co-exist together. Is that assumption correct or I need to initialize JTAG interface somehow in my code and disable UART? AFAIK, JTAG debugging interface is not initialized in AN75779.

Is there any counterpart of the CyU3PDebugPrint () function that will allow me to print debug messages in JTAG mode?

Thank you very much, guys, for your time and efforts. It is really appreciated!



1 Solution

Hello Bojan,

Can you check debugging the firmware after disabling CyU3PSysEnterSuspendMode mode API. It is working fine at my end(with SDK 1.3.4.

also let me know the SDK version you are using.

You can put the breakpoints in for {} loop and check. which parameters are you trying to debug.




View solution in original post

12 Replies