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
* 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
@ -50,8 +50,8 @@
#define uart_init uart1_init
/* nvm-read */
#define READ_ADDR 0x1E000
#define READ_NBYTES 8
#define READ_ADDR 0x1f000
#define READ_NBYTES 1024
/* nvm-write */
#define WRITE_NBYTES 8

View File

@ -30,7 +30,7 @@
* This file is part of libmc1322x: see http://mc1322x.devl.org
* 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>
@ -101,7 +101,7 @@ void main(void) {
dbg_putstr("\n\r");
/* erase the flash */
err = nvm_erase(gNvmInternalInterface_c, type, 0x4fffffff);
err = nvm_erase(gNvmInternalInterface_c, type, 0x7fffffff);
dbg_putstr("nvm_erase returned: 0x");
dbg_put_hex(err);