sai#
Overview#
The SAI Demo application demonstrates complicated digital audio playback and record case. The demo provide these features below:
Duplex audio transfer, record and playback at same time.
Playback a 250 Hz sine wave data generated by CMSIS-DSP library. Also compute the fundamental frequency using Fast Fourier Transform with CMSIS-DSP library. If the board support sdcard, then the case can demo an extra items 3.Record to SDcard, then playback it
Supported Boards#
EVKB-IMXRT1050
Hardware requirements
Mini/micro USB cable
EVKB-IMXRT1050 board
Personal Computer
Headphone(OMTP standard)
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target 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 to the target board.
Insert the headphones into the headphone jack on EVKB-IMXRT1050 board (J12).
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
Note: This demo uses both headphone mic and board main mic(P1) as input source. The headphone mic provides left channel data, and main mic (P1) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo: Please note that the log print out may be different according to the different card, If the card doesn’t been formatted ,the case will making new file system and below log will be printed,
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
If the card is formatted already, the case will mount the file system only, the case will print below log,
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
MIMXRT1060-EVKB
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKB board
Personal Computer
Headphone(OMTP standard)
SD card
CS42448 Audio board(Not necessary if use on board codec)
Board settings
Make sure resistors R368/R347/R349/R365/R363 are removed. For Audio board: 1.Insert AUDIO board into J23 if on board codec is not used 2.Uninstall J41 For on board codec: 1.Make sure J41 is installed
Prepare the Demo
Note: As the EVKBMIMXRT1060 support two codecs, a default on board WM8960 codec and another codec CS42448 on audio board, so to support both of the codecs, the example provide options to switch between the two codecs,
DEMO_CODEC_WM8960, set to 1 if wm8960 used
DEMO_CODEC_CS42448, set to 1 if cs42448 used Please do not set above macros to 1 together, as the demo support one codec only.
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert SD card to card slot
Download the program to the target board. Steps for WM8960:
Insert the headphones into the headphone jack on MIMXRT1060-EVKB board (J34). Steps for CS42448:
Insert the headphones into the headphone jack J6 and line in line into J12 on the audio board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the
Running the demo
Note: This demo uses both headphone mic and board main mic(P1) as input source. The headphone mic provides left channel data, and main mic (P1) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo:
Please note that the log print out may be different according to the different card, If the card doesn’t been formatted ,the case will making new file system and below log will be printed,
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
If the card is formatted already, the case will mount the file system only, the case will print below log,
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
MIMXRT1170-EVKB
Hardware requirements
Mini/micro USB cable
MIMXRT1170-EVKB board
Personal Computer
Headphone(OMTP standard)
SD card
Board settings
Ensure the resistors mounted below: R2001,R2002,R2003,R2004,R2005,R2006 and R2007.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert SD card to card slot
Download the program to the target board.
Insert the headphones into the headphone jack on MIMXRT1170-EVKB board (J101).
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
Note: This demo uses both headphone mic and board main mic(P2) as input source. The headphone mic provides left channel data, and main mic (P2) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo:
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
MIMXRT1060-EVKC
Hardware requirements
Mini/micro USB cable
MIMXRT1060-EVKC board
Personal Computer
Headphone(OMTP standard)
SD card
CS42448 Audio board(Not necessary if use on board codec)
Board settings
For Audio board: 1.Insert AUDIO board into J23 if on board codec is not used 2.Uninstall J41 For on board codec: 1.Make sure J41 is installed
Prepare the Demo
Note: As the EVKCMIMXRT1060 support two codecs, a default on board WM8962 codec and another codec CS42448 on audio board, so to support both of the codecs, the example provide options to switch between the two codecs,
DEMO_CODEC_WM8962, set to 1 if wm8962 used
DEMO_CODEC_CS42448, set to 1 if cs42448 used Please do not set above macros to 1 together, as the demo support one codec only.
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert SD card to card slot
Download the program to the target board. Steps for WM8962:
Insert the headphones into the headphone jack on MIMXRT1060-EVKC board (J101). Steps for CS42448:
Insert the headphones into the headphone jack J6 and line in line into J12 on the audio board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the
Running the demo
Note: This demo uses both headphone mic and board main mic(P1) as input source. The headphone mic provides left channel data, and main mic (P1) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo:
Please note that the log print out may be different according to the different card, If the card doesn’t been formatted ,the case will making new file system and below log will be printed,
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
If the card is formatted already, the case will mount the file system only, the case will print below log,
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
FRDM-IMXRT1152
Hardware requirements
Type-C USB cable
FRDM-IMXRT1152 board
Personal Computer
Headphone(OMTP standard)
SD card
Board settings
Remove R183, R131, R151, R177, R124.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert SD card to card slot
Download the program to the target board.
Insert the headphones into the headphone jack on FRDM-IMXRT1152 board (J30).
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
Note: This demo uses both headphone mic and board main mic(P2) as input source. The headphone mic provides left channel data, and main mic (P2) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo:
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
EVK-MIMXRT1010
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1010 board
Personal Computer
Headphone
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target 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 to the target board.
Insert the headphones into the headphone jack on EVK-MIMXRT1010 board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
This following section shows how to run the demo: Notice, on EVK-MIMXRT1010 board, the audio record source is from two microphones. The left channel is from the headphone microphone, the right channel from the main microphone on board. It is OK for you to choose one of them or both. As the headphone microphone may have headphone standard differernt issue, you can just use main microphone on board as input source.
SAI Demo started!
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Quit
Known issue: If pressing SW9 to rerun the demo frequently, it may cause booting from QSPI nor flash failed, since the SA1 RXD0 pin is muxed as boot configurations pin. Workaround: To use SW3 instead of SW9.
Note: To debug in qspiflash, following steps are needed:
Select the flash target and compile.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J41.
Start debugging in IDE.
Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.
EVK-MIMXRT1015
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1015 board
Personal Computer
Headphone
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target 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 to the target board.
Insert the headphones into the headphone jack on EVK-MIMXRT1015 board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
This following section shows how to run the demo: Notice, on EVK-MIMXRT1015 board, the audio record source is from two microphones. The left channel is from the headphone microphone, the right channel from the main microphone on board. It is OK for you to choose one of them or both. As the headphone microphone may have headphone standard differernt issue, you can just use main microphone on board as input source.
SAI Demo started!
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Quit
Known issue: If pressing SW9 to rerun the demo frequently, it may cause booting from QSPI nor flash failed, since the SA1 RXD0 pin is muxed as boot configurations pin. Workaround: To use SW3 instead of SW9.
Note: To debug in qspiflash, following steps are needed:
Select the flash target and compile.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J41.
Start debugging in IDE.
Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.
EVK-MIMXRT1020
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1020 board
Personal Computer
Headphone
Board settings
Please insert the SDCARD into card slot(J15), make sure C28 is welded.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target 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 to the target board.
Insert the headphones into the headphone jack on EVK-MIMXRT1020 board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
This following section shows how to run the demo: Notice, on EVK-MIMXRT1020 board, the audio record source is from two microphones. The left channel is from the headphone microphone, the right channel from the main microphone on board. It is OK for you to choose one of them or both. As the headphone microphone may have headphone standard differernt issue, you can just use main microphone on board as input source.
Please note that the log print out may be different according to the different card, If the card doesn’t been formatted ,the case will making new file system and below log will be printed,
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
If the card is formatted already, the case will mount the file system only, the case will print below log,
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
Note: To debug in qspiflash, following steps are needed:
Select the flash target and compile.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.
Start debugging in IDE.
Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.
MIMXRT1024-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1024-EVK board
Personal Computer
Headphone
Board settings
Please insert the SDCARD into card slot(J15), make sure C28 is welded.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target 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 to the target board.
Insert the headphones into the headphone jack on MIMXRT1024-EVK board.
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
This following section shows how to run the demo: Notice, on MIMXRT1024-EVK board, the audio record source is from two microphones. The left channel is from the headphone microphone, the right channel from the main microphone on board. It is OK for you to choose one of them or both. As the headphone microphone may have headphone standard differernt issue, you can just use main microphone on board as input source.
Please note that the log print out may be different according to the different card, If the card doesn’t been formatted ,the case will making new file system and below log will be printed,
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
If the card is formatted already, the case will mount the file system only, the case will print below log,
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
Note: To debug in qspiflash, following steps are needed:
Select the flash target and compile.
Set the SW8: 1 off 2 off 3 on 4 off, then power on the board and connect USB cable to J23.
Start debugging in IDE.
Keil: Click “Download (F8)” to program the image to qspiflash first then clicking “Start/Stop Debug Session (Ctrl+F5)” to start debugging.
MIMXRT1040-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1040-EVK board
Personal Computer
Headphone(OMTP standard)
SD card
Board settings
Make sure to remove M.2 Module when inserting the SD card.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert SD card to card slot
Download the program to the target board.
Insert the headphones into the headphone jack on MIMXRT1040-EVK board (J12).
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
Note: This demo uses both headphone mic and board main mic(P1) as input source. The headphone mic provides left channel data, and main mic (P1) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo:
Please note that the log print out may be different according to the different card, If the card doesn’t been formatted ,the case will making new file system and below log will be printed,
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
If the card is formatted already, the case will mount the file system only, the case will print below log,
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
EVK-MIMXRT1064
Hardware requirements
Mini/micro USB cable
EVK-MIMXRT1064 board
Personal Computer
Headphone(OMTP standard)
SD card
Board settings
No special settings are required.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert SD card to card slot
Download the program to the target board.
Insert the headphones into the headphone jack on EVK-MIMXRT1064 board (J12).
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
Note: This demo uses both headphone mic and board main mic(P1) as input source. The headphone mic provides left channel data, and main mic (P1) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo:
Please note that the log print out may be different according to the different card, If the card doesn’t been formatted ,the case will making new file system and below log will be printed,
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
If the card is formatted already, the case will mount the file system only, the case will print below log,
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
MIMXRT1160-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1160-EVK board
Personal Computer
Headphone(OMTP standard)
SD card
Board settings
Please make sure R136 is weld for GPIO card detect.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
Open a serial terminal with the following settings:
115200 baud rate
8 data bits
No parity
One stop bit
No flow control
Insert SD card to card slot
Download the program to the target board.
Insert the headphones into the headphone jack on MIMXRT1160-EVK board (J33).
Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
Note: This demo uses both headphone mic and board main mic(P1) as input source. The headphone mic provides left channel data, and main mic (P1) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). should use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature. This following section shows how to run the demo:
SAI Demo started!
Please insert a card into board.
Card inserted.
Make file system......The time may be long if the card capacity is big.
Create directory......
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
MIMXRT1180-EVK
Hardware requirements
Mini/micro USB cable
MIMXRT1180-EVK board
Personal Computer
Headphone(OMTP standard)
SD card
Board settings
Insert headphone to J101.
Insert SD card to card slot J15.
Prepare the Demo
Connect a USB cable between the host PC and the OpenSDA USB port on the target 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 to the target board.
Press the reset button on your board to begin running the demo.
Note
The CM7 demo is supposed to work with multicore_trigger CM33 demo in this SDK.
Running the demo
When the demo runs successfully, you can hear the sound and the log would be seen on the OpenSDA terminal like:
SAI Demo started!
Please insert a card into board.
Card inserted.
Mount volume Successfully.
Create directory......
Directory exists.
Please choose the option :
1. Record and playback at same time
2. Playback sine wave
3. Record to SDcard, after record playback it
4. Quit
Note:
log “Directory exists.” is optional according to the content in the SD card.
This demo uses both headphone mic and board main mic(P1) as input source. The headphone mic provides left channel data, and main mic (P1) provides right channel data. If users found there is noise while do record operation, most probably it is the headphone standard issue (OMTP and CTIA standard difference). It requires to use the OMTP standard headphone. You can disable the left channel by using an headphone without microphone feature.