From c2329eefdab2cdfe136fcc7fc3e7b6e97a0ab562 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 20 Oct 2020 16:23:04 +0200 Subject: [PATCH] 29*0x0 Flash now only starts the page write timer after the page address has been loaded, fixes accidental writes addresses that are not supposed to be written to. --- src/mem/sst_flash.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mem/sst_flash.c b/src/mem/sst_flash.c index 4bbb09c09..a95f96359 100644 --- a/src/mem/sst_flash.c +++ b/src/mem/sst_flash.c @@ -127,7 +127,6 @@ sst_new_command(sst_t *dev, uint32_t addr, uint8_t val) if (!dev->is_39) { memset(dev->page_buffer, 0xff, 128); dev->page_bytes = 0; - timer_on_auto(&dev->page_write_timer, 210.0); } dev->command_state = 6; break; @@ -179,7 +178,7 @@ sst_buf_write(sst_t *dev, uint32_t addr, uint8_t val) if (dev->page_bytes >= 128) sst_page_write(dev); else - timer_set_delay_u64(&dev->page_write_timer, 210 * TIMER_USEC); + timer_on_auto(&dev->page_write_timer, 210.0); }