Hello,
I try to use interrupt endpoints IN to send data and debug messages to the host. After several tries I was able to receive some messages with Control Center. During my unsuccessful tests I discover several thing by using the following setup:
- FX3 application = USBDebug example from Cypress homepage
- Cypress Control Center as host software to poll interrupt endpoint
- as hardware I used the Cypress FX3 Development Board and my one FX3 design.
- to debug my software and I use Cypress SDK with a J-Link debugger
As result I made following observations:
As mentioned before I like to transmit debug messages through an interrupt endpoint IN, so I can not guarantee there is a host application polling and my application hang when I started testing my new feature. After several hours in investigating return codes, DMA objects and other stuff I found following post "About DMA transfer in slave FIFO", which helped me.
Disabling FX3 automatic power management by calling CyU3PUsbLPMDisable () and removing CyU3PDebugLog () or CyU3PDebugPrint () function call. This means using CyU3PDebugLog () and CyU3PDebugPrint () in the same application result in problems.
With this modifications USBDebug application is running without problems. Polling data with Control Center is still failing after some reads.
So there are some questions left where I did not found an answer or have no idea how to go ahead:
Thanks for your help!
Frank
1) So far we haven't tried using or heard anyone using DebugLog along with DebugPrint. But I hope there should be no issues in this.
2) No. But may be LPM could be a problem here
3) Power management does not block the Application. Only the data transfer would fail. Calling LPMDisable should fix this
4) To know how exactly they differ, please refer the Source code along with the SDK package.
5) i suspect the LPM.
6) 997 is a Microsoft defined error code meaning "Overlapped i/o operation in progress". Here it simply means that the transfer has timed out because of unavailability of data.
Regards,
-Madhu Sudhan