AnsweredAssumed Answered

STM32F4-Discovery EVAL_AUDIO_PLAY() I2S works from flash, but not from SRAM

Question asked by jtoomim on Mar 13, 2014
Latest reply on Mar 13, 2014 by waclawek.jan
I'm testing the Audio_playback_and_record example program in MEDIA_intFLASH mode, using Keil µVision 5.1. I've noticed that the program works fine (plays music) as it is written, but if I change the declaration of AUDIO_SAMPLE from const uint16_t AUDIO_SAMPLE[] to uint16_t AUDIO_SAMPLE[] (not const), then all that plays is static. Similarly, if I try to use EVAL_AUDIO_PLAY(...) in another project on any non-const audio buffers that I create, it results in static being played. I suspect this might be due to const causing the compiler to leave the data in flash, and something in the DMA code not working properly with SRAM, but I don't know what it could be.

The project build options do not have the 64K CCM enabled, so I doubt this is the issue.

Can anyone replicate this issue? Is it Keil-only? Any ideas on what might be causing it or how to fix it?


Outcomes