Skip to content

Commit 1a0c2d0

Browse files
author
Cruz Monrreal
authored
Merge pull request #6970 from stevew817/efm32_flash_bugfix
Fixes to EFM32 port
2 parents 206cab9 + c2bc20e commit 1a0c2d0

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG12/PeripheralPins.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ const PinMap PinMap_SPI_MOSI[] = {
301301
{PF4, SPI_1, 28},
302302
{PF5, SPI_1, 29},
303303
{PF6, SPI_1, 30},
304-
{PF7, SPI_1, 31},
305304
#endif
306305
#ifdef USART2_BASE
307306
/* USART2 */
@@ -318,6 +317,7 @@ const PinMap PinMap_SPI_MOSI[] = {
318317
{PB8, SPI_2, 11},
319318
{PB9, SPI_2, 12},
320319
{PB10, SPI_2, 13},
320+
{PF7, SPI_2, 20},
321321
{PF8, SPI_2, 21},
322322
{PF9, SPI_2, 22},
323323
{PF10, SPI_2, 23},
@@ -381,7 +381,6 @@ const PinMap PinMap_SPI_MISO[] = {
381381
{PF4, SPI_1, 27},
382382
{PF5, SPI_1, 28},
383383
{PF6, SPI_1, 29},
384-
{PF7, SPI_1, 30},
385384
{PA0, SPI_1, 31},
386385
#endif
387386
#ifdef USART2_BASE
@@ -399,6 +398,7 @@ const PinMap PinMap_SPI_MISO[] = {
399398
{PB8, SPI_2, 10},
400399
{PB9, SPI_2, 11},
401400
{PB10, SPI_2, 12},
401+
{PF7, SPI_2, 19},
402402
{PF8, SPI_2, 20},
403403
{PF9, SPI_2, 21},
404404
{PF10, SPI_2, 22},
@@ -462,7 +462,6 @@ const PinMap PinMap_SPI_CLK[] = {
462462
{PF4, SPI_1, 26},
463463
{PF5, SPI_1, 27},
464464
{PF6, SPI_1, 28},
465-
{PF7, SPI_1, 29},
466465
{PA0, SPI_1, 30},
467466
{PA1, SPI_1, 31},
468467
#endif
@@ -480,6 +479,7 @@ const PinMap PinMap_SPI_CLK[] = {
480479
{PB8, SPI_2, 9},
481480
{PB9, SPI_2, 10},
482481
{PB10, SPI_2, 11},
482+
{PF7, SPI_2, 18},
483483
{PF8, SPI_2, 19},
484484
{PF9, SPI_2, 20},
485485
{PF10, SPI_2, 21},
@@ -544,7 +544,6 @@ const PinMap PinMap_SPI_CS[] = {
544544
{PF4, SPI_1, 25},
545545
{PF5, SPI_1, 26},
546546
{PF6, SPI_1, 27},
547-
{PF7, SPI_1, 28},
548547
#endif
549548
#ifdef USART2_BASE
550549
/* USART2 */
@@ -559,6 +558,7 @@ const PinMap PinMap_SPI_CS[] = {
559558
{PB8, SPI_2, 8},
560559
{PB9, SPI_2, 9},
561560
{PB10, SPI_2, 10},
561+
{PF7, SPI_2, 17},
562562
{PF8, SPI_2, 18},
563563
{PF9, SPI_2, 19},
564564
{PF10, SPI_2, 20},

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFR32MG12/TARGET_TB_SENSE_12/PinNames.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ typedef enum {
5050

5151
/* Expansion headers */
5252
EXP3 = PA8,
53-
EXP4 = PC6,
53+
EXP4 = PK0,
5454
EXP5 = PA9,
55-
EXP6 = PC7,
56-
EXP7 = PF3,
57-
EXP8 = PC8,
58-
EXP9 = PF4,
59-
EXP10 = PC9,
55+
EXP6 = PK2,
56+
EXP7 = PA6,
57+
EXP8 = PF7,
58+
EXP9 = PA7,
59+
EXP10 = PA5,
6060
EXP11 = PF5,
61-
EXP12 = PA6,
61+
EXP12 = PF3,
6262
EXP13 = PF6,
63-
EXP14 = PA7,
63+
EXP14 = PF4,
6464
EXP15 = PC11,
6565
EXP16 = PC10,
6666

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
@@ -2902,7 +2902,7 @@
29022902
"EFM32": {
29032903
"inherits": ["Target"],
29042904
"extra_labels": ["Silicon_Labs", "EFM32"],
2905-
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBED_TICKLESS"],
2905+
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBED_TICKLESS", "EM_MSC_RUN_FROM_FLASH"],
29062906
"public": false
29072907
},
29082908
"EFM32GG990F1024": {

0 commit comments

Comments
 (0)