Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

DSP/BIOS 5.42 debugging task load on C5535

$
0
0
Hello,
I have created a DSP/BIOS 5.42.0.7 application in CCSv5.3 project for ezDSP5535 USB kit. I have basically 2 tasks, apart from the main initialization task that is finalized at the beginning of execution: 
1. An Audio task based on the C55 Audio Framework that synchronizes using semaphores with the audio codec I2S Tx interrupt (HWI8) and Rx DMA (based on ddc i2s bios driver)
The Audio task reads audio samples at 16kHz  using a 2x64 ping-pong buffer, adds a long delay effect and then, writes the resulting samples in another 2x64  ping-pong buffer.
2. An MMCSD task that writes and reads buffers of 256 samples from SD card. To store the delayed samples, since large buffers are not supported by memory provided on ezDSP5535, I am trying to use the SD card.
I have adapted CSL_MMCSD_dmaExample to write and read chunks of 256 samples (since SD card buffer size is 512bytes)
The MMCSD task executes once for every 4 loops of Audio task. After four Audio task loops, 4x64=256 samples just read from audio codec are written into SD card. At the same time 4x64 = 256 delayed samples are read from SD card and stored into a DelayBuffer in memory.
Semaphores are used to synchronize Audio task and MMCSD task.
The first disappointment is that it seems that SD card does not seem to offer enough bandwidth to work at 48kHz, so I had to switch to 16kHz, though CPU load is around 20. Even though sometimes I observe TX FIFO UNDERFLOWS: the Tx interrupt arrives but their corresponding samples have not been prepared yet.
But the most serious issue I am facing is that during the first minute of execution there are many UNDERFLOWS, CPU load is 85 or more, KNL_swi average load is 2,700 and Idle_busyObj is 14,000. But after a minute of execution, when CPU time is around 70, the CPU load diminishes drastically to around 20, and the load of the previous tasks is inverted, KNL_swi is around 13,000 and Idle_busyObj is around 2,700.
Why is this? What I am doing wrong? How can identify what tasks are running? Is there a way to list task code execution order? I find the debugging options quite limited for C5535. I have not been able to make Thread Log to work.
I have added LOG_printf traces, STS functions, and even added THRLOAD to be able to obtain task loads, but it doesn't help. 

Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>