- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I want to debug the SlaveFifoAsync example with UART. I found the setting process for debugging with JTAG in the programming manual. How could I debug it with UART? Are there some documents about debugging FX3 with UART?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Firmware is enabled to support UART debugging.
You can use " CyU3PDebugPrint" to print messages wherever you want.
Please make sure that your DVK has these jumpers (J101,102,103,104) between 1 and 2.
Regards,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know the UART debugging is supported in the firmware and CyU3PDebugPrint is used to print messages. But I do not know how to set the Debug Configurations. On my DVK, the jumpers (J101, 102, 103, 104) are connected correctly. The UART port is connected to a USB port with a converter. But when I tried to debug, there are always errors (shown in the attached picture). I think I did not set the Debug Configurations in the right way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lehua Chen,
you don't have to do anything with the Eclipse IDE when you are debugging with UART.
Connect the UART cable between your DVK and PC.Open the HyperTerminal in your PC and configure it as follows:
115200 - 8 - None - 1 - None.
It is just that you add the print messages wherever you want in the firmware. And build the .img file and download into the FX3 DVK.
Then you will see the messages getting printed on the HyperTerminal as per the FX3s firmware execution.
Regards,
sai krishna.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your detailed information. I misunderstood the debug process with UART at the beginning. Now it is fine.
Lehua Chen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I debugged the Asynchronous FIFO GPIF with UART. The hardware setting was as before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Lehua Chen,
Below are my answers to your questions.
If you look at the SlaveFifoAsync example source code, DMA buffer for USB to FX3 is configured for 2*1024 Bytes in case of super speed. That is the reason why you are able to do two BULK OUT transfers. If you change the
dmaCfg.count = CY_FX_SLFIFO_DMA_BUF_COUNT; to
dmaCfg.count = 16;
then you can do 16 BULK OUT transfers.
On the other hand if you look at the USBBulkSourceSink example, we are discarding the buffer as soon as we get some data from USB. CyU3PDmaChannelDiscardBuffer is called when there is CY_U3P_DMA_CB_PROD_EVENT. In this case you continuously send the data. But in SlaveFifoAsync example we are not doing this. So number of BULK OUT transfers are limited to dmaCfg.count.
Coming to your next question, regarding BULK IN, again we can correlate both these examples - SlaveFifoAsync and USBBulkSourceSink. In case of SlaveFifoAsync example we are committing the data only when there is a CY_U3P_DMA_CB_PROD_EVENT. That is when GPIF fills the DMA buffer.
Regards,
sai krishna.