EFM32 Leopard Gecko LG-STK3600 User Manual Download Page 13

...the world's most energy friendly microcontrollers

2012-05-31 - t0026_0.11

13

www.energymicro.com

8 Board Support Package

The Board Support Package (BSP) is a set of C source and header files that enables easy access to,
and control over some board specific features.

Compared to the Energy Micro development kit, the functionality is limited. Unless you need/want some
of the functions contained in the BSP, there is really no need to include or use it. The EFM32 in the Starter
Kit is fully usable without BSP support, and you can use all peripherals in the emlib without the BSP.

The BSP use EFM32 peripheral UART0, Location 1 (TX pin PE0, RX pin PE1) on baudrate 115200-8-
N-1 to communicate with the board controller.

Note

The BSP is only functional when the Starter Kit is USB-powered, using these function calls
with USB disconnected will give unpredictable results.

8.1 Installation location

When installing Simplicity Studio, the BSP will be installed in the user directory, typically in a location
such as

Win7: C:\Users\[username]\AppData\Roaming\energymicro\kits\EFM32LG_STK3600\

or something similar (depending on your OS/Windows version). All files in the board support package
are prefixed by stk.

8.2 Application Programming Interface

To use the BSP, include the Starter Kit header file, like this:

#include "stk.h"

All functions in the BSP are prefixed with STK_. The main initialization routine is defined as

void STK_Init(void);

and  must  be  called  before  any  access  to  the  STK-functions.  This  function  call  will  setup  the  UART
communication channel with a 115800 baud rate. This baud rate depends on the current core clock, so
correct clock configuration should be set before calling this function.

bool STK_Ready(void)

Returns  true  if  the  board  controller  is  responding.  A  non-responding  board  will  either  return  false,  or
hang (i.e. if the EFM32 is powered by the CR2032 battery cell).

float STK_Current(void);

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.

Summary of Contents for Leopard Gecko LG-STK3600

Page 1: ...lication development for the EFM32 Leopard Gecko MCU family with the ARM Cortex M3 CPU core Main features Advanced Energy Monitoring provides real time information about the energy consumption of an a...

Page 2: ...battery 2 user buttons 2 user LEDs and a touch slider Ambient Light Sensor and Inductive capacitive metal sensor EFM32 OPAMP footprint 32 MB NAND Flash USB Micro AB OTG connector 0 03F Super Capacito...

Page 3: ...eopard Gecko Starter Kit is shown in Figure 2 1 p 3 Figure 2 1 EFM32LG STK3600 Block Diagram 32Mx8 NAND Flash USB Mini B Connector EFM32 Leopard Gecko Microcontroller Device Host GPIO EBI ACMP LESENSE...

Page 4: ...Leopard Gecko Starter Kit is shown below Figure 3 1 EFM32LG STK3600 hardware layout Expansion Header Debug Header EFM32 Reset Touch Slider Ambient Light Sensor User Push buttons BU Capacitor EFM32 De...

Page 5: ...ergy Monitor is now also connected in series allowing accurate high speed current measurements and energy debugging profiling With the switch in the USB position the integrated linear regulator in the...

Page 6: ...p mode while the Board Controller is powered by selecting either BAT or USB with no battery in the socket or USB cable in the connector 4 4 MCU Reset The EFM32 MCU can be reset by a few different sour...

Page 7: ...PE3 in an active high configuration Figure 5 1 Buttons LEDs User Buttons LEDs UIF_LED0 UIF_LED1 UIF_PB0 UIF_PB1 PB9 PB10 PE2 PE3 EFM32 MCU 5 2 LCD A 28 pin Energy Micro LCD display is connected to the...

Page 8: ...evels Figure 5 4 Light Sensor LIGHT_EXCITE LIGHT_SENSE 22K TEMT6200FX01 PD6 LES_ALTEX0 PC6 ACMP0_CH6 EFM32 MCU Two pins are used for the light sensor operation one for excitation and one for sensing T...

Page 9: ...to evaluate the EFM32 Leopard Gecko MCU s backup power domain The capacitor has a nominal value of 33 mF and is connected with a 100 ohm series resistor to the BU_VIN pin of the EFM32 Because of the...

Page 10: ...B_VREGI USB_VREGO 4 7uF 1uF VBUS Enable 5V PF5 USB_VBUSEN VBUS D D ID Overcurrent 5 9 Op Amp Footprint If the kit is flipped over there is a silk print model of a typical operational amplifier feedbac...

Page 11: ...ccurs around 250uA Digital filtering and averaging is done within the Board Controller before the samples are exported to the energyAware Profiler application During startup of the kit an automatic ca...

Page 12: ...oller in the form of a UART connection The connection is enabled by setting the EFM_BC_EN PF7 line high and using the lines EFM_BC_TX PE0 and EFM_BC_RX PE1 for communicating Specific library functions...

