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-MIMXRT685 Rev E and requires UART for serial console.

For the codec to output audio properly, attach one jumper on the board as follows:

JP7-1 <==> JP8-2

Note: DSP operates DMA and audio peripherals same as CM33 side. Jumper settings, I2S configs, or pin mux settings are all same with CM33 side. For information on steps to operate I2S, DMIC and DMA, see the SDK CM33 side driver examples. SDK\boards\evkmimxrt685\driver_examples\i2s;

Note: Jumper settings are different on different version of EVKs or validation boards. The above mentioned setting is for SDK 2.8.0 and Rev E EVK or later only. For old version of boards or SDKs, double check the SDK driver examples for correct settings for the pin mux and jumper settings.

The demo uses the UART for console input and output. Connect the EVK board to a PC via the USB debug interface (J5) and open up a serial interface on your PC using a terminal tool such as PuTTY on Windows or screen on Linux.

Parent topic:Run and Debug DSP Audio Framework

Debug Audio Demo

To debug this DSP application, set up and execute the Arm application in a desired environment. For more information on Arm development environment options, see ‘Getting Started with MCUXpresso SDK for EVK-MIMXRT685.pdf.

The following example uses the NXP MCUXpresso IDE for the Arm environment.

To debug the audio demo, perform the following steps.

  1. Install the MCUXpresso SDK for RT600 into the MCUXpresso IDE using the Installed SDK panel as shown in

    |

|

  1. To import an example from the installed SDK., use the Import SDK examples link in the Quickstart panel on the lower left of the screen.

    |

|

  1. Select the ‘dsp_xaf_record_cm33’ example for Cortex-M33 core.

    |

|

  1. Click the Finish button.

    |

|

  1. Build the project and launch the debugger on success.

    |

|

  1. Use the debug toolbar to resume the code execution.

    |

|

  1. Observe serial terminal output with shell prompt.

    ******************************
    DSP audio framework demo start
    ******************************
    Configure WM8904 codec
    DSP image copied to DSP TCM
    [APP_DSP_IPC_Task] start
    [APP_Shell_Task] start
    Copyright  2022  NXP
    >>
    
  2. Using the Xplorer IDE, load and execute xaf_record using the steps described in Prepare DSP Core for ‘Hello World’.

  3. After the DSP application runs, use the serial shell to invoke the ‘record_dmic [language]’ command.For information on the supported languages, check 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 supported the wake-word and in 3 s say the frame supported command. If selected model contains strings, then the wake-word and the list of commands appears in the console.

    Note: this command does not return to the shell

  4. The serial terminal shows the IPC communications to set up an audio device..

    |

|

The VIT wake-word and supported commands appear in the serial console.

|![](../images/image40.png "VIT wake-word and supported commands")

|

The serial console prints the detected wake-word and commands.

|![](../images/image41.png "Serial console output")

|

For more information on configuration and using the Audio Framework demo, see the file `<SDK_ROOT>\boards\evkmimxrt685\dsp_examples\xaf_record\cm33\readme.txt.`.

For more details about VIT which supports English and Mandarin models, see `<SDK_ROOT>\middleware\vit\HIFI4\Doc\VIT_Integration_Guide.pdf`.

Parent topic:Run and Debug DSP Audio Framework

Parent topic:Run and Debug DSP Demo using Xplorer IDE