From 22177258df376df03e7d9f88c4aa5e45ea671e90 Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Sat, 5 Oct 2019 21:47:23 +0200 Subject: [PATCH] msp430_common/include: fix FLASHPAGE definitions - TI documentation for msp430f1xx is ambiguous regarding length of some memmory sectors. For some cpu's the acual size is 1/4 byte smaller than advertised and one of the sectors is actually 256b and not 512. ref: https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/798838/2962979#2962979 - Remove the first 256b sector from usage since there is not support for variable sized pages - Fix msp430f2617 FLASHPAGE_NUMOFF to represent accesible memory --- cpu/msp430_common/include/cpu_conf.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpu/msp430_common/include/cpu_conf.h b/cpu/msp430_common/include/cpu_conf.h index 09e0aa9ba4..33a12cb858 100644 --- a/cpu/msp430_common/include/cpu_conf.h +++ b/cpu/msp430_common/include/cpu_conf.h @@ -32,11 +32,11 @@ extern "C" { #define CPU_FLASH_BASE (0x4000) #define FLASHPAGE_NUMOF (96) /* 48K */ #elif defined (CPU_MODEL_MSP430F1612) -#define CPU_FLASH_BASE (0x2600) -#define FLASHPAGE_NUMOF (110) /* 56K */ +#define CPU_FLASH_BASE (0x2600) /* first sector is only 256 byte, skip it*/ +#define FLASHPAGE_NUMOF (109U) /* 54.5K */ #elif defined (CPU_MODEL_MSP430F2617) -#define CPU_FLASH_BASE (0x3100) -#define FLASHPAGE_NUMOF (128) /* we can currently only access 52K */ +#define CPU_FLASH_BASE (0x3200) /* first sector is only 256 byte, skip it*/ +#define FLASHPAGE_NUMOF (103U) /* we can currently only access 51.5K */ #elif defined (CPU_MODEL_CC430F6137) #define CPU_FLASH_BASE (0x8000) #define FLASHPAGE_NUMOF (64) /* 32K */