7 years, 2 months ago.

Is the clock setup in "DISCO-F746NG_AUDIO_demo" correct?

Hello,

on the first "view" the AUDIO demo seems to work: One can hear the sound from the micros in the headphones. But when I tried to modify the sound samples I found that the clock might not be configured properly:

1. In the central while() loop I've added code to toogle the user led every X loops. This shows that the DMA callback interrupts are invoked much too often. if ((count++) == 20000) { count= 0; led_green= !led_green; } Toggling every 20000 loops and a resulting blink frequency of ca. 1 Hz shows a Codec samplerate of some Mhz (instead of 16khz). This leads to a extremly high processor load for buffer copy calls (memcpy).

2. The call of "SetSysClock_PLL_HSE_200MHz()" has no effect. Mbed already configures the clock System before main() starts. So the PLL already runs the System clock and "HAL_RCC_OscConfig()" cannot change the PLL Parameters.

My question: Are the Audio clock for the Cirrus codec and the SDRAM DMA clock properly configured?

Thanks for your Support in advance.

Be the first to answer this question.