Skip to content

Commit 2ff20f7

Browse files
committed
[nrf fromlist] tests: drivers: i2s: i2s_speed: Confirm CLK value
Add test which confirms correct clock divider selection. Frame rate selected by the user may not be obtained due to PCLK clock value and finite number of clock divider value. In such case, driver shall select divider that results in frame clock rate closest to the requested value. There was a bug that was discarding perfect match divider. Upstream PR #: TBD Signed-off-by: Sebastian Głąb <[email protected]>
1 parent 6131774 commit 2ff20f7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

tests/drivers/i2s/i2s_speed/testcase.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,33 @@ tests:
2929
fixture: gpio_loopback
3030
extra_args: EXTRA_DTC_OVERLAY_FILE="boards/nrf5340dk_nrf5340_cpuapp_aclk.overlay"
3131
platform_allow: nrf5340dk/nrf5340/cpuapp
32+
drivers.i2s.speed.gpio_loopback.clk_divider:
33+
tags:
34+
- drivers
35+
- i2s
36+
platform_allow:
37+
- nrf52840dk/nrf52840
38+
- nrf5340dk/nrf5340/cpuapp
39+
- nrf54l15dk/nrf54l15/cpuapp
40+
extra_args:
41+
- CONFIG_I2S_LOG_LEVEL_INF=y
42+
harness: console
43+
harness_config:
44+
fixture: gpio_loopback
45+
type: multi_line
46+
ordered: true
47+
regex:
48+
- "transfer_short_08000"
49+
- "I2S MCK frequency: 256000, actual PCM rate: 8000"
50+
- "transfer_short_16000"
51+
- "I2S MCK frequency: 507936, actual PCM rate: 15873"
52+
- "transfer_short_32000"
53+
- "I2S MCK frequency: 1032258, actual PCM rate: 32258"
54+
- "transfer_short_44100"
55+
- "I2S MCK frequency: 1391304, actual PCM rate: 43478"
56+
- "transfer_short_48000"
57+
- "I2S MCK frequency: 1523809, actual PCM rate: 47619"
58+
- "transfer_short_88200"
59+
- "I2S MCK frequency: 2909090, actual PCM rate: 90909"
60+
- "transfer_short_96000"
61+
- "I2S MCK frequency: 3200000, actual PCM rate: 100000"

0 commit comments

Comments
 (0)