Skip to content

Commit c2bc20e

Browse files
committed
Fix to flash API on EFM32
* Since mbed does not overwrite itself, make the flashing routines run out of flash by default * Report a writeable size of 4 bytes (previously erroneously reported a full eraseable page as the minimum write size)
1 parent 30db7fd commit c2bc20e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/flash_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)
112112

113113
/** Get page size
114114
*
115+
* The page size defines the writable page size
115116
* @param obj The flash object
116-
* @param address The page starting address
117117
* @return The size of a page
118118
*/
119119
uint32_t flash_get_page_size(const flash_t *obj)
120120
{
121121
(void)obj;
122-
return FLASH_PAGE_SIZE;
122+
return sizeof(uint32_t);
123123
}
124124

125125
/** Get start address for the flash region

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2828,7 +2828,7 @@
28282828
"EFM32": {
28292829
"inherits": ["Target"],
28302830
"extra_labels": ["Silicon_Labs", "EFM32"],
2831-
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBED_TICKLESS"],
2831+
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBED_TICKLESS", "EM_MSC_RUN_FROM_FLASH"],
28322832
"public": false
28332833
},
28342834
"EFM32GG990F1024": {

0 commit comments

Comments
 (0)