Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to EFM32 port #6970

Merged
merged 2 commits into from May 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -301,7 +301,6 @@ const PinMap PinMap_SPI_MOSI[] = {
{PF4, SPI_1, 28},
{PF5, SPI_1, 29},
{PF6, SPI_1, 30},
{PF7, SPI_1, 31},
#endif
#ifdef USART2_BASE
/* USART2 */
Expand All @@ -318,6 +317,7 @@ const PinMap PinMap_SPI_MOSI[] = {
{PB8, SPI_2, 11},
{PB9, SPI_2, 12},
{PB10, SPI_2, 13},
{PF7, SPI_2, 20},
{PF8, SPI_2, 21},
{PF9, SPI_2, 22},
{PF10, SPI_2, 23},
Expand Down Expand Up @@ -381,7 +381,6 @@ const PinMap PinMap_SPI_MISO[] = {
{PF4, SPI_1, 27},
{PF5, SPI_1, 28},
{PF6, SPI_1, 29},
{PF7, SPI_1, 30},
{PA0, SPI_1, 31},
#endif
#ifdef USART2_BASE
Expand All @@ -399,6 +398,7 @@ const PinMap PinMap_SPI_MISO[] = {
{PB8, SPI_2, 10},
{PB9, SPI_2, 11},
{PB10, SPI_2, 12},
{PF7, SPI_2, 19},
{PF8, SPI_2, 20},
{PF9, SPI_2, 21},
{PF10, SPI_2, 22},
Expand Down Expand Up @@ -462,7 +462,6 @@ const PinMap PinMap_SPI_CLK[] = {
{PF4, SPI_1, 26},
{PF5, SPI_1, 27},
{PF6, SPI_1, 28},
{PF7, SPI_1, 29},
{PA0, SPI_1, 30},
{PA1, SPI_1, 31},
#endif
Expand All @@ -480,6 +479,7 @@ const PinMap PinMap_SPI_CLK[] = {
{PB8, SPI_2, 9},
{PB9, SPI_2, 10},
{PB10, SPI_2, 11},
{PF7, SPI_2, 18},
{PF8, SPI_2, 19},
{PF9, SPI_2, 20},
{PF10, SPI_2, 21},
Expand Down Expand Up @@ -544,7 +544,6 @@ const PinMap PinMap_SPI_CS[] = {
{PF4, SPI_1, 25},
{PF5, SPI_1, 26},
{PF6, SPI_1, 27},
{PF7, SPI_1, 28},
#endif
#ifdef USART2_BASE
/* USART2 */
Expand All @@ -559,6 +558,7 @@ const PinMap PinMap_SPI_CS[] = {
{PB8, SPI_2, 8},
{PB9, SPI_2, 9},
{PB10, SPI_2, 10},
{PF7, SPI_2, 17},
{PF8, SPI_2, 18},
{PF9, SPI_2, 19},
{PF10, SPI_2, 20},
Expand Down
Expand Up @@ -50,17 +50,17 @@ typedef enum {

/* Expansion headers */
EXP3 = PA8,
EXP4 = PC6,
EXP4 = PK0,
EXP5 = PA9,
EXP6 = PC7,
EXP7 = PF3,
EXP8 = PC8,
EXP9 = PF4,
EXP10 = PC9,
EXP6 = PK2,
EXP7 = PA6,
EXP8 = PF7,
EXP9 = PA7,
EXP10 = PA5,
EXP11 = PF5,
EXP12 = PA6,
EXP12 = PF3,
EXP13 = PF6,
EXP14 = PA7,
EXP14 = PF4,
EXP15 = PC11,
EXP16 = PC10,

Expand Down
4 changes: 2 additions & 2 deletions targets/TARGET_Silicon_Labs/TARGET_EFM32/flash_api.c
Expand Up @@ -112,14 +112,14 @@ uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)

/** Get page size
*
* The page size defines the writable page size
* @param obj The flash object
* @param address The page starting address
* @return The size of a page
*/
uint32_t flash_get_page_size(const flash_t *obj)
{
(void)obj;
return FLASH_PAGE_SIZE;
return sizeof(uint32_t);
}

/** Get start address for the flash region
Expand Down
2 changes: 1 addition & 1 deletion targets/targets.json
Expand Up @@ -2828,7 +2828,7 @@
"EFM32": {
"inherits": ["Target"],
"extra_labels": ["Silicon_Labs", "EFM32"],
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBED_TICKLESS"],
"macros": ["MBEDTLS_CONFIG_HW_SUPPORT", "MBED_TICKLESS", "EM_MSC_RUN_FROM_FLASH"],
"public": false
},
"EFM32GG990F1024": {
Expand Down