aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-02-19 19:23:18 -0500
committerPaul Selkirk <paul@psgd.org>2017-02-19 19:23:18 -0500
commite9011a1ae42333fdcbebf9b85ced6ea942f3547c (patch)
tree344d7139300c440e5879ec6a2855bb1c97367f69 /projects
parent742cbe3d4090d62ee5f871e487ce88145d12c04e (diff)
Remove unnecessary delays in flash code.
Diffstat (limited to 'projects')
-rw-r--r--projects/board-test/keystore-perf.c2
-rw-r--r--projects/board-test/spiflash-perf.c19
2 files changed, 2 insertions, 19 deletions
diff --git a/projects/board-test/keystore-perf.c b/projects/board-test/keystore-perf.c
index 7af4893..75b4e3f 100644
--- a/projects/board-test/keystore-perf.c
+++ b/projects/board-test/keystore-perf.c
@@ -187,8 +187,8 @@ int main(void)
uart_send_string("Starting...\r\n");
time_check("read data ", test_read_data(), KEYSTORE_NUM_SUBSECTORS);
- time_check("erase sector ", test_erase_sector(), KEYSTORE_NUM_SECTORS);
time_check("erase subsector ", test_erase_subsector(), KEYSTORE_NUM_SUBSECTORS);
+ time_check("erase sector ", test_erase_sector(), KEYSTORE_NUM_SECTORS);
time_check("verify erase ", test_verify_erase(), KEYSTORE_NUM_SUBSECTORS);
time_check("write data ", test_write_data(), KEYSTORE_NUM_SUBSECTORS);
time_check("verify write ", test_verify_write(), KEYSTORE_NUM_SUBSECTORS);
diff --git a/projects/board-test/spiflash-perf.c b/projects/board-test/spiflash-perf.c
index 52d3c0f..1abcd7b 100644
--- a/projects/board-test/spiflash-perf.c
+++ b/projects/board-test/spiflash-perf.c
@@ -138,21 +138,6 @@ static void test_verify_erase(void)
}
/*
- * Borrowed from spiflash_n25q128.c, since n25q128_write_page doesn't call it.
- */
-inline int _wait_while_wip(struct spiflash_ctx *ctx, uint32_t timeout)
-{
- int i;
- while (timeout--) {
- i = n25q128_get_wip_flag(ctx);
- if (i < 0) return 0;
- if (! i) break;
- HAL_Delay(10);
- }
- return 1;
-}
-
-/*
* 3a. Write the entire flash with a pattern.
*/
static void test_write_page(void)
@@ -166,8 +151,6 @@ static void test_write_page(void)
for (i = 0; i < N25Q128_NUM_PAGES; ++i) {
err = n25q128_write_page(ctx, i, write_buf);
- if (err == 1)
- err = _wait_while_wip(ctx, 1000);
if (err != 1) {
uart_send_string("ERROR: n25q128_write_page returned ");
uart_send_integer(err, 0);
@@ -234,8 +217,8 @@ int main(void)
uart_send_string("Starting...\r\n");
time_check("read page ", test_read_page(), N25Q128_NUM_PAGES);
- time_check("erase sector ", test_erase_sector(), N25Q128_NUM_SECTORS);
time_check("erase subsector ", test_erase_subsector(), N25Q128_NUM_SUBSECTORS);
+ time_check("erase sector ", test_erase_sector(), N25Q128_NUM_SECTORS);
time_check("erase bulk ", test_erase_bulk(), 1);
time_check("verify erase ", test_verify_erase(), N25Q128_NUM_PAGES);
time_check("write page ", test_write_page(), N25Q128_NUM_PAGES);