mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-02-07 19:18:23 +00:00
The first time, the flash memory is full of garbage. It needs to be marked as empty.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
7c0321f4f3
commit
eab3e5b73d
1 changed files with 2 additions and 3 deletions
5
flash.c
5
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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue