cancel
Showing results for 
Search instead for 
Did you mean: 

STM32N6570-DK mic and screen setup

grashnar
Visitor

Hi,

I'm looking for some guidance on configuring the STM32N6570-DK so i can use the screen and onboard mic / headphone out jack.

It looks like everything i need is in stm32n6570_discovery_audio.h and stm32n6570_discovery_lcd.h, and i did manage to get the screen going with some configuration from this repo: https://github.com/jpcano/STM32N6-digits 

When I then try and enable audio the following calls succeed:

void Audio_Setup(void)
{
AudioInit.Device = AUDIO_IN_DEVICE_DIGITAL_MIC;
AudioInit.SampleRate = AUDIO_FREQUENCY_16K;
AudioInit.BitsPerSample = AUDIO_RESOLUTION_16B;
AudioInit.ChannelsNbr = 1;
AudioInit.Volume = 80;

if (BSP_AUDIO_IN_Init(0, &AudioInit) != BSP_ERROR_NONE)
{
Error_Handler();
}

if (BSP_AUDIO_IN_Record(0, AudioBuffer, AUDIO_BUFFER_SIZE) != BSP_ERROR_NONE)
{
Error_Handler();
}
}

after this the transfer callbacks never get hit and any calls to drawing the screen, HAL functions like UART sending or blinking a led also stop working.

I did try the STM32N6570-DK/Examples/MDF/MDF_AudioRecorder (no callbacks received in that) and the se example from https://github.com/STMicroelectronics/STM32N6-GettingStarted-Audio which gave garbled audio.

What steps do I need to take to setup the onboard mic properly?

Thanks

 

0 REPLIES 0