My environment is a custom board with C6746, bios_6_33_02_31, edma3_lld_02_11_04_01 and CCS 5.1. I have an 8kHz framesync rate and 16.384MHz clock rate. I would like to create a loopback application for all 256 timeslots, but I have a problem with multichannel transmit.
I have based my code for transmitting a fixed pattern on the McBSP example enclosed with the BIOSPSP, modified to use external clock and framesync. Single channel 8 bit transmit works fine. Single channel 32-bit transmit also works fine. However, when I change the single-channel 32-bit to interleaved multi-channel 8-bit with 4 channels, I seem to get frequent underruns - at least I think that is what I get, I occasionally see a different pattern in the timeslots when connected to an oscilloscope. The larger buffer I use, the more rarely the underrun appears, but they are still there with 1024 samples per channel. I tried to set NUM_BUFS to 2 instead of 1, but then it seems that the EDMA does not run at all, the pattern is completely static. I removed the Task_sleep(100) between GIO_reclaim and GIO_issue in mcbspStartDemo, this was necessary to make the single-channel version run correctly. Also, I have trouble understanding why Mcbsp_IntMode_ON_SYNCERR is used, but using Mcbsp_IntMode_ON_FSYNC instead makes no difference.
Any advice in debugging this problem would be appreciated, the PSP and EDMA LLD are not easy to look into to find out what is happening.