Skip to main content
Visitor II
April 15, 2021
Question

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

  • April 15, 2021
  • 3 replies
  • 758 views

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

    This topic has been closed for replies.

    3 replies

    ST Employee
    July 8, 2021

    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

    Visitor II
    July 8, 2021

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

    Zed

    ST Employee
    July 8, 2021

    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