Skip to content

[Silicon Labs] Adding support for EFR32MG1 wireless SoC #3157

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

Merged
merged 17 commits into from
Dec 2, 2016
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/mutex/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#define STACK_SIZE 768
#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO)
#define STACK_SIZE 1536
#elif (defined(TARGET_EFR32)) && !defined(TOOLCHAIN_ARM_MICRO)
#define STACK_SIZE 768
#elif defined(TARGET_MCU_NRF51822) || defined(TARGET_MCU_NRF52832)
#define STACK_SIZE 1024
#elif defined(TARGET_XDOT_L151CC)
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/semaphore/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
#define STACK_SIZE 768
#elif (defined(TARGET_EFM32GG_STK3700)) && !defined(TOOLCHAIN_ARM_MICRO)
#define STACK_SIZE 1536
#elif (defined(TARGET_EFR32)) && !defined(TOOLCHAIN_ARM_MICRO)
#define STACK_SIZE 768
#elif defined(TARGET_MCU_NRF51822) || defined(TARGET_MCU_NRF52832)
#define STACK_SIZE 768
#elif defined(TARGET_XDOT_L151CC)
Expand Down
2 changes: 2 additions & 0 deletions TESTS/mbedmicro-rtos-mbed/threads/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#define STACK_SIZE 1024
#elif defined(TARGET_HI2110)
#define STACK_SIZE 512
#elif defined(TARGET_EFR32)
#define STACK_SIZE 512
#else
#define STACK_SIZE DEFAULT_STACK_SIZE
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

SingletonPtr<GreenteaSerial> greentea_serial;

GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX) {};
GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX, MBED_CONF_PLATFORM_STDIO_BAUD_RATE) {};
18 changes: 18 additions & 0 deletions features/mbedtls/platform/inc/platform_mbed.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,21 @@
#if defined(DEVICE_TRNG)
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#endif

#if defined(DEVICE_AES)
#define MBEDTLS_AES_ALT
#endif

#if defined(DEVICE_SHA)
#define MBEDTLS_SHA1_ALT
#define MBEDTLS_SHA256_ALT
#endif

#if defined(DEVICE_ECC)
#define MBEDTLS_ECP_DEVICE_ALT
#define MBEDTLS_ECP_DOUBLE_JAC_ALT
#define MBEDTLS_ECP_DEVICE_ADD_MIXED_ALT
#define MBEDTLS_ECP_NORMALIZE_JAC_ALT
#define MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT
#define MBEDTLS_MPI_MODULAR_DIVISION_ALT
#endif
3 changes: 3 additions & 0 deletions platform/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"target_overrides": {
"EFM32": {
"stdio-baud-rate": 115200
},
"EFR32": {
"stdio-baud-rate": 115200
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ typedef enum {

/* Board Controller */
STDIO_UART_TX = USBTX,
STDIO_UART_RX = USBRX,
EFM_BC_EN = PF7
STDIO_UART_RX = USBRX
} PinName;

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ typedef enum {

/* Board Controller */
STDIO_UART_TX = USBTX,
STDIO_UART_RX = USBRX,
EFM_BC_EN = PA9
STDIO_UART_RX = USBRX
} PinName;

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ typedef enum {

/* Board Controller */
STDIO_UART_TX = USBTX,
STDIO_UART_RX = USBRX,
EFM_BC_EN = PF7
STDIO_UART_RX = USBRX
} PinName;

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ typedef enum {

/* Board Controller */
STDIO_UART_TX = USBTX,
STDIO_UART_RX = USBRX,
EFM_BC_EN = PA5
STDIO_UART_RX = USBRX
} PinName;

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ typedef enum {

/* Board Controller */
STDIO_UART_TX = USBTX,
STDIO_UART_RX = USBRX,
EFM_BC_EN = PF7
STDIO_UART_RX = USBRX
} PinName;

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ typedef enum {

/* Board Controller */
STDIO_UART_TX = USBTX,
STDIO_UART_RX = USBRX,
EFM_BC_EN = PA9
STDIO_UART_RX = USBRX
} PinName;

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/***************************************************************************//**
* @file PeripheralNames.h
*******************************************************************************
* @section License
* <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
*******************************************************************************
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
******************************************************************************/
#ifndef MBED_PERIPHERALNAMES_H
#define MBED_PERIPHERALNAMES_H

#include "em_adc.h"
#include "em_usart.h"
#include "em_i2c.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
ADC_0 = ADC0_BASE
} ADCName;

typedef enum {
I2C_0 = I2C0_BASE,
} I2CName;

typedef enum {
PWM_CH0 = 0,
PWM_CH1 = 1,
PWM_CH2 = 2,
PWM_CH3 = 3
} PWMName;

typedef enum {
USART_0 = USART0_BASE,
USART_1 = USART1_BASE,
LEUART_0 = LEUART0_BASE,
} UARTName;

typedef enum {
SPI_0 = USART0_BASE,
SPI_1 = USART1_BASE,
} SPIName;

#ifdef __cplusplus
}
#endif

#endif
Loading