From 0cc42db36d6518295f396ac9467406e1f34b4809 Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Mon, 4 May 2015 13:27:02 -0500 Subject: [PATCH 1/2] Set the default status for an input pin to PullUp instead of letting it be PullDown. --- .../targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c index c403072c46..e2a3461a70 100644 --- a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c +++ b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/gpio_api.c @@ -58,6 +58,12 @@ void gpio_mode(gpio_t *obj, PinMode mode) { obj->mode = mode; // Update object pin_mode(obj->pin, mode); // Update register + + //Handle pullup for input + if(mode == InputPullUp) { + //Set DOUT + GPIO->P[obj->port & 0xF].DOUTSET = 1 << (obj->pin & 0xF); + } } // Used by DigitalInOut to set correct mode when direction is set From 3561490e0ce83b760b0a6a3b6c5c3b5292e76d66 Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Mon, 4 May 2015 17:03:34 -0500 Subject: [PATCH 2/2] Leopard and Wonder Gecko boards had the wrong clock frequency defined. --- .../TARGET_EFM32/TARGET_EFM32LG_STK3600/device_peripherals.h | 2 +- .../TARGET_EFM32/TARGET_EFM32WG_STK3800/device_peripherals.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32LG_STK3600/device_peripherals.h b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32LG_STK3600/device_peripherals.h index a142a4f600..4ca4e8ab9b 100644 --- a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32LG_STK3600/device_peripherals.h +++ b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32LG_STK3600/device_peripherals.h @@ -64,7 +64,7 @@ #define HFRCO_FREQUENCY CMU_HFRCOCTRL_BAND_14MHZ #define LFXO_FREQUENCY 32768 -#define HFXO_FREQUENCY 32000000 +#define HFXO_FREQUENCY 48000000 #if (LOW_ENERGY_CLOCK_SOURCE == LFXO) #define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY diff --git a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32WG_STK3800/device_peripherals.h b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32WG_STK3800/device_peripherals.h index a142a4f600..4ca4e8ab9b 100644 --- a/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32WG_STK3800/device_peripherals.h +++ b/libraries/mbed/targets/hal/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32WG_STK3800/device_peripherals.h @@ -64,7 +64,7 @@ #define HFRCO_FREQUENCY CMU_HFRCOCTRL_BAND_14MHZ #define LFXO_FREQUENCY 32768 -#define HFXO_FREQUENCY 32000000 +#define HFXO_FREQUENCY 48000000 #if (LOW_ENERGY_CLOCK_SOURCE == LFXO) #define LOW_ENERGY_CLOCK_FREQUENCY LFXO_FREQUENCY