fix long standing bug where the last pages of NVM were not erased

properly.
This commit is contained in:
maralvira 2010-07-28 18:43:04 +00:00
parent c602c61468
commit eb0e3b7989
2 changed files with 5 additions and 5 deletions

View file

@ -30,7 +30,7 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org * This file is part of libmc1322x: see http://mc1322x.devl.org
* for details. * for details.
* *
* $Id: config.h,v 1.1 2010/06/10 14:55:39 maralvira Exp $ * $Id: config.h,v 1.2 2010/07/28 18:43:04 maralvira Exp $
*/ */
#ifndef CONFIG_H #ifndef CONFIG_H
@ -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

View file

@ -30,7 +30,7 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org * This file is part of libmc1322x: see http://mc1322x.devl.org
* for details. * for details.
* *
* $Id: flasher.c,v 1.1 2010/06/10 14:55:39 maralvira Exp $ * $Id: flasher.c,v 1.2 2010/07/28 18:43:04 maralvira Exp $
*/ */
#include <mc1322x.h> #include <mc1322x.h>
@ -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);