Skip to content

Commit

Permalink
samples: drivers/i2s: Support i2s example for NXP frdm_mcxn947
Browse files Browse the repository at this point in the history
Support i2s example for NXP frdm_mcxn947

Signed-off-by: Qiang Zhang <qiang.zhang_6@nxp.com>
  • Loading branch information
mcuxted authored and kartben committed Jan 17, 2025
1 parent 3a15017 commit 97f4838
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/drivers/i2s/i2s_api/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tests:
- userspace
filter: not CONFIG_I2S_TEST_USE_GPIO_LOOPBACK
platform_exclude:
- frdm_mcxn947/mcxn947/cpu0
- mimxrt595_evk/mimxrt595s/cm33
- mimxrt685_evk/mimxrt685s/cm33
drivers.i2s.gpio_loopback:
Expand All @@ -18,6 +19,7 @@ tests:
filter: CONFIG_I2S_TEST_USE_GPIO_LOOPBACK
harness: ztest
platform_exclude:
- frdm_mcxn947/mcxn947/cpu0
- mimxrt595_evk/mimxrt595s/cm33
- mimxrt685_evk/mimxrt685s/cm33
harness_config:
Expand Down
7 changes: 7 additions & 0 deletions tests/drivers/i2s/i2s_speed/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ signals externally on the EVK. These are the HW changes required to run this te
- Short BCLK J9-pin1 (SAI1_RX_BCLK) to J66-pin1 (SAI4_TX_BCLK)
- Short SYNC J9-pin5 (SAI1_RX_SYNC) to J64-pin1 (SAI4_TX_SYNC)
- Short Data J61-pin1 (SAI1_RX_DATA) to J63-pin1 (SAI4_TX_DATA)

FRDM-MCXN947:
This board uses CONFIG_I2S_TEST_SEPARATE_DEVICES=y and connects two SAI peripherals by shorting
signals externally on the EVK. These are the HW changes required to run this test:
- Short BCLK J1-pin9 (SAI1_RX_BCLK/P3_18) to J3-pin15 (SAI0_TX_BCLK/P2_6)
- Short SYNC J1-pin13 (SAI1_RX_FS/P3_19) to J3-pin13 (SAI0_TX_FS/P2_7)
- Short Data J1-pin15 (SAI1_RXD0/P3_21) to J3-pin7 (SAI0_TXD0/P2_2)
25 changes: 25 additions & 0 deletions tests/drivers/i2s/i2s_speed/boards/frdm_mcxn947_mcxn947_cpu0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Copyright (c) 2024, NXP
#
# SPDX-License-Identifier: Apache-2.0
#

# SAI peripheral does not have loopback mode. Use 2 SAI peripherals connected
# together externally.
CONFIG_I2S_TEST_SEPARATE_DEVICES=y

# CONFIG_DMA_TCD_QUEUE_SIZE sets size of queue used to chain DMA blocks (TCDs)
# together, and should be sized as needed by the application. If not large
# enough, the DMA may starve. Symptoms of this issue include transmit blocks
# repeated, or RX blocks skipped. For I2S driver, queue size must be at least 3.
CONFIG_DMA_TCD_QUEUE_SIZE=4

# Repeat test continually to help find intermittent issues
CONFIG_ZTEST_RETEST_IF_PASSED=y

# I2S and DMA logging can occur in interrupt context, and interfere with I2S
# stream timing. If using either logging, set logging to deferred
# CONFIG_LOG_MODE_DEFERRED=y

CONFIG_DMA_LOG_LEVEL_OFF=y
CONFIG_I2S_LOG_LEVEL_OFF=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* i2s_speed with CONFIG_I2S_TEST_SEPARATE_DEVICES=y uses two I2S peripherals:
* i2s-node0 is the receiver
* i2s-node1 is the transmitter
*/

/ {
aliases {
i2s-node0 = &sai1;
i2s-node1 = &sai0;
};
};

0 comments on commit 97f4838

Please sign in to comment.