How the existing DMA channel be used to send debug messages?
Any block of FX3, typically UART, can be used to send debug messages. But, if additional DMA channel cannot be allotted for debug messages, the existing DMA channel itself can be used for the debug messages. The CyU3PDmaChannelSetupSendBuffer() API facilitates this. This API overrides the producer socket used in the DMA channel, and the user-defined buffer can be sent to the consumer socket.
The UsbUart firmware, (SendDebugMessage() function block), from the FX3 SDK has been modified to implement this (SendDebugMessage() function block) and is available with this knowledge base article.
- The DMA channel must be in the CONFIGURED state before the CyU3PDmaChannelSetupSendBuffer()API is invoked. The DMA channel can be put into this state by issuing the CyU3PDmaChannelReset() API; note that this API discards the data that is already present in the channel.
- The CyU3PDmaChannelSetXfer()