-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: benchmarks: Add stress test for drivers
Create test that will concurrently use drivers for multiple peripherals, such as: - UART (LOG system), - SPI (adxl362 accelerometer), - I2C (bme680 sensor), - ADC, - PWM (LED dimming), - GPIO (LED toggle), - timer (kernel), - counter (timer instance), - CAN (only on nrf54h20, internal loopback mode), - temperature sensor (DIE_TEMP), - flash (external NOR Flash memory; read only), - I2S (only on nrf54l, send in air, read from air), - watchdog, - plus cpu load thread. Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
- Loading branch information
1 parent
84492d6
commit 6809a6f
Showing
24 changed files
with
1,713 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Copyright (c) 2024 Nordic Semiconductor ASA | ||
# | ||
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
# | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE}) | ||
project(periph_stress) | ||
|
||
FILE(GLOB app_sources src/*.c) | ||
target_sources(app PRIVATE ${app_sources}) |
1 change: 1 addition & 0 deletions
1
tests/benchmarks/peripheral_load/boards/nrf54h20dk_nrf54h20_cpuapp.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_NRFS=y |
56 changes: 56 additions & 0 deletions
56
tests/benchmarks/peripheral_load/boards/nrf54h20dk_nrf54h20_cpuapp.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
test-counter = &timer137; | ||
watchdog0 = &wdt010; | ||
}; | ||
|
||
zephyr,user { | ||
io-channels = <&adc 0>, <&adc 1>; | ||
}; | ||
}; | ||
|
||
&adc { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1_2"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 10)>; | ||
zephyr,input-positive = <NRF_SAADC_AIN4>; | ||
zephyr,resolution = <10>; | ||
}; | ||
|
||
channel@1 { | ||
reg = <1>; | ||
zephyr,gain = "ADC_GAIN_2"; | ||
zephyr,reference = "ADC_REF_EXTERNAL0"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 10)>; | ||
zephyr,input-positive = <NRF_SAADC_AIN5>; | ||
zephyr,resolution = <10>; | ||
}; | ||
}; | ||
|
||
&mx25uw63 { | ||
status = "okay"; | ||
}; | ||
|
||
&timer137 { | ||
status = "okay"; | ||
prescaler = <4>; | ||
}; | ||
|
||
temp_sensor: &temp_nrfs { | ||
status = "okay"; | ||
}; | ||
|
||
&wdt010 { | ||
status = "okay"; | ||
}; |
105 changes: 105 additions & 0 deletions
105
tests/benchmarks/peripheral_load/boards/nrf54l15dk_nrf54l15_cpuapp.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
/* | ||
* Copyright (c) 2024 Nordic Semiconductor ASA | ||
* | ||
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause | ||
*/ | ||
|
||
/* Rev. 0.8.1: | ||
* P0.00 - TX_0 | ||
* P0.01 - RX_0 | ||
* P0.02 - RTS_0 | ||
* P0.03 - CTS_0 | ||
* P0.04 - Button_3 | ||
* | ||
* P1.00 - 32k_XTAL1 | ||
* P1.01 - 32k_XTAL2 | ||
* P1.02 - NFC_1 | ||
* P1.03 - NFC_2 | ||
* P1.04 - TX_1 | ||
* P1.05 - RX_1 | ||
* P1.06 - RTS_1 | ||
* P1.07 - CTS_1 | ||
* P1.08 - Button_1 / I2S_SDOUT | ||
* P1.09 - Button_2 / I2S_SDIN | ||
* P1.10 - LED_1 / I2S_LRCK_M | ||
* P1.11 - TWIM_SCL to BME680 + ADC_ch0 | ||
* P1.12 - TWIM_SDA to BME680 + ADC_ch1 | ||
* P1.13 - Button_4 / CS_BME680 | ||
* P1.14 - LED_3 / IRQ / I2S_SCK_M | ||
* | ||
* P2.00 - QSPI | ||
* P2.01 - QSPI | ||
* P2.02 - QSPI | ||
* P2.03 - QSPI | ||
* P2.04 - QSPI | ||
* P2.05 - QSPI | ||
* P2.06 - SPIM_SCK | ||
* P2.07 - LED_2 | ||
* P2.08 - SPIM_MOSI to ADXL362 | ||
* P2.09 - LED_0 / SPIM_MISO to ADXL362 | ||
* P2.10 - CS_ADXL362 | ||
*/ | ||
|
||
/ { | ||
aliases { | ||
i2s-node0 = &i2s20; | ||
test-counter = &timer24; | ||
}; | ||
|
||
zephyr,user { | ||
io-channels = <&adc 0>, <&adc 1>; | ||
}; | ||
}; | ||
|
||
&pinctrl { | ||
i2s20_default_alt: i2s20_default_alt { | ||
group1 { | ||
psels = <NRF_PSEL(I2S_SCK_M, 1, 14)>, | ||
<NRF_PSEL(I2S_LRCK_M, 1, 10)>, | ||
<NRF_PSEL(I2S_SDOUT, 1, 8)>, | ||
<NRF_PSEL(I2S_SDIN, 1, 9)>; | ||
}; | ||
}; | ||
}; | ||
|
||
&adc { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
channel@0 { | ||
reg = <0>; | ||
zephyr,gain = "ADC_GAIN_1"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 10)>; | ||
zephyr,input-positive = <NRF_SAADC_AIN4>; /* P1.11 - I2C SCL on sensor shield */ | ||
zephyr,resolution = <10>; | ||
}; | ||
|
||
channel@1 { | ||
reg = <1>; | ||
zephyr,gain = "ADC_GAIN_1_4"; | ||
zephyr,reference = "ADC_REF_INTERNAL"; | ||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; | ||
zephyr,input-positive = <NRF_SAADC_AIN5>; /* P1.12 - I2C SDA on sensor shield */ | ||
zephyr,resolution = <12>; | ||
}; | ||
}; | ||
|
||
&i2s20 { | ||
status = "okay"; | ||
pinctrl-0 = <&i2s20_default_alt>; | ||
pinctrl-names = "default"; | ||
}; | ||
|
||
&timer24 { | ||
status = "okay"; | ||
prescaler = <4>; | ||
}; | ||
|
||
temp_sensor: &temp { | ||
status = "okay"; | ||
}; | ||
|
||
&wdt31 { | ||
status = "okay"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONFIG_LOG=y | ||
|
||
CONFIG_SENSOR=y | ||
CONFIG_ADC=y | ||
CONFIG_CAN=y | ||
CONFIG_COUNTER=y | ||
CONFIG_FLASH=y | ||
CONFIG_GPIO=y | ||
CONFIG_I2S=y | ||
CONFIG_PWM=y | ||
CONFIG_WATCHDOG=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
sample: | ||
name: Peripheral stress test | ||
|
||
common: | ||
depends_on: adc gpio i2c pwm spi watchdog | ||
tags: drivers spi sensors ci_tests_benchmarks_peripheral_load | ||
harness: console | ||
|
||
tests: | ||
sample.benchmarks.peripheral_stress_test.nrf54h: | ||
filter: not CONFIG_COVERAGE | ||
harness_config: | ||
fixture: pca63566 | ||
type: multi_line | ||
ordered: false | ||
regex: | ||
- ".*Accelerometer thread has completed" | ||
- ".*ADC thread has completed" | ||
- ".*BME680 thread has completed" | ||
- ".*CAN thread has completed" | ||
- ".*Counter thread has completed" | ||
- ".*Flash thread has completed" | ||
- ".*GPIO thread has completed" | ||
- ".*PWM thread has completed" | ||
- ".*TEMP thread has completed" | ||
- ".*Timer thread has completed" | ||
- ".*WDT thread has completed" | ||
- ".*CPU load thread has completed" | ||
- ".*all \\d{1,} threads have completed" | ||
extra_args: | ||
- SHIELD=pca63566 | ||
platform_allow: nrf54h20dk/nrf54h20/cpuapp | ||
integration_platforms: | ||
- nrf54h20dk/nrf54h20/cpuapp | ||
|
||
sample.benchmarks.peripheral_stress_test.nrf54h_coverage: | ||
filter: CONFIG_COVERAGE | ||
harness_config: | ||
fixture: pca63566 | ||
type: multi_line | ||
ordered: false | ||
regex: | ||
- ".*Accelerometer thread has completed" | ||
- ".*ADC thread has completed" | ||
- ".*BME680 thread has completed" | ||
- ".*CAN thread has completed" | ||
- ".*Counter thread has completed" | ||
- ".*Flash thread has completed" | ||
- ".*GPIO thread has completed" | ||
- ".*PWM thread has completed" | ||
- ".*TEMP thread has completed" | ||
- ".*Timer thread has completed" | ||
- ".*WDT thread has completed" | ||
- ".*CPU load thread has completed" | ||
- ".*all \\d{1,} threads have completed" | ||
extra_args: | ||
- SHIELD=pca63566;coverage_support | ||
platform_allow: nrf54h20dk/nrf54h20/cpuapp | ||
integration_platforms: | ||
- nrf54h20dk/nrf54h20/cpuapp | ||
|
||
sample.benchmarks.peripheral_stress_test.nrf54l: | ||
filter: not CONFIG_COVERAGE | ||
harness_config: | ||
fixture: pca63565 | ||
type: multi_line | ||
ordered: false | ||
regex: | ||
- ".*Accelerometer thread has completed" | ||
- ".*ADC thread has completed" | ||
- ".*BME680 thread has completed" | ||
- ".*Counter thread has completed" | ||
- ".*Flash thread has completed" | ||
- ".*GPIO thread has completed" | ||
- ".*I2S thread has completed" | ||
- ".*PWM thread has completed" | ||
- ".*TEMP thread has completed" | ||
- ".*Timer thread has completed" | ||
- ".*WDT thread has completed" | ||
- ".*CPU load thread has completed" | ||
- ".*all \\d{1,} threads have completed" | ||
extra_args: | ||
- SHIELD=pca63565 | ||
platform_allow: nrf54l15dk/nrf54l15/cpuapp | ||
integration_platforms: | ||
- nrf54l15dk/nrf54l15/cpuapp | ||
|
||
sample.benchmarks.peripheral_stress_test.nrf54l_coverage: | ||
filter: CONFIG_COVERAGE | ||
harness_config: | ||
fixture: pca63565 | ||
type: multi_line | ||
ordered: false | ||
regex: | ||
- ".*Accelerometer thread has completed" | ||
- ".*ADC thread has completed" | ||
- ".*BME680 thread has completed" | ||
- ".*Counter thread has completed" | ||
- ".*Flash thread has completed" | ||
- ".*GPIO thread has completed" | ||
- ".*I2S thread has completed" | ||
- ".*PWM thread has completed" | ||
- ".*TEMP thread has completed" | ||
- ".*Timer thread has completed" | ||
- ".*WDT thread has completed" | ||
- ".*CPU load thread has completed" | ||
- ".*all \\d{1,} threads have completed" | ||
extra_args: | ||
- SHIELD=pca63565;coverage_support | ||
platform_allow: nrf54l15dk/nrf54l15/cpuapp | ||
integration_platforms: | ||
- nrf54l15dk/nrf54l15/cpuapp |
Oops, something went wrong.