dsp_audio_demo_bm#
Overview#
The audio baremetal demo demonstrates audio processing using DSP core. It uses the DMIC working with I2S. One channel Audio data is converted to samples in the DMIC module. Then, the data is placed into the memory buffer. Last, it is sent to the I2S buffer and output to the CODEC, where the audio data will be heard from lineout.
This example cannot be imported into Config Tools because the xtensa toolchain is not supported.
Supported Boards#
EVK-MIMXRT595
Hardware requirements
Micro USB cable
JTAG/SWD debugger
EVK-MIMXRT595 board sch rev C and higher
Personal Computer
Headphones with 3.5 mm stereo jack
Board settings
Note: The I3C Pin configuration in pin_mux.c is verified for default 1.8V, for 3.3V, need to manually configure slew rate to slow mode for I3C-SCL/SDA.
To enable the example audio using WM8904 codec, connect jumpers as follows: The 1-2 connected for JP7, JP8, JP27, JP28, JP29.
Prepare the Demo
Connect headphones to Audio HP / Line-Out connector (J4).
Connect a micro USB cable between the PC host and the debug USB port (J40) on the board
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program for CM33 core to the target board.
Launch the debugger in your IDE to begin running the demo.
If building debug configuration, download the program for DSP core to the target board.
If building debug configuration, launch the Xtensa IDE or xt-gdb debugger to begin running the demo.
Notes
DSP image can only be debugged using J-Link debugger. See ‘Getting Started with Xplorer for EVK-MIMXRT595.pdf’ for more information.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed:
Configure WM8904 codec
Configure I2S
This example transfers data from DMIC to Codec. Connect headphone/earphone on “line-out” of the board. Speak into the DMIC or play audio near the DMIC (U121), and you will hear sound on the left channel of headphone/earphone.
EVK-MIMXRT685
Hardware requirements
Micro USB cable
JTAG/SWD debugger
EVK-MIMXRT685 board
Personal Computer
Headphones with 3.5 mm stereo jack
Board settings
To enable the example audio using WM8904 codec, connect jumpers as follows:
JP7-1 <–> JP7-2
JP8-1 <–> JP8-2
Prepare the Demo
Connect headphones to Audio HP / Line-Out connector (J4).
Connect a micro USB cable between the PC host and the debug USB port (J5) on the board
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program for CM33 core to the target board.
Launch the debugger in your IDE to begin running the demo.
If building debug configuration, download the program for DSP core to the target board.
If building debug configuration, launch the Xtensa IDE or xt-gdb debugger to begin running the demo.
Notes
DSP image can only be debugged using J-Link debugger. See ‘Getting Started with Xplorer for EVK-MIMXRT685.pdf’ for more information.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed:
Configure WM8904 codec
Configure I2S
This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board. Speak into the DMIC or play audio near the DMIC (U41), and you will hear sound on the left channel of headphone/earphone.
MIMXRT685-AUD-EVK
Hardware requirements
Micro USB cable
JTAG/SWD debugger
MIMXRT685-AUD-EVK board
Personal Computer
Headphones with 3.5 mm stereo jack
Board settings
Set the hardware jumpers (Tower system/base module) to default settings.
Set the hardware jumpers JP2 2-3, JP44 1-2 and JP45 1-2.
Prepare the Demo
Connect headphones to Audio HP / Line-Out connector (J4).
Connect a micro USB cable between the PC host and the debug USB port (J5) on the board
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program for CM33 core to the target board.
Launch the debugger in your IDE to begin running the demo.
If building debug configuration, download the program for DSP core to the target board.
If building debug configuration, launch the Xtensa IDE or xt-gdb debugger to begin running the demo.
Notes
DSP image can only be debugged using J-Link debugger. See ‘Getting Started with Xplorer for MIMXRT685-AUD-EVK.pdf’ for more information.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
Configure WM8904 codec
Configure I2S
This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board. Speak into the DMIC or play audio near the DMIC (U40), and you will hear sound on the left channel of headphone/earphone.
MIMXRT700-EVK
Hardware requirements
Micro USB cable
JTAG/SWD debugger
MIMXRT700-EVK board
Personal Computer
Headphones with 3.5 mm stereo jack
Board settings
Prepare the Demo
Connect headphones to Audio HP / Line-Out connector (J29).
Connect a micro USB cable between the PC host and the debug USB port (J54) on the board
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program for CM33 core to the target board.
Launch the debugger in your IDE to begin running the demo.
If building debug configuration, download the program for DSP core to the target board.
If building debug configuration, launch the Xtensa IDE or xt-gdb debugger to begin running the demo.
NOTE: DSP image can only be debugged using J-Link debugger. See ‘Getting Started with Xplorer for MIMXRT700-EVK.pdf’ for more information.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
[CM33 Main] Audio demo started. Initialize pins and codec on core ‘Cortex-M33’ [CM33 Main] Configure codec [CM33 Main] Pins and codec initialized. [DSP Main] DSP starts on core ‘rt700_hifi4_RI23_11_nlib’ [DSP Main] PDM->DMA->SAI->CODEC running
This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board. Speak into the DMIC or play audio near the DMIC (U66), and you will hear sound on the left channel of headphone/earphone.
FRDM-IMXRT700
Hardware requirements
Type-C USB cable
J-Link debugger for DSP debug configurations
FRDM-IMXRT700 board
Personal Computer
Headphones with 3.5 mm stereo jack
Board settings
Prepare the Demo
Connect headphones to the headphone jack on the board.
Connect a USB cable between the PC host and the MCU-LINK USB port (J54) on the board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Download the program for CM33 core to the target board.
Launch the debugger in your IDE to begin running the demo.
If building debug configuration, download the program for DSP core to the target board.
If building debug configuration, launch the Xtensa IDE or xt-gdb debugger to begin running the demo.
NOTE: DSP image can only be debugged using J-Link debugger. See the RT700 Xtensa debugger setup documentation for more information.
Running the demo
The following lines are printed to the serial terminal when the demo program is executed.
[CM33 Main] Audio demo started. Initialize pins and codec on core ‘Cortex-M33’ [CM33 Main] Configure codec [CM33 Main] Pins and codec initialized. [DSP Main] DSP starts on core ‘rt700_hifi4_RI23_11_nlib’ [DSP Main] PDM->DMA->SAI->CODEC running
This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board. Speak into the DMIC or play audio near the DMIC (U66), and you will hear sound on the left channel of headphone/earphone.