I keep on using CyU3PDmaChannelGetStatus() to watch the two UAC dma channel status. And found something abnormal.
CyU3PDebugStringPrint(buffer, USBUART_DMA_BUF_SIZE, "UAC1: %x %x\r\n", state, consXferCount - prodXferCount);
I found that the diffrence between prodXferCount and consXferCount keep on increasing. Normally the diffrence should be keet in a small value, the difffrence between should means that some data didn't be sent out on time and still stay in RAM. but after an hour, the value could be 0x5xxxx, which looks like that is 320K DWORD data stay in RAM. I don't think that the FX3 have so many ram to store them.
2. I use codes below to try send out data
if (consXferCount == prodXferCount)
status = CyU3PDmaChannelGetBuffer(&glUacStreamHandle, &buffer_tx, 0);
status = CyU3PDmaChannelCommitBuffer (&glUacStreamHandle, CY_FX3_ISO_XFER_LEN, 0);
status = CyU3PDmaChannelSetWrapUp (&glUacStreamHandle);
CyU3PDebugStringPrint(buffer, USBUART_DMA_BUF_SIZE, "UAC Buffer: %x %x %x\r\n", status, status, status);
and get status = 0x47, status=0x47. status = 0. Is this means that the DMA channel had lost its buffer?
Besides, when dmachannel hasn't been initialized or had been destroyied, the CyU3PDmaChannelGetStatus() didn't get CY_U3P_DMA_NOT_CONFIGURED status code. sometimes the retune data is not on the list.
Please use Uart Debug logs to check if there is any " Commit Buffer Error". If you are facing commit buffer errors then follow this KBA
Thanks & Regards
I have checked the return value of the CommitBuffer, there is no any errors.
Cause of using CyU3PDmaChannelGetStatus, I noticed that the difference between consXferCount and prodXferCount increasing. I think maybe the issue cause of the bandwidth of the ISOC is not enough. so I modified the DMA buffer size of the two UAC from 192 bytes to 384 bytes. and the other parameters about these.
After two hours running, the difference between consXferCount and prodXferCount keeps in 0.
Looks the issue has been fixed.