Good day experts,
My setup is as follows:
- C6748 DSP clocked at 456MHz
- DSP/BIOS 5.42.01.09
- BIOSPSP drivers v1.30.01
- CCS 5.4
- EDMA3 LLD v1.11.03.01
- AIC3204 audio codec
I believe we are having some CPU load issues, but I am struggling to properly narrow it down to the culprit. I did some timing measurements, and the first thing that struck me was the execution time of the SIO_reclaim() when getting audio samples from input stream. I configured the codec for a sampling rate of 9600 Hz, but I would occasionally measure that SIO_reclaim() takes up to 150+ ms to complete, much longer that I would expect. Some more information about the audio stream setup:
- The input and output stream are both primed with 8 buffers of 160 bytes, which are allocated from internal RAM are also correctly aligned.
- SIO_reclaim() is called from the task with the highest priority
- Besides the I2C0, McASP and EDMA, the only other peripherals that are significantly used are UART0 (115200 baud) and UART1 (9600 baud).
- I2C0, McASP and EDMA interrupts are through the event combined module on HWIs 7,8,9 and 10
- UART0 and UART1 are configured on HWI 13 and 15 respectively and are only configured for receiver interrupts. UART transmissions occur in normal tasks with lower priorities than the SIO_reclaim() task.
Basically only HWIs and SWIs can pre-empt a SIO_reclaim() call. I know the call is blocking and yields until it receives a full buffer, but that should at most only take a couple of milliseconds, not in the region of 100+ ms! I've configured the UART peripherals only to interrupt when the receiver FIFO reaches 14 bytes (the maximum level), so that it does not interrupt too frequently.
This problem that I've been seeing only occurs when I'm actually using UART1, so I measured the ISR execution times on a scope:
- The execution time is no longer than 2 us (microseconds)
- The frequency of UART1 interrupts is about 2.4 ms
- Bursts of data are periodically received on UART1, which results in interrupts roughly every 2.4 ms for 54 ms
So my question is thus, do you have any idea what can cause SIO_reclaim() to block for so long?
Thanks in advance!
Regards
Reinier