Skip to content

Commit c719e2c

Browse files
FRASTMkartben
authored andcommitted
tests: drivers: flash testing stm32 flash size
Add a special testcase to test any stm32 target The expected flash size is given by the config FLASH_SIZE (in bytes) and stm32 flash driver API function should return the same value Do not run on the stm32wb55 nucleo as 216K are reserved among the 1MB (only 808K declared but mcu has 1MB) Signed-off-by: Francois Ramu <francois.ramu@st.com>
1 parent 96b3a22 commit c719e2c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/drivers/flash/common/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
# Device/scenario dependent information that is not available in
55
# other ways.
66

7+
DT_CHOSEN_Z_FLASH := zephyr,flash
8+
79
config TEST_DRIVER_FLASH_SIZE
810
int "Size of flash device under test"
11+
default $(dt_chosen_reg_size_int,$(DT_CHOSEN_Z_FLASH),0) if SOC_FAMILY_STM32
912
default -1
1013
help
1114
Expected flash device size the test will validate against. If the flash driver does not
1215
support the get_size() API, leave this set as -1 to skip the test.
16+
For the STM32 devices, the flash size is direclty given by the soc DTSI.
1317

1418
source "Kconfig.zephyr"

tests/drivers/flash/common/testcase.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ tests:
117117
extra_configs:
118118
- CONFIG_DMA=y
119119
- CONFIG_SOC_FLASH_SILABS_S2_DMA_READ=y
120+
drivers.flash.common.stm32:
121+
filter: ((CONFIG_FLASH_HAS_DRIVER_ENABLED and not CONFIG_TRUSTED_EXECUTION_NONSECURE)
122+
and CONFIG_SOC_FAMILY_STM32
123+
and dt_label_with_parent_compat_enabled("storage_partition", "fixed-partitions"))
124+
integration_platforms:
125+
- nucleo_g474re
126+
platform_exclude:
127+
- nucleo_wb55rg
120128
drivers.flash.common.non_quad_mode:
121129
extra_args:
122130
- EXTRA_DTC_OVERLAY_FILE=boards/mx25r64_non_quad.overlay

0 commit comments

Comments
 (0)