Skip to content

Commit 97f4838

Browse files
mcuxtedkartben
authored andcommitted
samples: drivers/i2s: Support i2s example for NXP frdm_mcxn947
Support i2s example for NXP frdm_mcxn947 Signed-off-by: Qiang Zhang <[email protected]>
1 parent 3a15017 commit 97f4838

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

tests/drivers/i2s/i2s_api/testcase.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ tests:
66
- userspace
77
filter: not CONFIG_I2S_TEST_USE_GPIO_LOOPBACK
88
platform_exclude:
9+
- frdm_mcxn947/mcxn947/cpu0
910
- mimxrt595_evk/mimxrt595s/cm33
1011
- mimxrt685_evk/mimxrt685s/cm33
1112
drivers.i2s.gpio_loopback:
@@ -18,6 +19,7 @@ tests:
1819
filter: CONFIG_I2S_TEST_USE_GPIO_LOOPBACK
1920
harness: ztest
2021
platform_exclude:
22+
- frdm_mcxn947/mcxn947/cpu0
2123
- mimxrt595_evk/mimxrt595s/cm33
2224
- mimxrt685_evk/mimxrt685s/cm33
2325
harness_config:

tests/drivers/i2s/i2s_speed/Readme.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ signals externally on the EVK. These are the HW changes required to run this te
1010
- Short BCLK J9-pin1 (SAI1_RX_BCLK) to J66-pin1 (SAI4_TX_BCLK)
1111
- Short SYNC J9-pin5 (SAI1_RX_SYNC) to J64-pin1 (SAI4_TX_SYNC)
1212
- Short Data J61-pin1 (SAI1_RX_DATA) to J63-pin1 (SAI4_TX_DATA)
13+
14+
FRDM-MCXN947:
15+
This board uses CONFIG_I2S_TEST_SEPARATE_DEVICES=y and connects two SAI peripherals by shorting
16+
signals externally on the EVK. These are the HW changes required to run this test:
17+
- Short BCLK J1-pin9 (SAI1_RX_BCLK/P3_18) to J3-pin15 (SAI0_TX_BCLK/P2_6)
18+
- Short SYNC J1-pin13 (SAI1_RX_FS/P3_19) to J3-pin13 (SAI0_TX_FS/P2_7)
19+
- Short Data J1-pin15 (SAI1_RXD0/P3_21) to J3-pin7 (SAI0_TXD0/P2_2)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#
2+
# Copyright (c) 2024, NXP
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
# SAI peripheral does not have loopback mode. Use 2 SAI peripherals connected
8+
# together externally.
9+
CONFIG_I2S_TEST_SEPARATE_DEVICES=y
10+
11+
# CONFIG_DMA_TCD_QUEUE_SIZE sets size of queue used to chain DMA blocks (TCDs)
12+
# together, and should be sized as needed by the application. If not large
13+
# enough, the DMA may starve. Symptoms of this issue include transmit blocks
14+
# repeated, or RX blocks skipped. For I2S driver, queue size must be at least 3.
15+
CONFIG_DMA_TCD_QUEUE_SIZE=4
16+
17+
# Repeat test continually to help find intermittent issues
18+
CONFIG_ZTEST_RETEST_IF_PASSED=y
19+
20+
# I2S and DMA logging can occur in interrupt context, and interfere with I2S
21+
# stream timing. If using either logging, set logging to deferred
22+
# CONFIG_LOG_MODE_DEFERRED=y
23+
24+
CONFIG_DMA_LOG_LEVEL_OFF=y
25+
CONFIG_I2S_LOG_LEVEL_OFF=y
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* i2s_speed with CONFIG_I2S_TEST_SEPARATE_DEVICES=y uses two I2S peripherals:
2+
* i2s-node0 is the receiver
3+
* i2s-node1 is the transmitter
4+
*/
5+
6+
/ {
7+
aliases {
8+
i2s-node0 = &sai1;
9+
i2s-node1 = &sai0;
10+
};
11+
};

0 commit comments

Comments
 (0)