...the world's most energy friendly microcontrollers
2010-11-12 - t0008_1.01
11
www.energymicro.com
Returns instant current usage in milliamperes.
float STK_Voltage(void);
Returns instant voltage (VMCU) reading in volt.
bool STK_EnergyMode(uint8_t em);
Informs the board controller about the Energy Mode (sleep mode) we are going into. This information
can be used by the board controller to present a richer visual graph for illustrating what the EFM32 is
currently doing.
In addition to these main functions, full documentation of the complete API is included in the Doxygen/
HTML documentation of the installed package.
9.3 Example Applications
Under the EFM32_Gxxx_STK/examples folder in your installation directory, you will find an example
program using the BSP, with corresponding project/Makefiles for the supported IDEs.
9.4 How to include in your own applications
The easiest way to include the BSP in your application is to base your work on the example application
that use the BSP. The following items are recommended for correct configuration:
1. Make sure you define the correct part number (i.e. EFM32G890F128) as a preprocessor defined
symbol
2. Make sure you define the correct part number (i.e. EFM32G890F128) for your project file
3. Add and include the EFM32_CMSIS-files (startup_efm32.s, system_efm32.c, core_cm3.c) to your
project
4. Add and include _all_ BSP package .c-files, with the stk-prefix to your project
5. Configure include paths to point at the CMSIS/CM3/CoreSupport and CMSIS/CM3/DeviceSupport/
EnergyMicro/EFM32 directories
6. Configure include paths to point to the EFM32_Gxxx_STK/bsp directory
Make sure you call "STK_Init()" early at startup, and you should be all set.
9.5 Chip errata
Early versions of the development kit are shipped with EFM32 Engineering Samples on the MCU
modules. There has been updates to configuration and reset values that needs to be configured correctly
on these early parts. We recommend always starting your application with a call to
#include "efm32_chip.h"
CHIP_Init();
in the EFM32_CMSIS (version 1.3.0 or later) core package to ensure correct and stable behavior. See
the BSP examples for details. We recommend also to download and read the latest errata from the
Energy Micro website for your part number.