From eb0e3b79899c9e23272617f638dd017ae282e6e6 Mon Sep 17 00:00:00 2001 From: maralvira Date: Wed, 28 Jul 2010 18:43:04 +0000 Subject: [PATCH] fix long standing bug where the last pages of NVM were not erased properly. --- cpu/mc1322x/tests/config.h | 6 +++--- cpu/mc1322x/tests/flasher.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpu/mc1322x/tests/config.h b/cpu/mc1322x/tests/config.h index 0afbc8974..6c0434e7a 100644 --- a/cpu/mc1322x/tests/config.h +++ b/cpu/mc1322x/tests/config.h @@ -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 diff --git a/cpu/mc1322x/tests/flasher.c b/cpu/mc1322x/tests/flasher.c index 3846649f6..e78d173b7 100644 --- a/cpu/mc1322x/tests/flasher.c +++ b/cpu/mc1322x/tests/flasher.c @@ -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 @@ -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);