...the world's most energy friendly microcontrollers
EFM32TG Reference Manual
Tiny Gecko Series
• 32-bit ARM Cortex-M3 processor running at up to 32 MHz
• Up to 32 kB Flash and 4 kB RAM memory
• Energy efficient and autonomous peripherals
• Ultra low power Energy Modes with sub-µA operation
• Fast wake-up time of only 2 µs
The EFM32TG microcontroller series revolutionizes the 8- to 32-bit market with a
combination of unmatched performance and ultra low power consumption in both
active- and sleep modes. EFM32TG devices consume as little as 150 µA/MHz in run
mode, and as little as 1.0 µA with a Real Time Counter running, Brown-out and full
RAM and register retention.
EFM32TG's low energy consumption outperforms any other available 8-, 16-,
and 32-bit solution. The EFM32TG includes autonomous and energy efficient
peripherals, high overall chip- and analog integration, and the performance of the
industry standard 32-bit ARM Cortex-M3 processor.
...the world's most energy friendly microcontrollers
1 Energy Friendly Microcontrollers
1.1 Typical Applications
The EFM32TG Tiny Gecko is the ideal choice for demanding 8-, 16-, and 32-bit energy sensitive
applications. These devices are developed to minimize the energy consumption by lowering both the
power and the active time, over all phases of MCU operation. This unique combination of ultra low energy
consumption and the performance of the 32-bit ARM Cortex-M3 processor, help designers get more out
of the available energy in a variety of applications.
Ultra low energy EFM32TG microcontrollers are perfect for:
• Gas metering
• Energy metering
• Water metering
• Smart metering
• Alarm and security systems
• Health and fitness applications
• Industrial and home automation
1234
0
1.2 EFM32TG Development
Because EFM32TG use the Cortex-M3 CPU, embedded designers benefit from the largest development
ecosystem in the industry, the ARM ecosystem. The development suite spans the whole design
process and includes powerful debug tools, and some of the world’s top brand compilers. Libraries with
documentation and user examples shorten time from idea to market.
The range of EFM32TG devices ensure easy migration and feature upgrade possibilities.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.202
www.silabs.com
...the world's most energy friendly microcontrollers
2 About This Document
This document contains reference material for the EFM32TG series of microcontrollers. All modules and
peripherals in the EFM32TG series devices are described in general terms. Not all modules are present
in all devices, and the feature set for each device might vary. Such differences, including pin-out, are
covered in the device-specific datasheets.
2.1 Conventions
Register Names
Register names are given as a module name prefix followed by the short register name:
TIMERn_CTRL - Control Register
The "n" denotes the numeric instance for modules that might have more than one instance.
Some registers are grouped which leads to a group name following the module prefix:
GPIO_Px_DOUT - Port Data Out Register,
where x denotes the port instance (A,B,...).
Bit Fields
Registers contain one or more bit fields which can be 1 to 32 bits wide. Multi-bit fields are denoted with
(x:y), where x is the start bit and y is the end bit.
Address
The address for each register can be found by adding the base address of the module (found in the
Memory Map), and the offset address for the register (found in module Register Map).
Access Type
The register access types used in the register descriptions are explained in Table 2.1 (p. 3) .
Table 2.1. Register Access Types
Access TypeDescription
RRead only. Writes are ignored.
RWReadable and writable.
RW1Readable and writable. Only writes to 1 have effect.
RW1HReadable, writable and updated by hardware. Only writes to
1 have effect.
W1Read value undefined. Only writes to 1 have effect.
WWrite only. Read value undefined.
RWHReadable, writable and updated by hardware.
Number format
0x prefix is used for hexadecimal numbers.
0b prefix is used for binary numbers.
Numbers without prefix are in decimal representation.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.203
www.silabs.com
...the world's most energy friendly microcontrollers
Reserved
Registers and bit fields marked with reserved are reserved for future use. These should be written to 0
unless otherwise stated in the Register Description. Reserved bits might be read as 1 in future devices.
Reset Value
The reset value denotes the value after reset.
Registers denoted with X have an unknown reset value and need to be initialized before use. Note
that, before these registers are initialized, read-modify-write operations might result in undefined register
values.
Pin Connections
Pin connections are given as a module prefix followed by a short pin name:
USn_TX (USARTn TX pin)
The pin locations referenced in this document are given in the device-specific datasheet.
2.2 Related Documentation
Further documentation on the EFM32TG family and the ARM Cortex-M3 can be found at the Silicon
Laboratories and ARM web pages:
www.silabs.com
www.arm.com
2014-07-02 - Tiny Gecko Family - d0034_Rev1.204
www.silabs.com
...the world's most energy friendly microcontrollers
3 System Overview
3.1 Introduction
The EFM32 MCUs are the world’s most energy friendly microcontrollers. With a unique combination of
the powerful 32-bit ARM Cortex-M3, innovative low energy techniques, short wake-up time from energy
saving modes, and a wide selection of peripherals, the EFM32TG microcontroller is well suited for
any battery operated application, as well as other systems requiring high performance and low-energy
consumption, see Figure 3.1 (p. 7) .
3.2 Features
• ARM Cortex-M3 CPU platform
• High Performance 32-bit processor @ up to 32 MHz
• Wake-up Interrupt Controller
• Flexible Energy Management System
• 20 nA @ 3 V Shutoff Mode
• 0.6 µA @ 3 V Stop Mode, including Power-on Reset, Brown-out Detector, RAM and CPU
retention
• 1.0 µA @ 3 V Deep Sleep Mode, including RTC with 32.768 kHz oscillator, Power-on
Reset, Brown-out Detector, RAM and CPU retention
• 51 µA/MHz @ 3 V Sleep Mode
• 150 µA/MHz @ 3 V Run Mode, with code executed from flash
• SPI/SmartCard (ISO 7816)/IrDA (USART0)/I2S (USART1)
• Triple buffered full/half-duplex operation
• 4-16 data bits
• 1× Low Energy UART
• Autonomous operation with DMA in Deep Sleep Mode
• 1× I2C Interface with SMBus support
• Address recognition in Stop Mode
• Timers/Counters
• 2× 16-bit Timer/Counter
• 3 Compare/Capture/PWM channels
• 16-bit Low Energy Timer
• 24-bit Real-Time Counter
• 1× 16-bit Pulse Counter
2014-07-02 - Tiny Gecko Family - d0034_Rev1.205
www.silabs.com
...the world's most energy friendly microcontrollers
• Asynchronous pulse counting/quadrature decoding
• Watchdog Timer with dedicated RC oscillator @ 50 nA
• Ultra low power precision analog peripherals
• 12-bit 1 Msamples/s Analog to Digital Converter
• 8 input channels and on-chip temperature sensor
• Single ended or differential operation
• Conversion tailgating for predictable latency
• 12-bit 500 ksamples/s Digital to Analog Converter
• 2 single ended channels/1 differential channel
• Up to 3 Operational Amplifiers
• Supports rail-to-rail inputs and outputs
• Programmable gain
• 2× Analog Comparator
• Programmable speed/current
• Capacitive sensing with up to 8 inputs
• Supply Voltage Comparator
• Ultra low power sensor interface
• Autonomous sensor monitoring in Deep Sleep Mode
• Wide range of sensors supported, including LC sensors and capacitive buttons
• Ultra efficient Power-on Reset and Brown-Out Detector
• 2-pin Serial Wire Debug interface
• 1-pin Serial Wire Viewer
• Temperature range -40 - 85°C
• Single power supply 1.98 - 3.8 V
• Packages
• QFN24
• QFN32
• QFN64
• TQFP48
• TQFP64
3.3 Block Diagram
Figure 3.1 (p. 7) shows the block diagram of EFM32TG. The color indicates peripheral availability
in the different energy modes, described in Section 3.4 (p. 7) .
2014-07-02 - Tiny Gecko Family - d0034_Rev1.206
www.silabs.com
Figure 3.1. Block Diagram of EFM32TG
Clock ManagementEnergy Management
Serial Interfaces
I/O Ports
Core and Memory
Timers/ TriggersAnalog InterfacesSecurity
32-bit bus
Peripheral Reflex System
ARM Cortex- M3 processor
Flash
Memory
LESENSE
High Frequency
RC
Oscillator
High Frequency
Crystal
Oscillator
Timer/
Counter
Low Energy
Timer
Pulse
Counter
Real Time
Counter
Low Frequency
Crystal
Oscillator
Low Frequency
RC
Oscillator
LCD
Controller
Voltage
Regulator
Watchdog
Timer
RAM
Memory
Voltage
Comparator
Power-on
Reset
Brown-out
Detector
General
Purpose
I/ O
Low
Energy
UART
Watchdog
Oscillator
ADC
DAC
DMA
Controller
Debug
Interface
External
Interrupts
Pin
Reset
USART
I
2
C
AES
Tiny Gecko
Operational
Amplifier
Analog
Comparator
...the world's most energy friendly microcontrollers
Figure 3.2. Energy Mode Indicator
Note
In the energy mode indicator, the numbers indicates Energy Mode, i.e EM0-EM4.
3.4 Energy Modes
There are five different Energy Modes (EM0-EM4) in the EFM32TG, see Table 3.1 (p. 8) . The
EFM32TG is designed to achieve a high degree of autonomous operation in low energy modes. The
intelligent combination of peripherals, RAM with data retention, DMA, low-power oscillators, and short
wake-up time, makes it attractive to remain in low energy modes for long periods and thus saving energy
consumption.
Tip
Throughout this document, the first figure in every module description contains an Energy Mode
Indicator showing which energy mode(s) the module can operate (see Table 3.1 (p. 8) ).
2014-07-02 - Tiny Gecko Family - d0034_Rev1.207
1 2 34
0
www.silabs.com
Table 3.1. Energy Mode Description
Energy ModeNameDescription
...the world's most energy friendly microcontrollers
1 2 3 4
0
1 2 3 4
0
1 2 3 4
0
1 2 3 4
0
EM0 – Energy Mode 0
(Run mode)
EM1 – Energy Mode 1
(Sleep Mode)
EM2 – Energy Mode 2
(Deep Sleep Mode)
EM3 - Energy Mode 3
(Stop Mode)
In EM0, the CPU is running and consuming as little as 150 µA/MHz, when
running code from flash. All peripherals can be active.
In EM1, the CPU is sleeping and the power consumption is only 51 µA/MHz.
All peripherals, including DMA, PRS and memory system, are still available.
In EM2 the high frequency oscillator is turned off, but with the 32.768 kHz
oscillator running, selected low energy peripherals (LCD, RTC, LETIMER,
PCNT, LEUART, I2C, LESENSE, OPAMP, WDOG and ACMP) are still
available. This gives a high degree of autonomous operation with a current
consumption as low as 1.0 µA with RTC enabled. Power-on Reset, Brown-out
Detection and full RAM and CPU retention is also included.
In EM3, the low-frequency oscillator is disabled, but there is still full CPU
and RAM retention, as well as Power-on Reset, Pin reset, EM4 wake-up
and Brown-out Detection, with a consumption of only 0.6 µA. The low-power
ACMP, asynchronous external interrupt, PCNT, and I2C can wake-up the
device. Even in this mode, the wake-up time is a few microseconds.
1 2 3 4
0
EM4 – Energy Mode 4
(Shutoff Mode)
In EM4, the current is down to 20 nA and all chip functionality is turned off
except the pin reset, GPIO pin wake-up, GPIO pin retention and the PowerOn Reset. All pins are put into their reset state.
3.5 Product Overview
Table 3.2 (p. 8) shows a device overview of the EFM32TG Microcontroller Series, including
peripheral functionality. For more information, the reader is referred to the device specific datasheets.
Table 3.2. EFM32TG Microcontroller Series
C
EFM32TG Part
#
108F44117-111
108F88217-111
108F1616417-111
108F3232417-111
Flash
RAM
GPIO(pins)
LCD
USART
2
LEUART
I
Timer(PWM)
LETIMER
RTC
PCNT
2
1111--
(6)
2
1111--
(6)
2
1111--
(6)
2
1111--
(6)
Watchdog
ADC(pins)
DAC(pins)
ACMP(pins)
2
(4)
2
(4)
2
(4)
2
(4)
AES
EBI
LESENSE
Op-Amps
--Y-QFN24
--Y-QFN24
--Y-QFN24
--Y-QFN24
Package
2014-07-02 - Tiny Gecko Family - d0034_Rev1.208
www.silabs.com
EFM32TG Part
#
110F44117-111
110F88217-111
110F1616417-111
110F3232417-111
210F88224-211
210F1616424-211
210F3232424-211
222F88237-211
222F1616437-211
222F3232437-211
225F88237-211
225F1616437-211
225F3232437-211
230F88256-211
230F1616456-211
230F3232456-211
232F88253-211
232F1616453-211
232F3232453-211
822F88237Y211
822F1616437Y211
822F3232437Y211
825F88237Y211
825F1616437Y211
825F3232437Y211
840F88256Y211
840F1616456Y211
Flash
RAM
GPIO(pins)
LCD
USART
LEUART
C
2
I
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
(6)
...the world's most energy friendly microcontrollers
Timer(PWM)
LETIMER
RTC
PCNT
Watchdog
ADC(pins)
DAC(pins)
ACMP(pins)
AES
EBI
LESENSE
Op-Amps
2
11111 (2)
2
11111 (2)
2
11111 (2)
2
11111 (2)
2
11111 (4)
2
11111 (4)
2
11111 (4)
2
11111 (4)
2
11111 (4)
2
11111 (4)
2
11111 (4)
2
11111 (4)
2
11111 (4)
2
11111 (8)
2
11111 (8)
2
11111 (8)
2
11111 (8)
2
11111 (8)
2
11111 (8)
2
11111 (5)
2
11111 (5)
2
11111 (5)
2
11111 (5)
2
11111 (5)
2
11111 (5)
2
11111 (8)
2
11111 (8)
2
(1)2(4)
2
(1)2(4)
2
(1)2(4)
2
(1)2(4)
2
(1)2(5)
2
(1)2(5)
2
(1)2(5)
2
(1)2(12)
2
(1)2(12)
2
(1)2(12)
2
(1)2(12)
2
(1)2(12)
2
(1)2(12)
2
(2)2(16)
2
(2)2(16)
2
(2)2(16)
2
(2)2(16)
2
(2)2(16)
2
(2)2(16)
2
(1)2(4)
2
(1)2(4)
2
(1)2(4)
2
(1)2(4)
2
(1)2(4)
2
(1)2(4)
2
(2)2(8)
2
(2)2(8)
Y-Y3QFN24
Y-Y3QFN24
Y-Y3QFN24
Y-Y3QFN24
Y-Y3QFN32
Y-Y3QFN32
Y-Y3QFN32
Y-Y3QFP48
Y-Y3QFP48
Y-Y3QFP48
Y-Y3BGA48
Y-Y3BGA48
Y-Y3BGA48
Y-Y3QFN64
Y-Y3QFN64
Y-Y3QFN64
Y-Y3QFP64
Y-Y3QFP64
Y-Y3QFP64
Y-Y3QFP48
Y-Y3QFP48
Y-Y3QFP48
Y-Y3BGA48
Y-Y3BGA48
Y-Y3BGA48
Y-Y3QFN64
Y-Y3QFN64
Package
2014-07-02 - Tiny Gecko Family - d0034_Rev1.209
www.silabs.com
...the world's most energy friendly microcontrollers
C
EFM32TG Part
#
840F3232456Y211
842F88253Y211
842F1616453Y211
842F3232453Y211
Flash
RAM
GPIO(pins)
LCD
USART
2
LEUART
I
Timer(PWM)
LETIMER
RTC
2
11111 (8)
(6)
2
11111 (8)
(6)
2
11111 (8)
(6)
2
11111 (8)
(6)
PCNT
Watchdog
ADC(pins)
DAC(pins)
ACMP(pins)
2
(2)2(8)
2
(2)2(8)
2
(2)2(8)
2
(2)2(8)
AES
EBI
LESENSE
Op-Amps
Y-Y3QFN64
Y-Y3QFP64
Y-Y3QFP64
Y-Y3QFP64
3.6 Device Revision
The device revision number is read from the ROM Table. The major revision number and the chip family
number is read from PID0 and PID1 registers. The minor revision number is extracted from the PID2 and
PID3 registers, as illustrated in Figure 3.3 (p. 10) . The Fam[5:2] and Fam[1:0] must be combined
to complete the chip family number, while the Minor Rev[7:4] and Minor Rev[3:0] must be combined to
form the complete revision number.
Package
Figure 3.3. Revision Number Extraction
PID2 (0xE00FFFE8)
31:87:4
3:0
Minor Rev[7:4]
PID0 (0xE00FFFE0)
31:76:5
Fam[1:0]Fam[5:2]
5:0
Major Rev[5:0]
PID3 (0xE00FFFEC)
31:87:4
Minor Rev[3:0]
PID1 (0xE00FFFE4)
31:4
3:0
3:0
For the latest revision of the Tiny Gecko family, the chip family number is 0x01 and the major revision
number is 0x01. The minor revision number is to be interpreted according to Table 3.3 (p. 10) .
Table 3.3. Minor Revision Number Interpretation
Minor Rev[7:0]Revision
0x00A
0x01B
0x02C
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2010
www.silabs.com
4 System Processor
1 2 3 4
0
...the world's most energy friendly microcontrollers
Quick Facts
What?
The industry leading Cortex-M3 processor
from ARM is the CPU in the EFM32TG
microcontrollers.
Why?
The ARM Cortex-M3 is designed for
exceptional short response time, high
code density, and high 32-bit throughput
while maintaining a strict cost and power
consumption budget.
How?
Combined with the ultra low energy
peripherals available, the Cortex-M3 makes
the EFM32TG devices perfect for 8- to 32bit applications. The processor is featuring a
Harvard architecture, 3 stage pipeline, single
cycle instructions, Thumb-2 instruction set
support, and fast interrupt handling.
4.1 Introduction
The ARM Cortex-M3 32-bit RISC processor provides outstanding computational performance and
exceptional system response to interrupts while meeting low cost requirements and low power
consumption.
The ARM Cortex-M3 implemented is revision r2p1.
4.2 Features
• Harvard Architecture
• Separate data and program memory buses (No memory bottleneck as for a single-bus system)
• 3-stage pipeline
• Thumb-2 instruction set
• Enhanced levels of performance, energy efficiency, and code density
• Single-cycle multiply and efficient divide instructions
• 32-bit multiplication in a single cycle
• Signed and unsigned divide operations between 2 and 12 cycles
• Atomic bit manipulation with bit banding
• Direct access to single bits of data
• Two 1MB bit banding regions for memory and peripherals mapping to 32MB alias regions
• Atomic operation which cannot be interrupted by other bus activities
• 1.25 DMIPS/MHz
• 24-bit System Tick Timer for Real-Time Operating System (RTOS)
• Excellent 32-bit migration choice for 8/16 bit architecture based designs
• Simplified stack-based programmer's model is compatible with traditional ARM architecture and
retains the programming simplicity of legacy 8- and 16-bit architectures
• Unaligned data storage and access
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2011
www.silabs.com
...the world's most energy friendly microcontrollers
• Continuous storage of data requiring different byte lengths
• Data access in a single core clock cycle
• Integrated power modes
• Sleep Now mode for immediate transfer to low power state
• Sleep on Exit mode for entry into low power state after the servicing of an interrupt
• Ability to extend power savings to other system components
• Optimized for low latency, nested interrupts
4.3 Functional Description
For a full functional description of the ARM Cortex-M3 (r2p1) implementation in the EFM32TG family,
the reader is referred to the EFM32 Cortex-M3 Reference Manual.
4.3.1 Interrupt Operation
Figure 4.1. Interrupt Operation
ModuleCortex- M3 NVIC
IFS[n]IFC[n]
Interrupt
condition
set clear
IF[n]
IEN[n]
IRQ
SETENA[n]/ CLRENA[n]
Active interrupt
setclear
SETPEND[n]/ CLRPEND[n]
Software generated interrupt
Interrupt
request
The EFM32TG devices have up to 23 interrupt request lines (IRQ) which are connected to the CortexM3. Each of these lines (shown in Table 4.1 (p. 12) ) are connected to one or more interrupt flags in
one or more modules. The interrupt flags are set by hardware on an interrupt condition. It is also possible
to set/clear the interrupt flags through the IFS/IFC registers. Each interrupt flag is then qualified with its
own interrupt enable bit (IEN register), before being OR'ed with the other interrupt flags to generate the
IRQ. A high IRQ line will set the corresponding pending bit (can also be set/cleared with the SETPEND/
CLRPEND bits in ISPR0/ICPR0) in the Cortex-M3 NVIC. The pending bit is then qualified with an enable
bit (set/cleared with SETENA/CLRENA bits in ISER0/ICER0) before generating an interrupt request to
the core. Figure 4.1 (p. 12) illustrates the interrupt system. For more information on how the interrupts
are handled inside the Cortex-M3, the reader is referred to the EFM32 Cortex-M3 Reference Manual.
...the world's most energy friendly microcontrollers
5 Memory and Bus System
1 2 3 4
0
Flash
ARM Cortex- M3
RAM
Peripherals
DMA Controller
Quick Facts
What?
A low latency memory system, including low
energy flash and RAM with data retention,
makes extended use of low-power energymodes possible.
Why?
RAM retention reduces the need for storing
data in flash and enables frequent use of the
ultra low energy modes EM2 and EM3 with
as little as 0.6 µA current consumption.
How?
Low energy and non-volatile flash memory
stores program and application data
in all energy modes and can easily be
reprogrammed in system. Low leakage RAM,
with data retention in EM0 to EM3, removes
the data restore time penalty, and the DMA
ensures fast autonomous transfers with
predictable response time.
5.1 Introduction
The EFM32TG contains an AMBA AHB Bus system allowing bus masters to access the memory mapped
address space. A multilayer AHB bus matrix, using a Round-robin arbitration scheme, connects the
master bus interfaces to the AHB slaves (Figure 5.1 (p. 15) ). The bus matrix allows several AHB
slaves to be accessed simultaneously. An AMBA APB interface is used for the peripherals, which are
accessed through an AHB-to-APB bridge connected to the AHB bus matrix. The AHB bus masters are:
• Cortex-M3 ICode: Used for instruction fetches from Code memory (0x00000000 - 0x1FFFFFFF).
• Cortex-M3 DCode: Used for debug and data access to Code memory (0x00000000 - 0x1FFFFFFF).
• Cortex-M3 System: Used for instruction fetches, data and debug access to system space
(0x20000000 - 0xDFFFFFFF).
• DMA: Can access SRAM, Flash and peripherals (0x00000000 - 0xDFFFFFFF).
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2014
www.silabs.com
Figure 5.1. EFM32TG Bus System
...the world's most energy friendly microcontrollers
Cortex
ICode
DCode
System
DMA
AHB Multilayer
Bus Matrix
5.2 Functional Description
Flash
RAM
AES
AHB/APB
Bridge
Peripheral 0
Peripheral n
The memory segments are mapped together with the internal segments of the Cortex-M3 into the system
memory map shown by Figure 5.2 (p. 16)
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2015
www.silabs.com
Figure 5.2. System Address Space
...the world's most energy friendly microcontrollers
The embedded SRAM is located at address 0x20000000 in the memory map of the EFM32TG. When
running code located in SRAM starting at this address, the Cortex-M3 uses the System bus to fetch
instructions. This results in reduced performance as the Cortex-M3 accesses stack, other data in SRAM
and peripherals using the System bus. To be able to run code from SRAM efficiently, the SRAM is also
mapped in the code space at address 0x10000000. When running code from this space, the Cortex-M3
fetches instructions through the I/D-Code bus interface, leaving the System bus for data access. The
SRAM mapped into the code space can however only be accessed by the CPU, i.e. not the DMA.
5.2.1 Bit-banding
The SRAM bit-band alias and peripheral bit-band alias regions are located at 0x22000000 and
0x42000000 respectively. Read and write operations to these regions are converted into masked singlebit reads and atomic single-bit writes to the embedded SRAM and peripherals of the EFM32TG.
The standard approach to modify a single register or SRAM bit in the aliased regions, requires software
to read the value of the byte, half-word or word containing the bit, modify the bit, and then write the byte,
half-word or word back to the register or SRAM address. Using bit-banding, this read-modify-write can
be done in a single atomic operation. As read-writeback, bit-masking and bit-shift operations are not
necessary in software, code size is reduced and execution speed improved.
The bit-band regions allows addressing each individual bit in the SRAM and peripheral areas of the
memory map. To set or clear a bit in the embedded SRAM, write a 1 or a 0 to the following address:
Memory SRAM Area Set/Clear Bit
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2016
www.silabs.com
...the world's most energy friendly microcontrollers
where address and bit are defined as above.
Note that the AHB-peripheral AES does not support bit-banding.
5.2.2 Peripherals
The peripherals are mapped into the peripheral memory segment, each with a fixed size address range
according to Table 5.1 (p. 17) , Table 5.2 (p. 18) and Table 5.3 (p. 19) .
The Bus Matrix connects the memory segments to the bus masters:
• Code: CPU instruction or data fetches from the code space
• System: CPU read and write to the SRAM and peripherals
• DMA: Access to SRAM, Flash and peripherals
5.2.3.1 Arbitration
The Bus Matrix uses a round-robin arbitration algorithm which enables high throughput and low latency
while starvation of simultaneous accesses to the same bus slave are eliminated. Round-robin does not
assign a fixed priority to each bus master. The arbiter does not insert any bus wait-states.
5.2.3.2 Access Performance
The Bus Matrix is a multi-layer energy optimized AMBA AHB compliant bus with an internal bandwidth
equal to 4 times a single AHB-bus.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2019
www.silabs.com
...the world's most energy friendly microcontrollers
The Bus Matrix accepts new transfers initiated by each master in every clock cycle without inserting
any wait-states. The slaves, however, may insert wait-states depending on their internal throughput and
the clock frequency.
The Cortex-M3, the DMA Controller, and the peripherals run on clocks that can be prescaled separately.
When accessing a peripheral which runs on a frequency equal to or faster than the HFCORECLK, the
number of wait cycles per access, in addition to master arbitration, is given by:
Memory Wait Cycles with Clock Equal or Faster than HFCORECLK
where N
slave cycles
N
is the wait cycles introduced by the slave.
cycles
= 2 + N
slave cycles
,(5.3)
When accessing a peripheral running on a clock slower than the HFCORECLK, wait-cycles are
introduced to allow the transfer to complete on the peripheral clock. The number of wait cycles per
access, in addition to master arbitration, is given by:
Memory Wait Cycles with Clock Slower than CPU
N
where N
slave cycles
is the number of wait cycles introduced by the slave.
For general register access, N
cycles
= (2 + N
slave cycles
slave cycles
= 1.
) x f
HFCORECLK/fHFPERCLK
, (5.4)
More details on clocks and prescaling can be found in Chapter 11 (p. 99) .
5.3 Access to Low Energy Peripherals (Asynchronous Registers)
5.3.1 Introduction
The Low Energy Peripherals are capable of running when the high frequency oscillator and core system
is powered off, i.e. in energy mode EM2 and in some cases also EM3. This enables the peripherals to
perform tasks while the system energy consumption is minimal.
The Low Energy Peripherals are:
• Liquid Crystal Display driver - LCD
• Low Energy Timer - LETIMER
• Low Energy UART - LEUART
• Pulse Counter - PCNT
• Real Time Counter - RTC
• Watchdog - WDOG
• Low Energy Sensor Interface - LESENSE
All Low Energy Peripherals are memory mapped, with automatic data synchronization. Because the Low
Energy Peripherals are running on clocks asynchronous to the core clock, there are some constraints
on how register accesses can be done, as described in the following sections.
5.3.1.1 Writing
Every Low Energy Peripheral has one or more registers with data that needs to be synchronized into
the Low Energy clock domain to maintain data consistency and predictable operation. There are two
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2020
www.silabs.com
...the world's most energy friendly microcontrollers
different synchronization mechanisms on the Tiny Gecko; immediate synchronization, and delayed
synchronization. Immediate synchronization is available for the RTC, LETIMER and LESENSE, and
results in an immediate update of the target registers. Delayed synchronization is used for the other
Low Energy Peripherals, and for these peripherals, a write operation requires 3 positive edges on the
clock of the Low Energy Peripheral being accessed. Registers requiring synchronization are marked
"Asynchronous" in their description header.
5.3.1.1.1 Delayed synchronization
After writing data to a register which value is to be synchronized into the Low Energy Peripheral using
delayed synchronization, a corresponding busy flag in the <module_name>_SYNCBUSY register (e.g.
LEUART_SYNCBUSY) is set. This flag is set as long as synchronization is in progress and is cleared
upon completion.
Note
Subsequent writes to the same register before the corresponding busy flag is cleared is not
supported. Write before the busy flag is cleared may result in undefined behavior.
In general, the SYNCBUSY register only needs to be observed if there is a risk of multiple
write access to a register (which must be prevented). It is not required to wait until the
relevant flag in the SYNCBUSY register is cleared after writing a register. E.g EM2 can be
entered immediately after writing a register.
See Figure 5.3 (p. 21) for a more detailed overview of the write operation.
Figure 5.3. Write operation to Low Energy Peripherals
Core Clock DomainLow Frequency Clock Domain
Write[0:n]
Set 0
Set 1
Set n
Core Clock
Register 0
Register 1
.
.
.
Register n
Syncbusy Register 0
Syncbusy Register 1
.
.
.
Syncbusy Register n
Freeze
Clear 0
Clear 1
Clear n
Low Frequency ClockLow Frequency Clock
Synchronizer 0
Synchronizer 1
.
.
.
Synchronizer n
Synchronization Done
Register 0 Sync
Register 1 Sync
.
.
.
Register n Sync
5.3.1.1.2 Immediate synchronization
Contrary to the peripherals with delayed synchronization, data written to peripherals with immediate
synchronization, takes effect in the peripheral immediately. They are updated immediately on the
peripheral write access. If a write is set up close to a peripheral clock edge, the write is delayed to after
the clock edge. This will introduce wait-states on peripheral access. In the worst case, there can be three
wait-state cycles of the HFCORECLK_LE and an additional wait-state equivalent of up to 315 ns.
For peripherals with immediate synchronization, the SYNCBUSY registers are still present and serve two
purposes: (1) commands written to a peripheral with immediate synchronization are not executed before
the first peripheral clock after the write. During this period, the SYNCBUSY flag in the command register
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2021
www.silabs.com
...the world's most energy friendly microcontrollers
is set, indicating that the command has not yet been executed; (2) to maintain backwards compatibility
with the EFM32G series, SYNCBUSY registers are also present for other registers. These are however,
always 0, indicating that register writes are always safe.
Note
If the application must be compatible with the EFM32G series, all Low Energy Peripherals
should be accessed as if they only had delayed synchronization, i.e. using SYNCBUSY.
5.3.1.2 Reading
When reading from Low Energy Peripherals, the data is synchronized regardless of the originating clock
domain. Registers updated/maintained by the Low Energy Peripheral are read directly from the Low
Energy clock domain. Registers residing in the core clock domain, are read from the core clock domain.
See Figure 5.4 (p. 22) for a more detailed overview of the read operation.
Note
Writing a register and then immediately reading back the value of the register may give the
impression that the write operation is complete. This is not necessarily the case. Please
refer to the SYNCBUSY register for correct status of the write operation to the Low Energy
Peripheral.
Figure 5.4. Read operation from Low Energy Peripherals
Core Clock DomainLow Frequency Clock Domain
Core Clock
Register 0
Register 1
Register n
Read
Synchronizer
Read Data
Freeze
.
.
.
Low Frequency ClockLow Frequency Clock
Synchronizer 0
Synchronizer 1
.
.
.
Synchronizer n
HW Status Register 0
HW Status Register 1
.
.
.
HW Status Register m
Register 0 Sync
Register 1 Sync
.
.
.
Register n Sync
Low Energy
Peripheral
Main
Function
5.3.2 FREEZE register
For Low Energy Peripherals with delayed synchronization there is a <module_name>_FREEZE register
(e.g. RTC_FREEZE), containing a bit named REGFREEZE. If precise control of the synchronization
process is required, this bit may be utilized. When REGFREEZE is set, the synchronization process is
halted, allowing the software to write multiple Low Energy registers before starting the synchronization
process, thus providing precise control of the module update process. The synchronization process is
started by clearing the REGFREEZE bit.
Note
The FREEZE register is also present on peripherals with immediate synchronization, but
has no effect.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2022
www.silabs.com
...the world's most energy friendly microcontrollers
5.4 Flash
The Flash retains data in any state and typically stores the application code, special user data and
security information. The Flash memory is typically programmed through the debug interface, but can
also be erased and written to from software.
• Up to 32 kB of memory
• Page size of 512 bytes (minimum erase unit)
• Minimum 20 000 erase cycles
• More than 10 years data retention at 85°C
• Lock-bits for memory protection
• Data retention in any state
5.5 SRAM
The primary task of the SRAM memory is to store application data. Additionally, it is possible to execute
instructions from SRAM, and the DMA may used to transfer data between the SRAM, Flash and
peripherals.
• Up to 4 kB memory
• Bit-band access support
• 4 kB blocks may be individually powered down when not in use
• Data retention of the entire memory in EM0 to EM3
5.6 Device Information (DI) Page
The DI page contains calibration values, a unique identification number and other useful data. See the
table below for a complete overview.
Table 5.4. Device Information Page Contents
DI AddressRegisterDescription
0x0FE08020CMU_LFRCOCTRLRegister reset value.
0x0FE08028CMU_HFRCOCTRLRegister reset value.
0x0FE08030CMU_AUXHFRCOCTRLRegister reset value.
0x0FE08040ADC0_CALRegister reset value.
0x0FE08048ADC0_BIASPROGRegister reset value.
0x0FE08050DAC0_CALRegister reset value.
0x0FE08058DAC0_BIASPROGRegister reset value.
0x0FE08060ACMP0_CTRLRegister reset value.
0x0FE08068ACMP1_CTRLRegister reset value.
0x0FE08078CMU_LCDCTRLRegister reset value.
0x0FE080A0DAC0_OPACTRLRegister reset value
0x0FE080A8DAC0_OPAOFFSETRegister reset value
0x0FE081B0DI_CRC[15:0]: DI data CRC-16.
0x0FE081B2CAL_TEMP_0[7:0] Calibration temperature (°C).
0x0FE081B4ADC0_CAL_1V25[14:8]: Gain for 1V25 reference, [6:0]: Offset for 1V25
reference.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2023
www.silabs.com
...the world's most energy friendly microcontrollers
DI AddressRegisterDescription
0x0FE081B6ADC0_CAL_2V5[14:8]: Gain for 2V5 reference, [6:0]: Offset for 2V5
reference.
0x0FE081B8ADC0_CAL_VDD[14:8]: Gain for VDD reference, [6:0]: Offset for VDD
reference.
0x0FE081BAADC0_CAL_5VDIFF[14:8]: Gain for 5VDIFF reference, [6:0]: Offset for 5VDIFF
reference.
0x0FE081BCADC0_CAL_2XVDD[14:8]: Reserved (gain for this reference cannot be
calibrated), [6:0]: Offset for 2XVDD reference.
0x0FE081BEADC0_TEMP_0_READ_1V25[15:4] Temperature reading at 1V25 reference, [3:0]
Reserved.
0x0FE081C8DAC0_CAL_1V25[22:16]: Gain for 1V25 reference, [13:8]: Channel 1 offset for
1V25 reference, [5:0]: Channel 0 offset for 1V25 reference.
0x0FE081CCDAC0_CAL_2V5[22:16]: Gain for 2V5 reference, [13:8]: Channel 1 offset for
2V5 reference, [5:0]: Channel 0 offset for 2V5 reference.
0x0FE081D0DAC0_CAL_VDD[22:16]: Reserved (gain for this reference cannot be
calibrated), [13:8]: Channel 1 offset for VDD reference, [5:0]:
Channel 0 offset for VDD reference.
0x0FE081D4AUXHFRCO_CALIB_BAND_1[7:0]: Tuning for the 1.2 MHZ AUXHFRCO band.
0x0FE081D5AUXHFRCO_CALIB_BAND_7[7:0]: Tuning for the 6.6 MHZ AUXHFRCO band.
0x0FE081D6AUXHFRCO_CALIB_BAND_11[7:0]: Tuning for the 11 MHZ AUXHFRCO band.
0x0FE081D7AUXHFRCO_CALIB_BAND_14[7:0]: Tuning for the 14 MHZ AUXHFRCO band.
0x0FE081D8AUXHFRCO_CALIB_BAND_21[7:0]: Tuning for the 21 MHZ AUXHFRCO band.
0x0FE081D9AUXHFRCO_CALIB_BAND_28[7:0]: Tuning for the 28 MHZ AUXHFRCO band.
0x0FE081DCHFRCO_CALIB_BAND_1[7:0]: Tuning for the 1.2 MHZ HFRCO band.
0x0FE081DDHFRCO_CALIB_BAND_7[7:0]: Tuning for the 6.6 MHZ HFRCO band.
0x0FE081DEHFRCO_CALIB_BAND_11[7:0]: Tuning for the 11 MHZ HFRCO band.
0x0FE081DFHFRCO_CALIB_BAND_14[7:0]: Tuning for the 14 MHZ HFRCO band.
0x0FE081E0HFRCO_CALIB_BAND_21[7:0]: Tuning for the 21 MHZ HFRCO band.
0x0FE081E1HFRCO_CALIB_BAND_28[7:0]: Tuning for the 28 MHZ HFRCO band.
0x0FE081E7MEM_INFO_PAGE_SIZE[7:0] Flash page size in bytes coded as 2 ^
128).
0x0FE081FAMEM_INFO_RAM[15:0]: Ram size, kbyte count as unsigned integer (eg. 16).
0x0FE081FCPART_NUMBER[15:0]: EFM32 part number as unsigned integer (eg. 230).
0x0FE081FEPART_FAMILY[7:0]: EFM32 part family number (Gecko = 71, Giant Gecko
...the world's most energy friendly microcontrollers
Quick Facts
What?
The DBG (Debug Interface) is used to
program and debug EFM32TG devices.
Why?
The Debug Interface makes it easy to reprogram and update the system in the field,
and allows debugging with minimal I/O pin
usage.
How?
The Cortex-M3 supports advanced
debugging features. EFM32TG devices
only use two port pins for debugging or
programming. The internal and external state
of the system can be examined with debug
extensions supporting instruction or data
access break- and watch points.
6.1 Introduction
The EFM32TG devices include hardware debug support through a 2-pin serial-wire debug (SWD)
interface. In addition, there is also a Serial Wire Viewer pin which can be used to output profiling
information, data trace and software-generated messages.
For more technical information about the debug interface the reader is referred to:
• ARM Cortex-M3 Technical Reference Manual
• ARM CoreSight Components Technical Reference Manual
• ARM Debug Interface v5 Architecture Specification
6.2 Features
• Flash Patch and Breakpoint (FPB) unit
• Implement breakpoints and code patches
• Data Watch point and Trace (DWT) unit
• Implement watch points, trigger resources and system profiling
• Instrumentation Trace Macrocell (ITM)
• Application-driven trace source that supports printf style debugging
6.3 Functional Description
There are three debug pins and four trace pins available on the device. Operation of these pins are
described in the following section.
6.3.1 Debug Pins
The following pins are the debug connections for the device:
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2025
www.silabs.com
...the world's most energy friendly microcontrollers
• Serial Wire Clock input (SWCLK): This pin is enabled after reset and has a built-in pull down.
• Serial Wire Data Input/Output (SWDIO): This pin is enabled after reset and has a built-in pull-up.
• Serial Wire Viewer (SWV): This pin is disabled after reset.
The debug pins can be enabled and disabled through GPIO_ROUTE, see Section 28.3.4.1 (p. 471)
. Please remeberer that upon disabling, debug contact with the device is lost. Also note that, because
the debug pins have pull-down and pull-up enabled by default, leaving them enabled might increase the
current consumption with up to 200 µA if left connected to supply or ground.
6.3.2 Debug and EM2/EM3
Leaving the debugger connected when issuing a WFI or WFE to enter EM2 or EM3 will make the system
enter a special EM2. This mode differs from regular EM2 and EM3 in that the high frequency clocks
are still enabled, and certain core functionality is still powered in order to maintain debug-functionality.
Because of this, the current consumption in this mode is closer to EM1 and it is therefore important to
disconnect the debugger before doing current consumption measurements.
6.4 Debug Lock and Device Erase
The debug access to the Cortex-M3 is locked by clearing the Debug Lock Word (DLW) and resetting
the device, see Section 7.3.2 (p. 32) .
When debug access is locked, the debug interface remains accessible but the connection to the CortexM3 core and the whole bus-system is blocked as shown in Figure 6.2 (p. 27) . This mechanism is
controlled by the Authentication Access Port (AAP) as illustrated by Figure 6.1 (p. 26) . The AAP is
only accessible from a debugger and not from the core.
Figure 6.1. AAP - Authentication Access Port
DEVICEERASE
ERASEBUSY
Cortex
SerialWire
debug
interface
DLW[3:0] = = 0xF
SW-DPAHB-AP
Authentication
Access Port
(AAP)
The debugger can access the AAP-registers, and only these registers just after reset, for the time of the
AAP-window outlined in Figure 6.2 (p. 27) . If the device is locked, access to the core and bus-system
is blocked even after code execution starts, and the debugger can only access the AAP-registers. If the
device is not locked, the AAP is no longer accessible after code execution starts, and the debugger can
access the core and bus-system normally. The AAP window can be extended by issuing the bit pattern
on SWDIO/SWCLK as shown in Figure 6.3 (p. 27) . This pattern should be applied just before reset
is deasserted, and will give the debugger more time to access the AAP.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2026
www.silabs.com
Figure 6.2. Device Unlock
Reset
Locked
No access
150 us
...the world's most energy friendly microcontrollers
Program
execution
AAP
Program
execution
Unlocked
Extended
unlocked
No access
No access
AAP
47 us
Extended AAP
255 x 47 us
Cortex
Program
execution
Cortex
Figure 6.3. AAP Expansion
SWDIO
SWCLK
AAP expand
If the device is locked, it can be unlocked by writing a valid key to the AAP_CMDKEY register and then
setting the DEVICEERASE bit of the AAP_CMD register via the debug interface. The commands are not
executed before AAP_CMDKEY is invalidated, so this register should be cleared to to start the erase
operation. This operation erases the main block of flash, all lock bits are reset and debug access through
the AHB-AP is enabled. The operation takes 40 ms to complete. Note that the SRAM contents will also
be deleted during a device erase, while the UD-page is not erased.
Even if the device is not locked, the can device can be erased through the AAP, using the above
procedure during the AAP window. This can be useful if the device has been programmed with code that,
e.g., disables the debug interface pins on start-up, or does something else that prevents communication
with a debugger.
If the device is locked, the debugger may read the status from the AAP_STATUS register. When the
ERASEBUSY bit is set low after DEVICEERASE of the AAP_CMD register is set, the debugger may
set the SYSRESETREQ bit in the AAP_CMD register. After reset, the debugger may resume a normal
debug session through the AHB-AP. If the device is not locked, the device erase starts when the AAP
window closes, so it is not possible to poll the status.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2027
www.silabs.com
...the world's most energy friendly microcontrollers
6.5 Register Map
The offset register address is relative to the registers base address.
A system reset request is generated when set to 1. This register is write enabled from the AAP_CMDKEY register.
0DEVICEERASE0W1Erase the Flash Main Block, SRAM and Lock Bits
When set, all data and program code in the main block is erased, the SRAM is cleared and then the Lock Bit (LB) page is erased.
This also includes the Debug Lock Word (DLW), causing debug access to be enabled after the next reset. The information block
User Data page (UD) is left unchanged, but the User data page Lock Word (ULW) is erased. This register is write enabled from
the AAP_CMDKEY register.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
6.6.2 AAP_CMDKEY - Command Key Register
4
3
2
1
0
0
0
W1
W1
SYSRESETREQ
DEVICEERASE
OffsetBit Position
0x004
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
0x00000000
W1
WRITEKEY
141312
BitNameResetAccessDescription
31:0WRITEKEY0x00000000W1CMD Key Register
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2028
9
8
7
6
5
4
3
2
1
11
10
0
www.silabs.com
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
The key value must be written to this register to write enable the AAP_CMD register. After AAP_CMD is written, this register should
be cleared to excecute the command.
ValueModeDescription
0xCFACC118WRITEENEnable write to AAP_CMD
6.6.3 AAP_STATUS - Status Register
OffsetBit Position
0x008
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
10
BitNameResetAccessDescription
31:1Reserved
0ERASEBUSY0RDevice Erase Command Status
This bit is set when a device erase is executing.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
6.6.4 AAP_IDR - AAP Identification Register
OffsetBit Position
0x0FC
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
10
9
8
7
6
5
4
3
2
1
0
0
R
ERASEBUSY
9
8
7
6
5
4
3
2
1
0
Reset
0x16E60001
Access
Name
R
ID
BitNameResetAccessDescription
31:0ID0x16E60001RAAP Identification Register
Access port identification register in compliance with the ARM ADI v5 specification (JEDEC Manufacturer ID) .
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2029
www.silabs.com
...the world's most energy friendly microcontrollers
7 MSC - Memory System Controller
What?
The user can perform Flash memory read,
read configuration and write operations
through the Memory System Controller
(MSC) .
Why?
The MSC allows the application code, user
data and flash lock bits to be stored in nonvolatile Flash memory. Certain memory
system functions, such as program memory
wait-states and bus faults are also configured
from the MSC peripheral register interface,
giving the developer the ability to dynamically
customize the memory system performance,
security level, energy consumption and error
handling capabilities to the requirements at
hand.
How?
The MSC integrates a low-energy Flash
IP with a charge pump, enabling minimum
energy consumption while eliminating the
need for external programming voltage to
erase the memory. An easy to use write and
erase interface is supported by an internal,
fixed-frequency oscillator and autonomous
flash timing and control reduces software
complexity while not using other timer
resources.
Application code may dynamically scale
between high energy optimization and
high code execution performance through
advanced read modes.
Quick Facts
A highly efficient low energy instruction
cache reduces the number of flash
reads significantly, thus saving energy.
Performance is also improved when waitstates are used, since many of the wait-states
are eliminated. Built-in performance counters
can be used to measure the efficiency of the
instruction cache.
7.1 Introduction
The Memory System Controller (MSC) is the program memory unit of the EFM32TG microcontroller.
The flash memory is readable and writable from both the Cortex-M3 and DMA. The flash memory is
divided into two blocks; the main block and the information block. Program code is normally written to
the main block. Additionally, the information block is available for special user data and flash lock bits.
There is also a read-only page in the information block containing system and device calibration data.
Read and write operations are supported in the energy modes EM0 and EM1.
2014-07-02 - Tiny Gecko Family - d0034_Rev1.2030
www.silabs.com
Loading...
+ 513 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.