Skip to content

i2s_mcux_sai: noisy sound with k_mem_slab buffer in external SDRAM #61966

Answered by DerekSnell
blemouzy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @blemouzy ,
When I see issues like this where things work great from internal non-cached TCMs, but not from cached external memory, my initial thoughts are either a performance bottleneck with the external memory, or issues related to cache.

Reading your description, are you managing cache coherency with the DMA? When declaring the buffers like this for SDRAM:

/* Audio buffers */
static char audio_buffers[I2S_BUF_COUNT * AUDIO_FRAME_BUF_SIZE] __aligned(4);

I believe by default that SDRAM is cached. In the i.MX RT1xxx MCU architecture, the caches are for the Cortex-M7 core. Other masters in the system do not access through the cache. Which means when the DMA reads the SDRAM, it may not …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by blemouzy
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@DerekSnell
Comment options

@blemouzy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants