cancel
Showing results for 
Search instead for 
Did you mean: 

Microphones_Streaming example in X-CUBE-MEMSMIC1 resulting in hard fault

NRaj.1
Associate

I am using a X-NUCLEO-CCA02M2 shield with the Nucleo F401RE board. When I try to run the Microphones_streaming example in mono mode, decimation factor set to 48 (by changing the PDM_Clock_Freq to 768), for any sampling rate, the PDM_Filter function throws a hard fault. Any idea why this is happening?

Thanks,

Nithin

1 REPLY 1
SimonePradolini
ST Employee

Hi @NRaj.1 ,

Minimum PDM_Clock_Freq supported value is 1280, that's why the PDM function is not working. If you set a PDM clock lower than 1280KHz, microphones mounted on X-NUCLEO-CCA02M2 are not granted to working properly anymore.

Why are you manually changing the decimation factor? In general, all the files contained in Drivers or Middlewares folders (i.e.: cca02m2_audio files) must not be modified.

In Microphones_streaming application you must simply update AUDIO_IN_CHANNELS and AUDIO_IN_SAMPLING_FREQUENCY macros in cca02m2_conf.h file. No other modifications are needed in the code.

Be aware that X-NUCLEO-CCA02M2 natively supports stereo streaming. To move from stereo to mono (so, to switch off one microphone) some hw configurations are needed. Please refer to the User Manual (link) for the full setup.

 

Let me know if the issue still persists or it is solved.

Best regards

Simone

In order 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.