DEVELOPMENT OF EMBEDDED SYSTEM FOR REAL-TIME AUDIO ACQUISITION AND PROCESSING BASED ON STM32 MICROCONTROLLER

2024;
: 177-187
Received: November 03, 2024
Revised: November 20, 2024
Accepted: November 25, 2024
1
Lviv Polytechnic National University, Lviv, Ukraine
2
Bialystok University of Technology, Poland
3
Lviv Polytechnic National University
4
Lviv Polytechnic National University
5
Lviv Polytechnic National University

In the paper, the embedded system for real-time acquisition and processing audio data has been developed using the STM32F407G-DISC1 Discovery kit with the STM32F407VGT6 ARM Cortex-M4 32-bit MCU. The basic modules of the STM32F4DISCOVERY kit are used for its operation. The STM32F407VGT6 MCU I2S2 peripheral module has been configured in half-duplex master mode to acquire PDM data from the MP45DT02 microphone. The STM32 USB peripheral module is configured in host mode and the MSC protocol is implemented for transmitting and receiving audio data to/from USB flash drive. The I2S3 peripheral module of the STM32F407VGT6 MCU is configured in master transmitter mode for transmitting audio data to the CS43L22 DAC. The I2S2 DMA of the STM32F407VGT6 MCU is used to transfer data from the microphone to the RAM buffer, which significantly relieves the CPU. The user buttons on the STM32F407G-DISC1 board are used for application control (playback or recording). The real-time audio acquisition and processing software for STM32 MCU has been developed in C using the BSP audio driver and PDM2PCM library.

  1. Electronic resource UM1472 User manual. Discovery kit with STM32F407VG MCU. [Access mode]: https://www.st.com/resource/en/user_manual/um1472-discovery-kit-with-stm32f407vg-mcu-stmicroelectronics.pdf.
  2. Electronic resource AN5027. Interfacing PDM digital microphones using STM32 MCUs and MPUs. [Access mode]: https://www.st.com/resource/en/application­_note/an5027-interfacing-pdm-digital-microphones-using-stm32-mcus-and-mpus-stmicroelectronics.pdf.
  3. Електронний ресурс AN3997. Audio playback and recording using the STM32F4DISCOVERY. [Access mode]: https://www.st.com/resource­/en/application_note/an3997-audio-playback-and-recording-using-the-stm32f4­discovery-stmicroelectronics.pdf.
  4. Electronic resource AN3998. PDM audio software decoding on STM32 microcontrollers. [Access mode]: https://www.st.com/resource/­en/application_note/an3998-pdm-audio-software-decoding-on-stm32-microcontrollers-stmicroelectronics.pdf.
  5. Carmine Noviello. Mastering STM32 – 2nd Edition. A step-by-step guide to the most complete ARM Cortex-M platform, using the official STM32Cube development environment, Lean Publishing, 2018, p. 852.