dmic_i2s_dma#
Overview#
Demonstrates the DMIC working with I2S. One or Stereo channel Audio data is converted to samples in the DMIC module. Then, the data is placed into the memory buffer. Last, it is send to the I2S buffer and sent to the CODEC, then the audio data will be output to Lineout of CODEC.
## Supported Boards
````{container} board-selector
```{container} board-setup
:name: board-evkmimxrt595
##### EVK-MIMXRT595
##### Hardware requirements
- Micro USB cable
- EVK-MIMXRT595 boards
- Personal Computer
- headphones with 3.5 mm stereo jack
##### Board settings
To make example work, connections needed to be as follows:
1.The 1-2 connected for JP7, JP8, JP27, JP28, JP29.
2.Please make sure R781 is weld and R782 is switched to 1A side.
##### Prepare the Demo
1. Connect headphones to Audio HP / Line-Out connector (J4).
2. Connect a micro USB cable between the PC host and the CMSIS DAP USB port on the board
3. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Download the program to the target board.
5. Launch the debugger in your IDE to begin running the demo.
##### Running the demo
Note: As the EVK-MIMXRT595 support two on board DMIC, so the demo provide a macro DEMO_DMIC_NUMS to control the counts of the DMIC to be used, such as
#define DEMO_DMIC_NUMS 2U /* two dmic enabled */
If the macro not defined by application, then only one codec will be enabled by default.
1. Launch the debugger in your IDE to begin running the demo.
The following lines are printed to the serial terminal when the demo program is executed.
Configure codec
Configure I2S
2. This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board.
Speak on DMIC or play song nearby the dmic (U120 and U121), you can hear sound on the left/right channel of headphone/earphone.
```
```{container} board-setup
:name: board-evkmimxrt685
##### EVK-MIMXRT685
##### Hardware requirements
- Micro USB cable
- EVK-MIMXRT685 boards
- Personal Computer
- headphones with 3.5 mm stereo jack
##### Board settings
To make example work, connections needed to be as follows:
JP7-1 <--> JP7-2
JP8-1 <--> JP8-2
##### Prepare the Demo
1. Connect headphones to Audio HP / Line-Out connector (J4).
2. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board
3. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Download the program to the target board.
5. Launch the debugger in your IDE to begin running the demo.
##### Running the demo
Note: As the EVK-MIMXRT685 support two on board codec, so the demo provide a macro DEMO_DMIC_NUMS to control the counts of the DMIC to be used, such as
#define DEMO_DMIC_NUMS 2U /* two dmic enabled */
If the macro not defined by application, then only one codec will be enabled by default.
1. Launch the debugger in your IDE to begin running the demo.
The following lines are printed to the serial terminal when the demo program is executed.
Configure codec
Configure I2S
2. This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board.
Speak on DMIC or play song nearby the dmic (U40, U41), you can hear sound on the left/right channel of headphone/earphone.
```
```{container} board-setup
:name: board-lpcxpresso54628
##### LPCXpresso54628
##### Hardware requirements
- Micro USB cable
- LPCXpresso54628 board
- Personal Computer
- Earphone/headset
##### Board settings
No special board setting.
##### Prepare the Demo
This demo was written on a LPCXpresso 54628 board, PCB rev A
1. Connect a micro USB cable between the host PC and the LPC-Link USB port (J8) on the target board.
2. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
3. Download the program to the target board.
##### Running the demo
1. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
The following lines are printed to the serial terminal when the demo program is executed.
Configure codec
Configure I2S
2. This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board.
Speak on DMIC or play song nearby the dmic, you can hear sound on the left channel of headphone/earphone.
```
```{container} board-setup
:name: board-lpcxpresso55s36
##### LPCXpresso55S36
##### Hardware requirements
- Micro USB cable
- LPCXpresso55S36 boards
- Personal Computer
- headphones with 3.5 mm stereo jack
##### Board settings
Short JP50 1-2,JP53 1-2
Remove resistor between BH20 and BH21, Short BH19 and BH20.
Remove resistor between BH23 and BH24, Short BH22 and BH23.
##### Prepare the Demo
1. Connect headphones to Audio HP / Line-Out connector (J6).
2. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J1) on the board
3. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Download the program to the target board.
5. Launch the debugger in your IDE to begin running the demo.
##### Running the demo
1. Launch the debugger in your IDE to begin running the demo.
The following lines are printed to the serial terminal when the demo program is executed.
Configure codec
Configure I2S
2. This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board.
Speak on DMIC or play song nearby the dmic (U30), you can hear sound on the left channel of headphone/earphone.
```
```{container} board-setup
:name: board-mimxrt685audevk
##### MIMXRT685-AUD-EVK
##### Hardware requirements
- Micro USB cable
- MIMXRT685-AUD-EVK boards
- Personal Computer
- headphones with 3.5 mm stereo jack
##### Board settings
Connect JP44 1-2,JP45 1-2
##### Prepare the Demo
1. Connect headphones to J4.
2. Connect a micro USB cable between the PC host and the CMSIS DAP USB port (J5) on the board
3. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Download the program to the target board.
5. Launch the debugger in your IDE to begin running the demo.
##### Running the demo
Note: As the MIMXRT685-AUD-EVK support one on board codec, so you cannot use macro DEMO_DMIC_NUMS to control the counts of the DMIC
This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board.
Speak on DMIC or play song nearby the dmic (U40), you can hear sound from headphone/earphone.
The log below shows example output of the I2S driver demo in the terminal window:
Configure codec Configure I2S
```
```{container} board-setup
:name: board-rdrw612bga
##### RD-RW612-BGA
##### Hardware requirements
- Micro USB cable
- RD-RW612-BGA board
- Personal Computer
- headphones with 3.5 mm stereo jack
##### Board settings
Connect JP50, JP51; Disconnect JP9, JP11
##### Prepare the Demo
1. Connect headphones to Audio HP connector (J4).
2. Connect a micro USB cable between the PC host and the MCU-Link USB port (J7) on the board
3. Open a serial terminal with the following settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Download the program to the target board.
5. Launch the debugger in your IDE to begin running the demo.
##### Running the demo
Note: As the RD-RW612-BGA support two on board dmic, so the demo provide a macro DEMO_DMIC_NUMS to control the counts of the DMIC to be used, such as
#define DEMO_DMIC_NUMS 2U /* two dmic enabled */
If the macro not defined by application, then only one dmic will be enabled by default.
1. Launch the debugger in your IDE to begin running the demo.
The following lines are printed to the serial terminal when the demo program is executed.
Configure codec
Configure I2S
2. This example transfers data from DMIC to Codec. Connect headphone/earphone on audio out of the board.
Speak on DMIC or play song nearby the dmic (U1, U44), you can hear sound on the left/right channel of headphone/earphone.
```
````