From eab3e5b73d4ef417233ea24f4ce462458e133323 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 3 Jan 2022 23:52:35 +0100 Subject: [PATCH] The first time, the flash memory is full of garbage. It needs to be marked as empty. Signed-off-by: Pol Henarejos --- flash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/flash.c b/flash.c index f7a6e90..775e064 100644 --- a/flash.c +++ b/flash.c @@ -130,9 +130,8 @@ flash_do_storage_init (const uint8_t **p_do_start, const uint8_t **p_do_end) if (gen0 == 0xffff && gen1 == 0xffff) { - /* It's terminated. */ - *p_do_start = *p_do_end = NULL; - return; + gen0 = 0x0000; + *gen0_p = gen0; } if (gen0 == 0xffff)