fix long standing bug where the last pages of NVM were not erased
properly.
This commit is contained in:
parent
36361e1eb0
commit
beb75cd355
|
@ -50,8 +50,8 @@
|
||||||
#define uart_init uart1_init
|
#define uart_init uart1_init
|
||||||
|
|
||||||
/* nvm-read */
|
/* nvm-read */
|
||||||
#define READ_ADDR 0x1E000
|
#define READ_ADDR 0x1f000
|
||||||
#define READ_NBYTES 8
|
#define READ_NBYTES 1024
|
||||||
|
|
||||||
/* nvm-write */
|
/* nvm-write */
|
||||||
#define WRITE_NBYTES 8
|
#define WRITE_NBYTES 8
|
||||||
|
|
|
@ -101,7 +101,7 @@ void main(void) {
|
||||||
dbg_putstr("\n\r");
|
dbg_putstr("\n\r");
|
||||||
|
|
||||||
/* erase the flash */
|
/* erase the flash */
|
||||||
err = nvm_erase(gNvmInternalInterface_c, type, 0x4fffffff);
|
err = nvm_erase(gNvmInternalInterface_c, type, 0x7fffffff);
|
||||||
|
|
||||||
dbg_putstr("nvm_erase returned: 0x");
|
dbg_putstr("nvm_erase returned: 0x");
|
||||||
dbg_put_hex(err);
|
dbg_put_hex(err);
|
||||||
|
|
Loading…
Reference in a new issue