Page 13: ...ata Roaming energymicro kits EFM32LG_STK3600 or something similar depending on your OS Windows version All files in the board support package are prefixed by stk 8 2 Application Programming Interface...

Page 14: ...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...

Page 15: ...E T S W D I O S W O 5 V P B 1 0 P B 9 G N D P B 1 1 P B 1 2 P D 1 5 G N D P D 0 P D 1 P D 2 P D 3 P D 4 P D 5 G N D P D 6 P D 7 P D 8 P D 1 3 P D 1 4 V M C U 3 V 3 Debug Pins Expansion Header 19 17 1...

Page 16: ...Header pin number USART1_TX PD0 4 USART1_RX PD1 6 USART1_CLK PD2 8 USART SPI USART1_CS PD3 10 I2C1_SDA PC4 7 I C I2C1_SCL PC5 9 LEUART0_TX PD4 12 Low Energy UART LEUART0_RX PD5 14 ADC0_CH0 PD0 4 ADC0_...

Page 17: ...re TIMER1_CC2 PB11 11 LETIM0_OUT0 PD6 PB11 PC4 16 11 7 Low Energy Timer LETIM0_OUT1 PD7 PB12 PC5 15 13 9 LES_CH0 PC0 3 LES_CH3 PC3 5 LES_CH4 PC4 7 LES_CH5 PC5 9 LES_CH6 PC6 17 LES_ALTEX0 PD6 16 Low En...

Page 18: ...or Serial Wire clock 11 RTCK JTAG RTCK 13 TDO SWO JTAG TDO or Serial Wire Output 15 RESET Target MCU reset 17 PD This pin has a 100k pulldown 18 Cable detect This signal must be pulled to ground by th...

Page 19: ...Output 4 SWCLK TCK Serial Wire Clock input 6 SWO TDO Serial Wire Output trace port 8 TDI Not Connected on the EFM32LG STK3600 10 nRESET Target CPU reset signal 12 TRACECLK Trace clock output Trace cl...

Page 20: ...bugger is connected to EFM32 on the EFM32LG STK3600 Debug IN In this mode the on board debugger is disconnected and an external debugger can be connected to debug the EFM32 on the EFM32LG STK3600 Debu...

Page 21: ...on how to use it You will find the IAR project file in the iar subfolder of each project 11 2 Rowley Associates CrossWorks for ARM See the quick start guide for download details for CrossWorks for ARM...

Page 22: ...e the kit lock and unlock devices and more Some of the features will only work with Energy Micro kits while other will work with a J Link debugger connected Press the F1 button or select the Help Help...

Page 23: ...26_0 11 23 www energymicro com 13 Schematics Assy Drawings and BOM The schematics assembly drawings and bill of materials BOM for the EFM32 Leopard Gecko Starter Kit board is available through Simplic...

Page 24: ...duction version A02 15 05 2012 Updated PCB to add test points for EFM32 USB 14 2 Errata Table 14 2 Kit Errata Kit Revision Problem Description A01 Footprint of C250 is wrong One of the capacitors on t...

Page 25: ...rollers 2012 05 31 t0026_0 11 25 www energymicro com 15 Document Revision History 15 1 Revision 0 11 2012 05 31 Fixed error in expansion header pinout shown in Figure 9 1 p 15 15 2 Revision 0 10 2012...

Page 26: ...y Micro shall have no liability for the consequences of use of the information supplied herein This document does not imply or express copyright licenses granted hereunder to design or fabricate any i...

Page 27: ...AY Energy Micro AS Sandakerveien 118 N 0484 Oslo NORWAY support energymicro com Phone 47 40 10 03 01 www energymicro com Phone 47 23 00 98 00 Fax 47 23 00 98 01 B 2 Global Contacts Visit www energymic...

Page 28: ...ge 13 8 1 Installation location 13 8 2 Application Programming Interface 13 8 3 Example Applications 14 8 4 How to include in your own applications 14 9 Connectors 15 9 1 Breakout pads 15 9 2 Expansio...

Page 29: ...G STK3600 hardware layout 4 4 1 EFM32LG STK3600 Power Switch 5 5 1 Buttons LEDs 7 5 2 160 Segment LCD 7 5 3 Touch Slider 8 5 4 Light Sensor 8 5 5 LC Metal Sensor 8 5 6 NAND Flash Interface 9 5 7 EFM32...

Page 30: ...s 2012 05 31 t0026_0 11 30 www energymicro com List of Tables 9 1 Some peripheral functions available on Expansion Header 16 9 2 Debug connector pinout 18 9 3 Trace header pinout 19 10 1 Debug modes 2...

Page 31: ......

Reviews: