Add logic to manage BC_EN signal
This commit is contained in:
parent
fa0a5d506c
commit
7906fe0d4f
@ -5,6 +5,16 @@
|
|||||||
|
|
||||||
if ARCH_BOARD_EFM32G8XXSTK
|
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
|
endif # ARCH_BOARD_EFM32G8XXSTK
|
||||||
|
@ -5,8 +5,8 @@ README
|
|||||||
Gecko Starter Kit (EFM32-G8XX-STK). The Gecko Starter Kit features:
|
Gecko Starter Kit (EFM32-G8XX-STK). The Gecko Starter Kit features:
|
||||||
|
|
||||||
• EFM32G890F128 MCU with 128 kB flash and 16 kB RAM
|
• EFM32G890F128 MCU with 128 kB flash and 16 kB RAM
|
||||||
• 32.768 kHz crystal
|
• 32.768 kHz crystal (LXFO)
|
||||||
• 32 MHz crystal
|
• 32 MHz crystal (HXFO)
|
||||||
• Advanced Energy Monitoring
|
• Advanced Energy Monitoring
|
||||||
• Touch slider
|
• Touch slider
|
||||||
• 4x40 LCD
|
• 4x40 LCD
|
||||||
@ -14,7 +14,7 @@ README
|
|||||||
• 2 pushbutton switches
|
• 2 pushbutton switches
|
||||||
• Reset button and a switch to disconnect the battery.
|
• Reset button and a switch to disconnect the battery.
|
||||||
• On-board SEGGER J-Link USB emulator
|
• 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
|
STATUS
|
||||||
======
|
======
|
||||||
@ -129,13 +129,13 @@ Serial Console
|
|||||||
------------------------------------------
|
------------------------------------------
|
||||||
The control MCU acts as a board controller (BC). There is a UART
|
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
|
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
|
setting the EFM_BC_EN (PD13) line high. The EFM can then use the BSP to
|
||||||
commands to the BC. When BC_EN is low, BC_TX and BC_RX can be used
|
send commands to the BC. When EFM_BC_EN is low, EFM_BC_TX and EFM_BC_RX
|
||||||
by other applications.
|
can be used by other applications.
|
||||||
|
|
||||||
Configurations
|
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:
|
and can be selected as follow:
|
||||||
|
|
||||||
cd tools
|
cd tools
|
||||||
@ -154,8 +154,8 @@ Configurations
|
|||||||
---
|
---
|
||||||
Configures the NuttShell (nsh) located at apps/examples/nsh. The
|
Configures the NuttShell (nsh) located at apps/examples/nsh. The
|
||||||
Configuration enables the serial interfaces on UART0. Support for
|
Configuration enables the serial interfaces on UART0. Support for
|
||||||
builtin applications is enabled, but in the base configuration no
|
built-in applications is enabled, but in the base configuration no
|
||||||
builtin applications are selected (see NOTES below).
|
built-in applications are selected (see NOTES below).
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
|
|
||||||
|
@ -119,6 +119,7 @@ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y
|
|||||||
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set
|
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL is not set
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set
|
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIW is not set
|
||||||
# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set
|
# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set
|
||||||
|
# CONFIG_ARMV7M_ITMSYSLOG is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# EFM32 Configuration Options
|
# EFM32 Configuration Options
|
||||||
@ -224,6 +225,11 @@ CONFIG_NSH_MMCSDMINOR=0
|
|||||||
# Board-Specific Options
|
# Board-Specific Options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# EFM32 G8XX STK Hardware Configuration
|
||||||
|
#
|
||||||
|
# CONFIG_EFM32G8STK_BCEN is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# RTOS Features
|
# RTOS Features
|
||||||
#
|
#
|
||||||
|
@ -43,6 +43,22 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* 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
|
/* LEDs
|
||||||
*
|
*
|
||||||
|
@ -39,8 +39,8 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include "efm32_gpio.h"
|
||||||
#include "efm32_start.h"
|
#include "efm32_start.h"
|
||||||
|
|
||||||
#include "efm32-g8xx-stk.h"
|
#include "efm32-g8xx-stk.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
@ -59,6 +59,17 @@
|
|||||||
|
|
||||||
void efm32_boardinitialize(void)
|
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
|
#ifdef CONFIG_ARCH_LEDS
|
||||||
/* Configure on-board LEDs if LED support has been selected. */
|
/* Configure on-board LEDs if LED support has been selected. */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user