cancel
Showing results for 
Search instead for 
Did you mean: 

Noises while playing audio from sd card and lunching leds animations with WS2812b

Zedestrian
Associate II

Hello everyone,

I'm working with stm32l552ce to play audio from an SD card and play some leds animations at the same time.

I'm using RTOS to implement this scenario. I have created 4 tasks :

One task that receives uart command

The second task to refresh the led animations

The third task reads wav files from SD card using SPI with dma

The fourth task play audio using I2S with dma

My theory is that there are some interrupts that keeps messing the audio and delay the led animations but I can't find them.

There only one interrupt besides DMA and uart is systick interrupt

I would really appreciate some insight, thanks in advance

3 REPLIES 3
Simon V.
ST Employee

Hello,

I would approach your issue with the task activity on/off.

I would create fixed buffer (sinus wave for example) to isolate the DMA between SPI and I2S.

In addition, what is the noise signature (pop, burst noise..?)

Regards,

Simon

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Zedestrian
Associate II

Thanks for the reply, much appreciation. To answer your question, the noise signature is a short spurt of scrambled computer noise.

Zed

Simon V.
ST Employee

Ok,

I would debug by step by step to highlight which task is impacting the application.

In addition, is the noise is periodic or continuous, you could change the task timing or the priority to verify any relation

Regards,

Simon

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.