1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/drivers/stm_fmc: move test app to tests/periph/fmc

This commit is contained in:
Gunar Schorcht 2023-07-25 08:08:58 +02:00
parent 98749d68eb
commit ac4d5d4edc
7 changed files with 24 additions and 21 deletions

View File

@ -1,8 +0,0 @@
BOARD ?= stm32f429i-disc1
include ../Makefile.drivers_common
USEMODULE += benchmark
USEMODULE += periph_fmc
USEMODULE += od
include $(RIOTBASE)/Makefile.include

6
tests/periph/fmc/Kconfig Normal file
View File

@ -0,0 +1,6 @@
config APPLICATION
bool
default y
imply MODULE_PERIPH_FMC_NOR_SRAM
imply MODULE_PERIPH_FMC_SDRAM
depends on TEST_KCONFIG

11
tests/periph/fmc/Makefile Normal file
View File

@ -0,0 +1,11 @@
BOARD ?= stm32f429i-disc1
include ../Makefile.periph_common
USEMODULE += benchmark
USEMODULE += od
FEATURES_REQUIRED += periph_fmc
FEATURES_OPTIONAL += periph_fmc_nor_sram
FEATURES_OPTIONAL += periph_fmc_sdram
include $(RIOTBASE)/Makefile.include

View File

@ -13,7 +13,7 @@ The bank to be used is defined by environment variable `FMC_BANK`. For example,
if the board configures two banks with RAM, the second bank can be tested by
specifying the `FMC_BANK` variable as follows:
```
FMC_BANK=1 BOARD=... make -j8 -C tests/drivers/stm32_fmc flash test
FMC_BANK=1 BOARD=... make -j8 -C tests/periph/fmc flash test
```
Expected Output on Success

View File

@ -54,14 +54,12 @@ int main(void)
data8, data16, data32);
puts("------------------------------------------------------------------------");
for (unsigned i = 0; i < 256; i++)
{
for (unsigned i = 0; i < 256; i++) {
data8[i] = i;
}
od_hex_dump_ext(data8, 256, 16, fmc_bank_config[FMC_BANK].address);
for (unsigned i = 0; i < 256; i++)
{
for (unsigned i = 0; i < 256; i++) {
if (data8[i] != i) {
printf("memory content did not match @%p\n", &data8[i]);
return 1;
@ -69,14 +67,12 @@ int main(void)
}
puts("------------------------------------------------------------------------");
for (unsigned i = 0; i < 128; i++)
{
for (unsigned i = 0; i < 128; i++) {
data16[i] = ((128 + i) << 8) + i;
}
od_hex_dump_ext(data16, 256, 16, fmc_bank_config[FMC_BANK].address + 256);
for (unsigned i = 0; i < 128; i++)
{
for (unsigned i = 0; i < 128; i++) {
if (data16[i] != ((128 + i) << 8) + i) {
printf("memory content did not match @%p\n", &data16[i]);
return 1;
@ -84,15 +80,13 @@ int main(void)
}
puts("------------------------------------------------------------------------");
for (unsigned i = 0; i < 64; i++)
{
for (unsigned i = 0; i < 64; i++) {
data32[i] = ((192 + i) << 24) + ((128 + i) << 16) + ((64 + i) << 8) + i;
}
od_hex_dump_ext(data32, 256, 16, (fmc_bank_config[FMC_BANK].address) +
(fmc_bank_config[FMC_BANK].size) - 256);
for (unsigned i = 0; i < 64; i++)
{
for (unsigned i = 0; i < 64; i++) {
if (data32[i] != ((192 + i) << 24) + ((128 + i) << 16) + ((64 + i) << 8) + i) {
printf("memory content did not match @%p\n", &data32[i]);
return 1;