You cannot use the same socket for both DebugInit and DmaChannelCreate. The CyU3PDebugDeInit function must be called before using that socket for some other purpose.
If you want to have both the Debug data and some other data both to be directed to the UART, follow these steps:
1) Create the DMA Channel as for your usual operation that uses the UART socket.
2) Whenever you want to send Debug data through the same socket, call the CyU3PDmaChannelSetupSendBuffer API. This API is used to send a user provided buffer to the consumer of a DMA Channel (in your case, it is the UART). In other words, it overrides the DMA Channel for time being. In the buffer, you can include you Debug Data (usually debug texts sent as bytes in ASCII form)
- Madhu Sudhan