EFM32 Giant Gecko Software Documentation  efm32gg-doc-4.2.1
Common BSP for all kits

Macros

#define BSP_STATUS_OK   0
 
#define BSP_STATUS_ILLEGAL_PARAM   (-1)
 
#define BSP_STATUS_NOT_IMPLEMENTED   (-2)
 
#define BSP_STATUS_UNSUPPORTED_MODE   (-3)
 
#define BSP_INIT_DK_SPI   0x01
 
#define BSP_INIT_DK_EBI   0x02
 
#define BSP_INIT_BCC   0x04
 

Functions

int BSP_Disable (void)
 
int BSP_Init (uint32_t flags)
 
int BSP_LedClear (int ledNo)
 
int BSP_LedGet (int ledNo)
 
int BSP_LedSet (int ledNo)
 
uint32_t BSP_LedsGet (void)
 
int BSP_LedsInit (void)
 
int BSP_LedsSet (uint32_t leds)
 
int BSP_LedToggle (int ledNo)
 
bool BSP_TraceProfilerSetup (void)
 Profiler configuration. More...
 
void BSP_TraceSwoSetup (void)
 Configure trace output for energyAware Profiler. More...
 
__STATIC_INLINE void BSP_TraceProfilerEnable (bool enable)
 Set or clear word in user page which enables or disables SWO in BSP_TraceProfilerSetup. If BSP_TraceProfilerEnable(false) has been run, no example project will enable SWO trace. More...
 

Detailed Description

Macro Definition Documentation

#define BSP_STATUS_OK   0
#define BSP_STATUS_ILLEGAL_PARAM   (-1)

BSP API return code, illegal input parameter.

Definition at line 41 of file bsp.h.

#define BSP_STATUS_NOT_IMPLEMENTED   (-2)

BSP API return code, function not implemented (dummy).

Definition at line 42 of file bsp.h.

Referenced by BSP_EbiDeInit(), BSP_EbiInit(), BSP_McuBoard_UsbStatusLedEnable(), and BSP_McuBoard_UsbVbusPowerEnable().

#define BSP_STATUS_UNSUPPORTED_MODE   (-3)

BSP API return code, unsupported BSP mode.

Definition at line 43 of file bsp.h.

#define BSP_INIT_DK_SPI   0x01

Mode flag for BSP_Init(), init DK in SPI mode (DK3x50 only).

Definition at line 46 of file bsp.h.

#define BSP_INIT_DK_EBI   0x02

Mode flag for BSP_Init(), init DK in EBI mode (DK3x50 only).

Definition at line 47 of file bsp.h.

#define BSP_INIT_BCC   0x04

Mode flag for BSP_Init(), init board controller communication.

Definition at line 48 of file bsp.h.

Function Documentation

bool BSP_TraceProfilerSetup ( void  )
Returns
true if energyAware Profiler/SWO is enabled, false if not
Note
If first word of the user page is zero, this will not enable SWO profiler output.

Definition at line 128 of file bsp_trace.c.

References BSP_TraceSwoSetup().

void BSP_TraceSwoSetup ( void  )
Note
Enabling trace will add 80uA current for the EFM32_Gxxx_STK. DK's needs to be initialized with SPI-mode:
BSP_Init(BSP_INIT_DK_SPI); 

Definition at line 63 of file bsp_trace.c.

References _GPIO_ROUTE_SWLOCATION_MASK, CMU, CMU_HFPERCLKEN0_GPIO, CMU_OSCENCMD_AUXHFRCOEN, CMU_STATUS_AUXHFRCORDY, GPIO, and GPIO_ROUTE_SWOPEN.

Referenced by BSP_TraceProfilerSetup().

__STATIC_INLINE void BSP_TraceProfilerEnable ( bool  enable)
Parameters
[in]enable
Note
Add "em_msc.c" to build to use this function.

Definition at line 62 of file bsp_trace.h.

References MSC_ErasePage(), MSC_Init(), and MSC_WriteWord().