From 3c3bf8cb1c95c6214137503264712af4c62ccce5 Mon Sep 17 00:00:00 2001 From: barthess Date: Thu, 18 Aug 2016 11:26:04 +0300 Subject: [STM32 NAND] Updated testhal. --- testhal/STM32/STM32F4xx/FSMC_NAND/.cproject | 86 ++++++++++++++++++++++------- testhal/STM32/STM32F4xx/FSMC_NAND/main.c | 22 +++++++- 2 files changed, 86 insertions(+), 22 deletions(-) (limited to 'testhal/STM32/STM32F4xx/FSMC_NAND') diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject b/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject index d5451e0..034a4fc 100644 --- a/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject +++ b/testhal/STM32/STM32F4xx/FSMC_NAND/.cproject @@ -1,33 +1,79 @@ - - + + - - - + + + - - - - - - - - + + + + + + + + + + + + - - + + + + - - + + + + @@ -41,12 +87,10 @@ - + - - - + diff --git a/testhal/STM32/STM32F4xx/FSMC_NAND/main.c b/testhal/STM32/STM32F4xx/FSMC_NAND/main.c index 29b2dfb..e75a937 100644 --- a/testhal/STM32/STM32F4xx/FSMC_NAND/main.c +++ b/testhal/STM32/STM32F4xx/FSMC_NAND/main.c @@ -124,7 +124,7 @@ static time_measurement_t tmu_driver_start; /* * */ -static bitmap_word_t badblock_map_array[BAD_MAP_LEN]; +static bitmap_word_t badblock_map_array[BAD_MAP_LEN]; static bitmap_t badblock_map = { badblock_map_array, BAD_MAP_LEN @@ -429,6 +429,26 @@ static void general_test (NANDDriver *nandp, size_t first, } } + /* check fail status */ + for (block=first; blockconfig->page_data_size, &wecc); + osalDbgCheck(0 == (op_status & 1)); + + pattern_fill(); + op_status = nandWritePageData(nandp, block, 0, + nand_buf, nandp->config->page_data_size, &wecc); + /* operation must failed here because of write in unerased space */ + osalDbgCheck(1 == (op_status & 1)); + } + } + /* write block with pattern, read it back and compare */ for (block=first; block