Code Examples

EFM32 Gecko Starter and Development Kit Code Examples

Use Simplicity Studio to access all the code examples available for your Starter- and Development kits. Simplicity Studio Download

Gecko Starter Kit (STK)

blink – Demonstrates the use of the LEDS on the board and is intended as a skeleton for new projects.

clock – Uses the LCD Controller, RTC, VCMP, GPIO and EMU. The RTC wakes up the EFM32 from EM2 every minute and the LCD animation feature shows the seconds passing. The VCMP triggers the LCD voltage boost if the supply voltage drops.

emlcd - Demonstrates the use of the LCD Controller, RTC, GPIO and EMU. The EFM32 switches between Energy Modes (EM0 – EM2) while driving the LCD. The user can also select EM3 or EM4 by pressing PB0 or PB1.

emode – Demonstrates the use of the LCD controller, RTC, GPIO and EMU. The user selects the Energy Mode with PB0 and PB1 pushbuttons when the device starts. It is intended for being demonstrated together with the energyAware Profiler.

energy – Demonstrates the use of the STK BSP functions, which are used to read out the current and VMCU voltage from the board controller and display them on the LCD.

inttemp - Demonstrates the use of the internal temperature sensor and ADC on the EFM32.

mpu – Demonstrates usage of MPU to catch memory access violations. Serial port b is used to create and report on access violations.

touch – Uses the TIMER, ACMP, VCMP, LCD and EMU to demonstrate the capacitive touch capability on the EFM32 and the Starter Kit.

ucos2_port – Example application running on a port of uC/OS-II RTOS from Micrium Inc, http://www.micrium.com.

userpage – Uses the MSC to demonstrate read/write data to the userpage in the EFM32 flash. The user selects a number using PB0 and saves it using PB1.

Gecko Development Kit (DK)

accel – Uses the DK BSP functions together with the ADC and DMA to access the on-board accelerometer. When the user tilts the board the user leds will move accordingly.

blink – Uses the DK BSP and demonstrates the Systick in interrupt driven mode to blink the on-board user leds.

clock – Uses the DK BSP and demonstrates the CMU and EMU. By moving the joystick the user can change clock source, division factor and energy mode.

eeprom – Uses the DK BSP and demonstrates I2C to access the EEPROM on the DK. The user can manipulate the bytes there with the joystick and also reset the values.

emlcd - Demonstrates the use of the LCD Controller, RTC, GPIO and various EMU. The EFM32 switches between Energy Modes (EM0 – EM2) while driving the LCD. The user can also select EM3 or EM4 using the joystick.

emode - Demonstrates the use of the LCD Controller, RTC, GPIO and EMU. In the initial 4 seconds the user can press the joystick to select the various energy modes where the EFM32 will remain after the countdown.

inttemp - Demonstrates the internal temperature sensor and ADC on the EFM32.

irda - Uses the DK BSP to demonstrate the IrDA modulation/demodulation capabilities of USART0.

joystick – Uses the DK BSP to access the joystick movement and indicate the different positions with the user leds.

lcd – Demonstrates the use of the LCD controller and systick timer, which is used for delays. The EFM32 stays in EM0 for the entire demo.

lightsensor – Uses the DK BSP and demonstrates using the ADC to poll the on-board light-sensor. The user leds indicate the amount of light sensed.

mpu – Demonstrates usage of MPU to catch memory access violations. Serial port b is used to create and report on access violations.

peripherals – Uses the DK BSP to toggle the access to the various peripheral devices on the board. When the peripherals are enabled they will have an orange LED lit up.

potentiometer – Uses the DK BSP and demonstrates using the ADC to poll the on-board potentiometer. The potentiometer position will be displayed on the user leds.

preamp – Uses the DK BSP together with ADC, DAC, DMA, PRS and TIMER to implement a simple pre-amplifier. Connect and audio source to AUDIO IN and an active speaker to AUDIO OUT.

rs232a – Uses the DK BSP and demonstrates the use of USART communication. Any data sent using SERIAL A will be echoed back.

rs232b - Uses the DK BSP and demonstrates the use of the LEUART. Any data sent using SERIAL B will be echoed back.

slideshow – Uses the FatFS library to access the file system on a microSDcard using SPI communication. It will display BMP files in the card with a resolution less than the resolution of the TFT display (320x240).

temperature – Uses the DK BSP and demonstrates using the I2C bus to access the on-board temperature sensor. Joystick can select between Fahrenheit and Celcius.

tft – Drives the TFT display with the EFM32. It is accomplished using the EBI (G290) or USART SPI (G890).

ucos2_port – Example application running on a port of uC/OS-II RTOS from Micrium Inc, http://www.micrium.com.

wav_player – This example project uses the DK BSP and demonstrates how to play a wav file from the SD-card using DMA, DAC and PRS.


Find out more on the low-power EFM32 Gecko microcontrollers:
Technology - Products - Tools - Software - Downloads - Support - Buy