diff --git a/configs/efm32-g8xx-stk/Kconfig b/configs/efm32-g8xx-stk/Kconfig index ef346141e1e..8f6559c91cc 100644 --- a/configs/efm32-g8xx-stk/Kconfig +++ b/configs/efm32-g8xx-stk/Kconfig @@ -5,6 +5,16 @@ if ARCH_BOARD_EFM32G8XXSTK -#comment "EFM32 G8XX STK Hardware Configuration" +comment "EFM32 G8XX STK Hardware Configuration" + +config EFM32G8STK_BCEN + bool "Enable BC_EN" + default n + ---help--- + The control MCU acts as a board controller (BC). There is a UART + connection between the EFM and the BC. The connection is made by + setting the EFM_BC_EN (PD13) line high. The EFM can then use the + BSP to send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX + and EFM_BC_RX can be used by other applications. endif # ARCH_BOARD_EFM32G8XXSTK diff --git a/configs/efm32-g8xx-stk/README.txt b/configs/efm32-g8xx-stk/README.txt index e8cadd287c1..2ce5d17184e 100644 --- a/configs/efm32-g8xx-stk/README.txt +++ b/configs/efm32-g8xx-stk/README.txt @@ -5,8 +5,8 @@ README Gecko Starter Kit (EFM32-G8XX-STK). The Gecko Starter Kit features: • EFM32G890F128 MCU with 128 kB flash and 16 kB RAM - • 32.768 kHz crystal - • 32 MHz crystal + • 32.768 kHz crystal (LXFO) + • 32 MHz crystal (HXFO) • Advanced Energy Monitoring • Touch slider • 4x40 LCD @@ -14,7 +14,7 @@ README • 2 pushbutton switches • Reset button and a switch to disconnect the battery. • On-board SEGGER J-Link USB emulator - • ARM 20 pin JTAG/SWD standard Debug in/out connector + • ARM 20 pin JTAG/SWD standard Debug in/out connector STATUS ====== @@ -129,13 +129,13 @@ Serial Console ------------------------------------------ The control MCU acts as a board controller (BC). There is a UART connection between the EFM and the BC. The connection is made by - setting the BC_EN line high. The EFM can then use the BSP to send - commands to the BC. When BC_EN is low, BC_TX and BC_RX can be used - by other applications. + setting the EFM_BC_EN (PD13) line high. The EFM can then use the BSP to + send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX and EFM_BC_RX + can be used by other applications. Configurations ============== - Each EFM32 Gecko Starter Kit configuration is maintained in a sub-director + Each EFM32 Gecko Starter Kit configuration is maintained in a sub-directory and can be selected as follow: cd tools @@ -154,8 +154,8 @@ Configurations --- Configures the NuttShell (nsh) located at apps/examples/nsh. The Configuration enables the serial interfaces on UART0. Support for - builtin applications is enabled, but in the base configuration no - builtin applications are selected (see NOTES below). + built-in applications is enabled, but in the base configuration no + built-in applications are selected (see NOTES below). NOTES: diff --git a/configs/efm32-g8xx-stk/nsh/defconfig b/configs/efm32-g8xx-stk/nsh/defconfig index 746f23db58e..2aded204150 100644 --- a/configs/efm32-g8xx-stk/nsh/defconfig +++ b/configs/efm32-g8xx-stk/nsh/defconfig @@ -119,6 +119,7 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set # CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set # CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set # # EFM32 Configuration Options @@ -224,6 +225,11 @@ CONFIG_NSH_MMCSDMINOR=0 # Board-Specific Options # +# +# EFM32 G8XX STK Hardware Configuration +# +# CONFIG_EFM32G8STK_BCEN is not set + # # RTOS Features # diff --git a/configs/efm32-g8xx-stk/src/efm32-g8xx-stk.h b/configs/efm32-g8xx-stk/src/efm32-g8xx-stk.h index 0526cdac06e..aa4876007c1 100644 --- a/configs/efm32-g8xx-stk/src/efm32-g8xx-stk.h +++ b/configs/efm32-g8xx-stk/src/efm32-g8xx-stk.h @@ -43,6 +43,22 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* UART0 + * + * The control MCU acts as a board controller (BC). There is a UART + * connection between the EFM and the BC. The connection is made by + * setting the EFM_BC_EN (PD13) line high. The EFM can then use the BSP to + * send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX and EFM_BC_RX + * can be used by other applications. + */ + +#ifdef CONFIG_EFM32G8STK_BCEN +# define GPIO_BC_EN (GPIO_OUTPUT_PUSHPULL|GPIO_OUTPUT_SET|\ + GPIO_PORTD|GPIO_PIN13) +#else +# define GPIO_BC_EN (GPIO_OUTPUT_PUSHPULL|GPIO_OUTPUT_CLEAR|\ + GPIO_PORTD|GPIO_PIN13) +#endif /* LEDs * diff --git a/configs/efm32-g8xx-stk/src/efm32_boot.c b/configs/efm32-g8xx-stk/src/efm32_boot.c index bfb4022f8be..771842b0456 100644 --- a/configs/efm32-g8xx-stk/src/efm32_boot.c +++ b/configs/efm32-g8xx-stk/src/efm32_boot.c @@ -39,8 +39,8 @@ #include +#include "efm32_gpio.h" #include "efm32_start.h" - #include "efm32-g8xx-stk.h" /**************************************************************************** @@ -59,6 +59,17 @@ void efm32_boardinitialize(void) { +#ifdef CONFIG_EFM32_UART0 + /* The control MCU acts as a board controller (BC). There is a UART + * connection between the EFM and the BC. The connection is made by + * setting the EFM_BC_EN (PD13) line high. The EFM can then use the BSP to + * send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX and EFM_BC_RX + * can be used by other applications. + */ + + efm32_configgpio(GPIO_BC_EN); +#endif + #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */