From 41921a7bcf7c3437f64f051923c156baa6887bbd Mon Sep 17 00:00:00 2001 From: crasbe Date: Tue, 2 Jul 2024 18:52:04 +0200 Subject: [PATCH] fixup! fixup! fixup! tests/mtd_spi_nor: Added test with security features --- tests/drivers/mtd_spi_nor/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/drivers/mtd_spi_nor/main.c b/tests/drivers/mtd_spi_nor/main.c index 7dba368a8d..522f72bef9 100644 --- a/tests/drivers/mtd_spi_nor/main.c +++ b/tests/drivers/mtd_spi_nor/main.c @@ -224,7 +224,10 @@ static void test_mtd_block_protect(void) ret = mtd_write_page_raw(TEST_MTD, test_data, 0x00000000, 0x00, sizeof(test_data)); TEST_ASSERT_EQUAL_INT(-EIO, ret); - busy_wait_us(1000000); + /* wait for one second between the tests */ + for (uint16_t ms = 1000; ms; ms--) { + busy_wait_us((unsigned int)US_PER_MS); + } /* Perform an erase test to check if the E_FAIL flag is correctly handled */ ret = mtd_erase(TEST_MTD, 0x00000000, dev->base.page_size * dev->base.pages_per_sector);