2024-10-25 11:58 AM
Hello,
I'm trying to do a quick test with the STM32F412G-Discovery kit and the analogue microphone input.
I use this example https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM32F412G-Discovery/Examples/BSP
with the menu #### AUDIO REC ANALOG ####.
The problem is that the firmware crashes at the line BSP_AUDIO_IN_Record(internal_buffer, AUDIO_BLOCK_SIZE);
void AudioRecAnalog_demo (void)
{
AudioRec_SetHint();
/* Initialize Audio Recorder */
if (BSP_AUDIO_IN_InitEx(INPUT_DEVICE_ANALOG_MIC, DEFAULT_AUDIO_IN_FREQ, DEFAULT_AUDIO_IN_BIT_RESOLUTION, DEFAULT_AUDIO_IN_CHANNEL_NBR) == AUDIO_OK)
{
BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
BSP_LCD_SetTextColor(LCD_COLOR_GREEN);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize() - 95, (uint8_t *)" AUDIO RECORD INIT OK ", CENTER_MODE);
}
else
{
BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
BSP_LCD_SetTextColor(LCD_COLOR_RED);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize() - 95, (uint8_t *)" AUDIO RECORD INIT FAIL", CENTER_MODE);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize() - 80, (uint8_t *)" Try to reset board ", CENTER_MODE);
}
audio_rec_buffer_state = BUFFER_OFFSET_NONE;
/* Display the state on the screen */
BSP_LCD_SetBackColor(LCD_COLOR_WHITE);
BSP_LCD_SetTextColor(LCD_COLOR_BLUE);
BSP_LCD_DisplayStringAt(0, BSP_LCD_GetYSize() - 80, (uint8_t *)" RECORDING... ", CENTER_MODE);
/* Start Recording */ crash here
BSP_AUDIO_IN_Record(internal_buffer, AUDIO_BLOCK_SIZE);
/* Wait end of one block recording */
while((audio_rec_buffer_state & BUFFER_OFFSET_FULL) != BUFFER_OFFSET_FULL);
/* Stop recorder */
BSP_AUDIO_IN_Stop();
Does anyone have an idea?
2024-11-05 05:20 AM
Hello,
Internal ticket 195718 for follow up and confirmation of the issue / fix if there is one ..
2024-11-18 06:04 AM - edited 2024-11-18 06:04 AM
FYI,
Behavior reproduced internally. Analysis is ongoing.