Run and Debug DSP Audio Framework
The DSP audio framework demo consists of separate applications that run on the Arm core and DSP core. The Arm application runs a command shell and relays the input requests to the DSP application using RPMsg-Lite.
EVK Board Setup for Audio Demo
The DSP audio demo is tested against EVK-MIMXRT595 and requires the CODEC line out (J4), and UART for serial console.
In order for the CODEC to output audio properly, you must attach two jumpers on the board as follows:
JP7-1 is connected to JP8-2
The demo uses the UART for console input and output. Connect the EVK board to a PC via the USB debug interface (J40) and open up a serial interface on your PC using a terminal tool such as Tera term or PuTTY on Windows or screen on Linux.
Remove Jumpers JP17, JP18, JP19 for SWD to connect to the chip and Serial interface on J40.
DSP debugging is through SWD only, so connect J-Link to SWD interface.
Parent topic:Run and Debug DSP Audio Framework
Debug Audio Demo
To debug this DSP application, first set up, and execute the Arm application using an environment of your choosing (see ‘Getting Started with MCUXpresso SDK for EVK-MIMXRT595.pdf’ for Arm development environment options).
The example that follows uses NXP MCUXpresso IDE for the Arm environment.
Install the MCUXpresso SDK for RT500 into the MCUXpresso IDE using the ‘Installed SDKs’ panel at the bottom:
Use the QuickStart menu on the lower left of the screen to import an example from the installed SDK.
Select the ‘dsp_xaf_record_cm33’ example for Cortex-M33 core.
Select UART in project options after clicking the dsp_xaf_record_cm33 example project.
Select ‘Finish’ to complete the import.
Build the project and launch the debugger on success.
Use the debug toolbar to resume the code execution.
Observe serial terminal output with shell prompt:
****************************** DSP audio framework demo start ****************************** [CM33 Main] Configure WM8904 codec [DSP_Main] Cadence Xtensa Audio Framework [DSP_Main] Library Name : Audio Framework (Hostless) [DSP_Main] Library Version : 3.2 [DSP_Main] API Version : 3.0 [DSP_Main] start [DSP_Main] established RPMsg link [CM33 Main] DSP image copied to DSP TCM [CM33 Main][APP_DSP_IPC_Task] start [CM33 Main][APP_Shell_Task] start Copyright 2022 NXP
In the Xplorer IDE, load and execute
xaf_record
using the procedure described in sections 3.4 and 3.5 of this document.After the DSP application runs, use the serial shell to invoke the
record_dmic [language]
command. For information on supported language, check the VIT ReleaseNotes.txt. Using the serial shell creates an audio pipeline that captures microphone audio, perform voice recognition (VIT), and playback via the codec speaker line out (J4 on the EVK).>> help "help": List all the registered commands "exit": Exit program "version": Query DSP for component versions "record_dmic": Record DMIC audio , perform voice recognition (VIT) and playback on codec USAGE: record_dmic [language]
For voice recognition, say the supported wake-word and in 3 s say the frame-supported command. If selected model contains strings, then the wake-word and list of commands appear in the console.
Note: This command does not return to the shell.
The VIT wake-word and supported commands appear in the serial terminal.
See the readme.txt for jumper settings on the board as shown below.
Parent topic:Run and Debug DSP Audio Framework
Parent topic:Run and Debug DSP Demo using Xplorer IDE