...the world's most energy friendly microcontrollers
EFM32G Reference Manual
Gecko Series
• 32-bit ARM Cortex-M3 processor running at up to 32 MHz
• Up to 128 kB Flash and 16 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 EFM32G 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. EFM32G devices consume as little as 180 µA/MHz in run
mode, and as little as 900 nA with a Real Time Counter running, Brown-out and full
RAM and register retention.
EFM32G's low energy consumption outperforms any other available 8-, 16-, and 32bit solution. The EFM32G 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.
Page 2
...the world's most energy friendly microcontrollers
1 Energy Friendly Microcontrollers
1.1 Typical Applications
The EFM32G 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 EFM32G 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 EFM32G Development
Because EFM32G 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 EFM32G devices ensure easy migration and feature upgrade possibilities.
2014-07-02 - Gecko Family - d0001_Rev1.302
www.silabs.com
Page 3
...the world's most energy friendly microcontrollers
2 About This Document
This document contains reference material for the EFM32G series of microcontrollers. All modules and
peripherals in the EFM32G 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 - Gecko Family - d0001_Rev1.303
www.silabs.com
Page 4
...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 EFM32G 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 - Gecko Family - d0001_Rev1.304
www.silabs.com
Page 5
...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 EFM32G 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
• Memory Protection Unit
• 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
• 0.9 µA @ 3 V Deep Sleep Mode, including RTC with 32.768 kHz oscillator, Power-on
Reset, Brown-out Detector, RAM and CPU retention
• 45 µA/MHz @ 3 V Sleep Mode
• 180 µA/MHz @ 3 V Run Mode, with code executed from flash
• Autonomous operation with DMA in Deep Sleep Mode
• 1× I2C Interface with SMBus support
• Address recognition in Stop Mode
• Timers/Counters
2014-07-02 - Gecko Family - d0001_Rev1.305
www.silabs.com
Page 6
...the world's most energy friendly microcontrollers
• 3× 16-bit Timer/Counter
• 3 Compare/Capture/PWM channels
• Dead-Time Insertion on TIMER0
• 16-bit Low Energy Timer
• 24-bit Real-Time Counter
• 3× 8-bit Pulse Counter
• 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
• 2× Analog Comparator
• Programmable speed/current
• Capacitive sensing with up to 8 inputs
• Supply Voltage Comparator
• 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
• QFN32
• QFN64
• TQFP48
• TQFP64
• LQFP100
• LFBGA112
3.3 Block Diagram
Figure 3.1 (p. 7) shows the block diagram of EFM32G. The color indicates peripheral availability in
the different energy modes, described in Section 3.4 (p. 7) .
2014-07-02 - Gecko Family - d0001_Rev1.306
www.silabs.com
Page 7
Figure 3.1. Block Diagram of EFM32G
Clock ManagementEnergy Management
Serial Interfaces
I/O Ports
Core and Memory
Timers and TriggersAnalog InterfacesSecurity
ARM Cortex™- M3 processor
Flash
Program
Memory
Peripheral
Reflex
System
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
Analog
Comparator
External
Bus
Interface
General
Purpose
I/ O
Low
Energy
UART™
Watchdog
Oscillator
Memory
Protection
Unit
ADCDAC
DMA
Controller
Debug
Interface
External
Interrupts
Pin
Reset
USART
I2C
UARTAES
Gecko
32-bit bus
Peripheral Reflex System
...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 EFM32G, see Table 3.1 (p. 8) . The
EFM32G 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 - Gecko Family - d0001_Rev1.307
1 2 34
0
www.silabs.com
Page 8
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 180 µA/MHz, when
running code from flash. All peripherals can be active.
In EM1, the CPU is sleeping and the power consumption is only 45 µ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, WDOG and ACMP) are still available. This gives a high
degree of autonomous operation with a current consumption as low as 0.9 µ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 and Brownout 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 and the Power-On Reset. All pins are put into their reset
state.
3.5 Product Overview
Table 3.2 (p. 8) shows a device overview of the EFM32G Microcontroller Series, including peripheral
functionality. For more information, the reader is referred to the device specific datasheets.
Table 3.2. EFM32G Microcontroller Series
C
EFM32G Part #
200F1616824-211
200F3232824-211
200F64641624-211
210F1281281624-211
Flash
RAM
GPIO(pins)
LCD
USART+UART
2
LEUART
I
Timer(PWM)
LETIMER
2
1111
(6)
2
1111
(6)
2
1111
(6)
2
1111
(6)
RTC
PCNT
Watchdog
ADC(pins)
1
1 (1)2 (5)--QFN32
(4)
1
1 (1)2 (5)--QFN32
(4)
1
1 (1)2 (5)--QFN32
(4)
1
1 (1)2 (5)Y-QFN32
(4)
DAC(pins)
ACMP(pins)
AES
EBI
Package
2014-07-02 - Gecko Family - d0001_Rev1.308
www.silabs.com
Page 9
...the world's most energy friendly microcontrollers
C
EFM32G Part #
230F3232856-321
230F64641656-321
230F1281281656-321
280F3232885-3+121
280F64641685-3+121
280F1281281685-3+121
290F3232890-3+121
290F64641690-3+121
290F1281281690-3+121
840F32328564x24321
840F646416564x24321
840F12812816564x24321
880F32328854x40 3+121
880F646416854x40 3+121
880F12812816854x40 3+121
890F32328904x40 3+121
890F646416904x40 3+121
890F12812816904x40 3+121
1
EBI and LCD share pins in the part. Only a reduced pin count LCD driver can be used simultaneously with the EBI.
Flash
RAM
GPIO(pins)
LCD
USART+UART
2
LEUART
I
Timer(PWM)
LETIMER
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
3
1131
(9)
RTC
PCNT
Watchdog
ADC(pins)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)2 (8)Y-QFN64
(8)
1
2 (2)2 (8)Y-QFN64
(8)
1
2 (2)2 (8)Y-QFN64
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
1
2 (2)
(8)
DAC(pins)
ACMP(pins)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
2
(16)
AES
Y-QFN64
Y-QFN64
Y-QFN64
YYLQFP100
YYLQFP100
YYLQFP100
YYLFBGA112
YYLFBGA112
YYLFBGA112
YY 1LQFP100
YY1LQFP100
YY1LQFP100
YY1LFBGA112
YY1LFBGA112
YY1LFBGA112
EBI
Package
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.
2014-07-02 - Gecko Family - d0001_Rev1.309
www.silabs.com
Page 10
Figure 3.3. Revision Number Extraction
...the world's most energy friendly microcontrollers
PID2 (0xE00FFFE8)
31:87:4
Minor Rev[7:4]
PID0 (0xE00FFFE0)
31:76:5
Fam[1:0]Fam[5:2]
Major Rev[5:0]
3:0
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 Gecko family, the chip family number is 0x00 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
0x03D
2014-07-02 - Gecko Family - d0001_Rev1.3010
www.silabs.com
Page 11
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 EFM32G
microcontrollers.
Why?
CM3 Core
Hardware divider
32- bit ALU
Single cycle
32- bit multiplier
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.
Control Logic
Instruction InterfaceData Interface
Thumb & Thumb- 2
Decode
How?
Combined with the ultra low energy
peripherals available, the Cortex-M3 makes
the EFM32G devices perfect for 8- to 32-bit
NVIC Interface
Memory Protection Unit
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 r2p0.
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
• Memory Protection Unit
• Up to 8 protected memory regions
• 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
2014-07-02 - Gecko Family - d0001_Rev1.3011
www.silabs.com
Page 12
...the world's most energy friendly microcontrollers
• Unaligned data storage and access
• 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 (r2p0) implementation in the EFM32G family, the
reader is referred to the EFM32G 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 int errupt
setclear
SETPEND[n]/ CLRPEND[n]
Software generated interrupt
Interrupt
request
The EFM32G devices have up to 30 interrupt request lines (IRQ) which are connected to the Cortex-M3.
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 EFM32G Cortex-M3 Reference Manual.
...the world's most energy friendly microcontrollers
5 Memory and Bus System
1 2 3 4
0
ARM Cortex- M3
DMA Controller
Flash
RAM
EBI
Peripherals
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 EFM32G 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 EBI, SRAM, Flash and peripherals (0x00000000 - 0xDFFFFFFF).
2014-07-02 - Gecko Family - d0001_Rev1.3014
www.silabs.com
Page 15
Figure 5.1. EFM32G Bus System
...the world's most energy friendly microcontrollers
Cortex
ICode
DCode
System
DMA
AHB Multilayer
Bus Matrix
5.2 Functional Description
Flash
RAM
EBI
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 - Gecko Family - d0001_Rev1.3015
www.silabs.com
Page 16
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 EFM32G. 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 EFM32G.
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 - Gecko Family - d0001_Rev1.3016
www.silabs.com
Page 17
...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, EBI and peripherals
• DMA: Access to EBI, 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.
2014-07-02 - Gecko Family - d0001_Rev1.3019
www.silabs.com
Page 20
...the world's most energy friendly microcontrollers
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.
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. 95) .
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
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.
2014-07-02 - Gecko Family - d0001_Rev1.3020
www.silabs.com
Page 21
...the world's most energy friendly microcontrollers
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. Due to
synchronization, the write operation requires 3 positive edges of the clock of the Low Energy Peripheral
being accessed. Such registers are marked "Asynchronous" in their description header.
See Figure 5.3 (p. 21) for a more detailed overview of the writing operation.
After writing data to a register which value is to be synchronized into the Low Energy clock domain, a
corresponding busy flag in the <module_name>_SYNCBUSY register (e.g. RTC_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.
Figure 5.3. Write operation to Low Energy Peripherals
Core Clock DomainLow Frequency Clock Domain
Freeze
Clear 0
Clear 1
Clear n
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
5.3.1.2 Reading
Low Frequency ClockLow Frequency Clock
Synchronizer 0
Synchronizer 1
.
.
.
Synchronizer n
Synchronization Done
Register 0 Sync
Register 1 Sync
Register n Sync
.
.
.
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.
2014-07-02 - Gecko Family - d0001_Rev1.3021
www.silabs.com
Page 22
...the world's most energy friendly microcontrollers
Figure 5.4. Read operation from Low Energy Peripherals
Core Clock DomainLow Frequency Clock Domain
Core Clock
Freeze
Register 0
Register 1
.
.
.
Register n
Low Frequency ClockLow Frequency Clock
Synchronizer 0
Synchronizer 1
.
.
.
Synchronizer n
Register 0 Sync
Register 1 Sync
.
.
.
Register n Sync
Read
Synchronizer
Read Data
HW Status Register 0
HW Status Register 1
.
.
.
HW Status Register m
Low Energy
Peripheral
Main
Function
5.3.2 FREEZE register
For Low Energy Peripherals 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.
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 128 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 16 kB memory
• Bit-band access support
• 4 kB blocks may be individually powered down when not in use
2014-07-02 - Gecko Family - d0001_Rev1.3022
www.silabs.com
Page 23
...the world's most energy friendly microcontrollers
• 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.
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.
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.
0x0FE081D4RESERVED[31:0] Reserved
0x0FE081D8RESERVED[31:0] Reserved
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.
2014-07-02 - Gecko Family - d0001_Rev1.3023
www.silabs.com
Page 24
...the world's most energy friendly microcontrollers
DI AddressRegisterDescription
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 EFM32G 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. EFM32G 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 EFM32G 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 - Gecko Family - d0001_Rev1.3025
www.silabs.com
Page 26
...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.2.1 (p. 429)
. 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.
2014-07-02 - Gecko Family - d0001_Rev1.3026
www.silabs.com
Page 27
Figure 6.2. Device Unlock
Reset
Locked
No access
150 us
...the world's most energy friendly microcontrollers
Program
execution
AAP
Program
execution
Unlocked
No access
AAP
47 us
Cortex
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 - Gecko Family - d0001_Rev1.3027
www.silabs.com
Page 28
...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 - Gecko Family - d0001_Rev1.3028
9
8
7
6
5
4
3
2
1
11
10
0
www.silabs.com
Page 29
...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 - Gecko Family - d0001_Rev1.3029
www.silabs.com
Page 30
...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) .
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.
Quick Facts
Application code may dynamically scale
between high energy optimization and
high code execution performance through
advanced read modes.
7.1 Introduction
The Memory System Controller (MSC) is the program memory unit of the EFM32G 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.
7.2 Features
• AHB read interface
• Scalable access performance to optimize the Cortex-M3 code interface
• Zero wait-state access up to 16 MHz and one wait-state for 16 MHz and above
• Advanced energy optimization functionality
2014-07-02 - Gecko Family - d0001_Rev1.3030
www.silabs.com
Page 31
...the world's most energy friendly microcontrollers
• Conditional branch target prefetch suppression
• Cortex-M3 disfolding of if-then (IT) blocks
• DMA read support in EM0 and EM1
• Command and status interface
• Flash write and erase
• Accessible from Cortex-M3 in EM0
• DMA write support in EM0 and EM1
• Core clock independent Flash timing
• Internal oscillator and internal timers for precise and autonomous Flash timing
• General purpose timers are not occupied during Flash erase and write operations
• Need for special time scaling registers eliminated
• Configurable interrupt erase abort
• Improved interrupt predictability
• Memory and bus fault control
• Security features
• Lockable debug access
• Page lock bits
• User data lock bits
• End-of-write and end-of-erase interrupts
7.3 Functional Description
The size of the main block is device dependent. The largest size available is 128 kB (256 pages).
The information block has 512 bytes available for user data. The information block also contains chip
configuration data located in a reserved area. The main block is mapped to address 0x00000000 and
the information block is mapped to address 0x0FE00000. Table 7.1 (p. 31) outlines how the Flash
is mapped in the memory space. All Flash memory is organized into 512 byte pages.
-0x0FE00200--Reserved
10x0FE04000Debug onlyYesLock Bits (LB)512 B
Purpose/NameSize
User code and data16 KB - 128 kB
~24 MB
expansion
-0x0FE04200--Reserved
20x0FE08000-YesDevice Information
(DI)
-0x0FE08200--Reserved
Reserved-0x0FE10000--Reserved for flash
expansion
1
Block/page erased by a device erase
2014-07-02 - Gecko Family - d0001_Rev1.3031
512 B
Rest of code
space
www.silabs.com
Page 32
...the world's most energy friendly microcontrollers
7.3.1 User Data (UD) Page Description
This is the user data page in the information block. The page can be erased and written by software. The
page is erased by the ERASEPAGE command of the MSC_WRITECMD register. Note that the page is
not erased by a device erase operation. The device erase operation is described in Section 6.4 (p. 26) .
7.3.2 Lock Bits (LB) Page Description
This page contains the following information:
• Debug Lock Word (DLW)
• User data page Lock Word (ULW)
• Main block Page Lock Words (PLWs)
The words in this page are organized as shown in Table 7.2 (p. 32) :
Table 7.2. Lock Bits Page Structure
127DLW
126ULW
NPLW[N]
……
1PLW[1]
0PLW[0]
Word 127 is the debug lock word (DLW). Bit 0 of this word is the debug lock bit. If this bit is 1, then
debug access is enabled. Debug access to the core is disabled from power-on reset until the DLW is
evaluated immediately before the Cortex-M3 starts execution of the user application code. If the bit is
0, then debug access to the core remains blocked.
Word 126 is the user page lock word (ULW). Bit 0 of this word is the page lock bit. The lock bits can
be reset by a device erase operation initiated from the Authentication Access Port (AAP) registers. The
AAP is described in more detail in Section 6.4 (p. 26) . Note that the AAP is only accessible from the
debug interface, and cannot be accessed from the Cortex-M3 core.
There are 32 page lock bits per page lock word (PLW). Bit 0 refers to the first page and bit 31 refers to
the last page within a PLW. Thus, PLW[0] contains lock bits for page 0-31 in the main block. Similarly,
PLW[1] contains lock bits for page 32-63 and so on. A page is locked when the bit is 0. A locked page
cannot be erased or written.
The lock bits can be reset by a device erase operation initiated from the Authentication Access Port
(AAP) registers. The AAP is described in more detail in Section 6.4 (p. 26) . Note that the AAP is only
accessible from the debug interface, and cannot be accessed from the Cortex-M3 core.
7.3.3 Device Information (DI) Page
This read-only page holds the calibration data for the oscillator and other analog peripherals from the
production test as well as a unique device ID. The page is further described in Section 5.6 (p. 23) .
7.3.4 Post-reset Behavior
Calibration values are automatically written to registers by the MSC before application code startup. The
values are also available to read from the DI page for later reference by software. Other information
such as the device ID and production date is also stored in the DI page and is readable from software.
2014-07-02 - Gecko Family - d0001_Rev1.3032
www.silabs.com
Page 33
...the world's most energy friendly microcontrollers
7.3.4.1 One Wait-state Access
After reset, the HFCORECLK is normally 14 MHz from the HFRCO and the MODE field of the
MSC_READCTRL register is set to WS1 (one wait-state). The reset value must be WS1 as an
uncalibrated HFRCO may produce a frequency higher than 16 MHz. Software must not select a zero
wait-state mode unless the clock is guaranteed to be 16 MHz or below, otherwise the resulting behavior
is undefined. If a HFCORECLK frequency above 16 MHz is to be set by software, the MODE field of
the MSC_READCTRL register must be set to WS1 or WS1SCBTP before the core clock is switched to
the higher frequency clock source.
When changing to a lower frequency, the MODE field of the MSC_READCTRL register can be set to
WS0 or WS0SCBTP, but only after the frequency transition is completed. If the HFRCO is used, wait
until the oscillator is stable on the new frequency. Otherwise, the behavior is unpredictable.
7.3.4.2 Zero Wait-state Access
At 16 MHz and below, read operations from flash may be performed without any wait-states. Zero waitstate access greatly improves code execution performance at frequencies from 16 MHz and below.
By default, the Cortex-M3 uses speculative prefetching and If-Then block folding to maximize code
execution performance at the cost of additional flash accesses and energy consumption.
MSC offers a special instruction fetch mode which optimizes energy consumption by cancelling CortexM3 conditional branch target prefetches. Normally, the Cortex-M3 core prefetches both the next
sequential instruction and the instruction at the branch target address when a conditional branch
instruction reaches the pipeline decode stage. This prefetch scheme improves performance while one
extra instruction is fetched from memory at each conditional branch, regardless of whether the branch is
taken or not. To optimize for low energy, the MSC can be configured to cancel these speculative branch
target prefetches. With this configuration, energy consumption is more optimal, as the branch target
instruction fetch is delayed until the branch condition is evaluated.
The performance penalty with this mode enabled is source code dependent, but is normally less than
1% for core frequencies from 16 MHz and below. To enable the mode at frequencies from 16 MHz and
below write WS0SCBTP to the MODE field of the MSC_READCTRL register. For frequencies above 16
MHz, use the WS1SCBTP mode. An increased performance penalty per clock cycle must be expected
compared to WS0SCBTP mode. The performance penalty in WS1SCBTP mode depends greatly on the
density and organization of conditional branch instructions in the code.
7.3.4.4 Cortex-M3 If-Then Block Folding
The Cortex-M3 offers a mechanism known as if-then block folding. This is a form of speculative
prefetching where small if-then blocks are collapsed in the prefetch buffer if the condition evaluates to
false. The instructions in the block then appear to execute in zero cycles. With this scheme, performance
is optimized at the cost of higher energy consumption as the processor fetches more instructions from
memory than it actually executes. To disable the mode, write a 1 to the DISFOLD bit in the NVIC Auxiliary
Control Register; see the Cortex-M3 Technical Reference Manual for details. Normally, it is expected
that this feature is most efficient at core frequencies above 16 MHz. Folding is enabled by default.
7.3.5 Erase and Write Operations
Both page erase and write operations require that the address is written into the MSC_ADDRB register.
For erase operations, the address may be any within the page to be erased. Load the address by
writing 1 to the LADDRIM bit in the MSC_WRITECMD register. The LADDRIM bit only has to be written
once when loading the first address. After each word is written the internal address register ADDR
will be incremented automatically by 4. The INVADDR bit of the MSC_STATUS register is set if the
loaded address is outside the flash and the LOCKED bit of the MSC_STATUS register is set if the page
2014-07-02 - Gecko Family - d0001_Rev1.3033
www.silabs.com
Page 34
...the world's most energy friendly microcontrollers
addressed is locked. Any attempts to command erase of or write to the page are ignored if INVADDR
or the LOCKED bits of the MSC_STATUS register are set.
When a word is written to the MSC_WDATA register, the WDATAREADY bit of the MSC_STATUS
register is cleared. When this status bit is set, software or DMA may write the next word.
A single word write is commanded by setting the WRITEONCE bit of the MSC_WRITECMD register.
The operation is complete when the BUSY bit of the MSC_STATUS register is cleared and control of
the flash is handed back to the AHB interface, allowing application code to resume execution.
For a DMA write the software must write the first word to the MSC_WDATA register and then set the
WRITETRIG bit of the MSC_WRITECMD register. DMA triggers when the WDATAREADY bit of the
MSC_STATUS register is set.
It is possible to write words twice between each erase by keeping at 1 the bits that are not to be changed.
Let us take as an example writing two 16 bit values, 0xAAAA and 0x5555. To safely write them in the
same flash word this method can be used:
• Write 0xFFFFAAAA (word in flash becomes 0xFFFFAAAA)
• Write 0x5555FFFF (word in flash becomes 0x5555AAAA)
Note
Note
The WRITEONCE, WRITETRIG and ERASEPAGE bits in the MSC_WRITECMD register
cannot safely be written from code in Flash. It is recommended to place a small code
section in RAM to set these bits and wait for the operation to complete. Also note that
DMA transfers to or from any other address in Flash while a write or erase operation is in
progress will produce unpredictable results.
The MSC_WDATA and MSC_ADDRB registers are not retained when entering EM2 or
lower energy modes.
2014-07-02 - Gecko Family - d0001_Rev1.3034
www.silabs.com
Page 35
...the world's most energy friendly microcontrollers
7.4 Register Map
The offset register address is relative to the registers base address.
OffsetNameTypeDescription
0x000MSC_CTRLRWMemory System Control Register
0x004MSC_READCTRLRWRead Control Register
0x008MSC_WRITECTRLRWWrite Control Register
0x00CMSC_WRITECMDW1Write Command Register
0x010MSC_ADDRBRWPage Erase/Write Address Buffer
0x018MSC_WDATARWWrite Data Register
0x01CMSC_STATUSRStatus Register
0x02CMSC_IFRInterrupt Flag Register
0x030MSC_IFSW1Interrupt Flag Set Register
0x034MSC_IFCW1Interrupt Flag Clear Register
0x038MSC_IENRWInterrupt Enable Register
0x03CMSC_LOCKRWConfiguration Lock Register
7.5 Register Description
7.5.1 MSC_CTRL - Memory System Control Register
OffsetBit Position
0x000
Reset
Access
Name
BitNameResetAccessDescription
31:1Reserved
0BUSFAULT1RWBus Fault Response Enable
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
When this bit is set, the memory system generates bus error response.
ValueModeDescription
0GENERATEA bus fault is generated on access to unmapped code and system space.
1IGNOREAccesses to unmapped address space is ignored.
9
8
7
6
5
4
3
2
1
10
0
1
RW
BUSFAULT
7.5.2 MSC_READCTRL - Read Control Register
OffsetBit Position
0x004
Reset
Access
Name
2014-07-02 - Gecko Family - d0001_Rev1.3035
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
9
8
7
6
5
4
3
2
1
11
10
0
0x1
RW
MODE
www.silabs.com
Page 36
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
31:3Reserved
2:0MODE0x1RWRead Mode
If software wants to set a core clock frequency above 16 MHz, this register must be set to WS1 or WS1SCBTP before the core
clock is switched to the higher frequency. When changing to a lower frequency, this register can be set to WS0 or WS0SCBTP
after the frequency transition has been completed. After reset, the core clock is 14 MHz from the HFRCO but the MODE field of
MSC_READCTRL register is set to WS1. This is because the HFRCO may produce a frequency above 16 MHz before it is calibrated.
If the HFRCO is used as clock source, wait until the oscillator is stable on the new frequency to avoid unpredictable behavior.
ValueModeDescription
0WS0Zero wait-states inserted in fetch or read transfers.
1WS1One wait-state inserted for each fetch or read transfer. This mode is required for a core
2WS0SCBTPZero wait-states inserted with the Suppressed Conditional Branch Target Prefetch
3WS1SCBTPOne wait-state access with SCBTP enabled.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
frequency above 16 MHz.
(SCBTP) function enabled. SCBTP saves energy by delaying the Cortex' conditional
branch target prefetches until the conditional branch instruction is in the execute stage.
When the instruction reaches this stage, the evaluation of the branch condition is
completed and the core does not perform a speculative prefetch of both the branch
target address and the next sequential address. With the SCBTP function enabled,
one instruction fetch is saved for each branch not taken, with a negligible performance
penalty.
7.5.3 MSC_WRITECTRL - Write Control Register
OffsetBit Position
0x008
Reset
Access
Name
BitNameResetAccessDescription
31:2Reserved
1IRQERASEABORT0RWAbort Page Erase on Interrupt
0WREN0RWEnable Write/Erase Controller
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
10
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
When this bit is set to 1, any Cortex interrupt aborts any current page erase operation. Executing that interrupt vector from Flash
will halt the CPU.
When this bit is set, the MSC write and erase functionality is enabled.
9
8
7
6
5
4
3
2
1
0
0
0
RW
RW
WREN
IRQERASEABORT
7.5.4 MSC_WRITECMD - Write Command Register
OffsetBit Position
0x00C
Reset
Access
Name
2014-07-02 - Gecko Family - d0001_Rev1.3036
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
9
8
7
6
5
4
3
2
1
11
10
0
0
0
W1
W1
W1
WRITETRIG
WRITEEND
WRITEONCE
0
0
0
W1
W1
LADDRIM
ERASEPAGE
www.silabs.com
Page 37
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
31:5Reserved
4WRITETRIG0W1Word Write Sequence Trigger
Functions like MSC_CMD_WRITEONCE, but will set MSC_STATUS_WORDTIMEOUT if no new data is written to MSC_WDATA
within the 30 µs timeout.
3WRITEONCE0W1Word Write-Once Trigger
Start write of the first word written to MSC_WDATA, then add 4 to ADDR and write the next word if available within a 30 µs timeout.
When ADDR is incremented past the page boundary, ADDR is set to the base of the page.
2WRITEEND0W1End Write Mode
Write 1 to end write mode when using the WRITETRIG command.
1ERASEPAGE0W1Erase Page
Erase any user defined page selected by the MSC_ADDRB register. The WREN bit in the MSC_WRITECTRL register must be set
in order to use this command.
0LADDRIM0W1Load MSC_ADDRB into ADDR
Load the internal write address register ADDR from the MSC_ADDRB register. The internal address register ADDR is incremented
automatically by 4 after each word is written. When ADDR is incremented past the page boundary, ADDR is set to the base of the page.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
7.5.5 MSC_ADDRB - Page Erase/Write Address Buffer
OffsetBit Position
0x010
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
0x00000000
RW
ADDRB
141312
11
9
10
BitNameResetAccessDescription
31:0ADDRB0x00000000RWPage Erase or Write Address Buffer
This register holds the page address for the erase or write operation. This register is loaded into the internal MSC_ADDR register
when the LADDRIM field in MSC_WRITECMD is set. The MSC_ADDR register is not readable. This register is not retained when
entering EM2 or lower energy modes.
7.5.6 MSC_WDATA - Write Data Register
8
7
6
5
4
3
2
1
0
OffsetBit Position
0x018
Reset
Access
Name
2014-07-02 - Gecko Family - d0001_Rev1.3037
31
30
29
28
272625
24
23
22
21
201918
17
16
15
0x00000000
RW
WDATA
141312
9
8
7
6
5
4
3
2
1
11
10
0
www.silabs.com
Page 38
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
31:0WDATA0x00000000RWWrite Data
The data to be written to the address in MSC_ADDR. This register must be written when the WDATAREADY bit of MSC_STATUS
is set, otherwise the data is ignored. This register is not retained when entering EM2 or lower energy modes.
7.5.7 MSC_STATUS - Status Register
OffsetBit Position
0x01C
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
9
8
7
10
6
BitNameResetAccessDescription
31:6Reserved
5ERASEABORTED0RThe Current Flash Erase Operation Aborted
When set, the current erase operation was aborted by interrupt.
4WORDTIMEOUT0RFlash Write Word Timeout
When this bit is set, MSC_WDATA was not written within the timeout. The flash write operation timed out and access to the
flash is returned to the AHB interface. This bit is cleared when the ERASEPAGE, WRITETRIG or WRITEONCE commands in
MSC_WRITECMD are triggered.
3WDATAREADY1RWDATA Write Ready
When this bit is set, the content of MSC_WDATA is read by MSC Flash Write Controller and the register may be updated with the
next 32-bit word to be written to flash. This bit is cleared when writing to MSC_WDATA.
2INVADDR0RInvalid Write Address or Erase Page
Set when software attempts to load an invalid (unmapped) address into ADDR.
1LOCKED0RAccess Locked
When set, the last erase or write is aborted due to erase/write access constraints.
0BUSY0RErase/Write Busy
When set, an erase or write operation is in progress and new commands are ignored.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
5
4
3
2
0
0
1
0
R
R
R
R
INVADDR
WDATAREADY
WORDTIMEOUT
ERASEABORTED
1
0
0
0
R
R
BUSY
LOCKED
7.5.8 MSC_IF - Interrupt Flag Register
OffsetBit Position
0x02C
Reset
Access
Name
BitNameResetAccessDescription
31:2Reserved
2014-07-02 - Gecko Family - d0001_Rev1.3038
31
30
29
28
272625
24
23
22
21
201918
17
16
15
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
141312
9
8
7
6
5
4
3
2
1
0
R
WRITE
0
0
R
ERASE
11
10
www.silabs.com
Page 39
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
1WRITE0RWrite Done Interrupt Read Flag
Set when a write is done.
0ERASE0RErase Done Interrupt Read Flag
Set when erase is done.
7.5.9 MSC_IFS - Interrupt Flag Set Register
OffsetBit Position
0x030
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
BitNameResetAccessDescription
31:2Reserved
1WRITE0W1Write Done Interrupt Set
Set the write done bit and generate interrupt.
0ERASE0W1Erase Done Interrupt Set
Set the erase done bit and generate interrupt.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
7.5.10 MSC_IFC - Interrupt Flag Clear Register
OffsetBit Position
9
8
7
6
5
4
3
2
1
0
W1
WRITE
0
0
W1
ERASE
10
0x034
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
10
BitNameResetAccessDescription
31:2Reserved
1WRITE0W1Write Done Interrupt Clear
Clear the write done bit.
0ERASE0W1Erase Done Interrupt Clear
Clear the erase done bit.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
0
0
0
W1
W1
WRITE
ERASE
2014-07-02 - Gecko Family - d0001_Rev1.3039
www.silabs.com
Page 40
...the world's most energy friendly microcontrollers
7.5.11 MSC_IEN - Interrupt Enable Register
OffsetBit Position
0x038
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
10
BitNameResetAccessDescription
31:2Reserved
1WRITE0RWWrite Done Interrupt Enable
Enable the write done interrupt.
0ERASE0RWErase Done Interrupt Enable
Enable the erase done interrupt.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
7.5.12 MSC_LOCK - Configuration Lock Register
OffsetBit Position
0x03C
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
0
RW
RW
WRITE
ERASE
9
8
7
6
5
4
3
2
1
0
Reset
Access
Name
BitNameResetAccessDescription
31:16Reserved
15:0LOCKKEY0x0000RWConfiguration Lock
Write any other value than the unlock code to lock access to MSC_CTRL, MSC_READCTRL and MSC_WRITECTRL. Write the
unlock code to enable access. When reading the register, bit 0 is set when the lock is enabled.
ModeValueDescription
Read Operation
UNLOCKED0MSC registers are unlocked.
LOCKED1MSC registers are locked.
Write Operation
LOCK0Lock MSC registers.
UNLOCK0x1B71Unlock MSC registers.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
0x0000
RW
LOCKKEY
2014-07-02 - Gecko Family - d0001_Rev1.3040
www.silabs.com
Page 41
8 DMA - DMA Controller
1 2 3 4
0
...the world's most energy friendly microcontrollers
Quick Facts
What?
The DMA controller can move data without
CPU intervention, effectively reducing the
energy consumption for a data transfer.
Why?
Flash
RAM
DMA
controller
External Bus
Interface
Peripherals
The DMA can perform data transfers more
energy efficiently than the CPU and allows
autonomous operation in low energy modes.
The LEUART can for instance provide full
UART communication in EM2, consuming
only a few µA by using the DMA to move data
between the LEUART and RAM.
How?
The DMA controller has multiple highly
configurable, prioritized DMA channels.
Advanced transfer modes such as ping-pong
and scatter-gather make it possible to tailor
the controller to the specific needs of an
application.
8.1 Introduction
The Direct Memory Access (DMA) controller performs memory operations independently of the CPU.
This has the benefit of reducing the energy consumption and the workload of the CPU, and enables
the system to stay in low energy modes for example when moving data from the USART to RAM or
from the External Bus Interface (EBI) to the DAC. The DMA controller uses the PL230 µDMA controller
licensed from ARM1. Each of the PL230s channels on the EFM32 can be connected to any of the EFM32
peripherals.
8.2 Features
• The DMA controller is accessible as a memory mapped peripheral
• Possible data transfers include
• RAM/EBI/Flash to peripheral
• RAM/EBI to Flash
• Peripheral to RAM/EBI
• RAM/EBI/Flash to RAM/EBI
• The DMA controller has 8 independent channels
• Each channel has one (primary) or two (primary and alternate) descriptors
• The configuration for each channel includes
• Transfer mode
• Priority
• Word-count
• Word-size (8, 16, 32 bit)
• The transfer modes include
• Basic (using the primary or alternate DMA descriptor)
1
ARM PL230 homepage [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0417a/index.html]
2014-07-02 - Gecko Family - d0001_Rev1.3041
www.silabs.com
Page 42
...the world's most energy friendly microcontrollers
• Ping-pong (switching between the primary or alternate DMA descriptors, for continuous data flow
to/from peripherals)
• Scatter-gather (using the primary descriptor to configure the alternate descriptor)
• Each channel has a programmable transfer length
• Channels 0 and 1 support looped transfers
• Channel 0 supports 2D copy
• A DMA channel can be triggered by any of several sources:
• Communication modules (USART, UART, LEUART)
• Timers (TIMER)
• Analog modules (DAC, ACMP, ADC)
• External Bus Interface (EBI)
• Software
• Programmable mapping between channel number and peripherals - any DMA channel can be
triggered by any of the available sources
• Interrupts upon transfer completion
• Data transfer to/from LEUART in EM2 is supported by the DMA, providing extremely low energy
consumption while performing UART communications
8.3 Block Diagram
An overview of the DMA and the modules it interacts with is shown in Figure 8.1 (p. 42) .
Figure 8.1. DMA Block Diagram
Interrupts
Cortex
AHB
Peripheral
Peripheral
AHB to
APB
bridge
Configuration
Configuration
Channel
select
control
REQ/
ACK
APB block
APB
memory
mapped
registers
DMA Core
DMA control block
AHB block
AHB-Lite
master
interface
DMA data
transfer
Error
Channel
done
The DMA Controller consists of four main parts:
• An APB block allowing software to configure the DMA controller
• An AHB block allowing the DMA to read and write the DMA descriptors and the source and destination
data for the DMA transfers
• A DMA control block controlling the operation of the DMA, including request/acknowledge signals for
the connected peripherals
2014-07-02 - Gecko Family - d0001_Rev1.3042
www.silabs.com
Page 43
...the world's most energy friendly microcontrollers
• A channel select block routing the right peripheral request to each DMA channel
8.4 Functional Description
The DMA Controller is highly flexible. It is capable of transferring data between peripherals and memory
without involvement from the processor core. This can be used to increase system performance by
off-loading the processor from copying large amounts of data or avoiding frequent interrupts to service
peripherals needing more data or having available data. It can also be used to reduce the system energy
consumption by making the DMA work autonomously with the LEUART for data transfer in EM2 without
having to wake up the processor core from sleep.
The DMA Controller contains 8 independent channels. Each of these channels can be connected to any
of the available peripheral trigger sources by writing to the configuration registers, see Section 8.4.1 (p.
43) . In addition, each channel can be triggered by software (for large memory transfers or for
debugging purposes).
What the DMA Controller should do (when one of its channels is triggered) is configured through channel
descriptors residing in system memory. Before enabling a channel, the software must therefore take
care to write this configuration to memory. When a channel is triggered, the DMA Controller will first read
the channel descriptor from system memory, and then it will proceed to perform the memory transfers
as specified by the descriptor. The descriptor contains the memory address to read from, the memory
address to write to, the number of bytes to be transferred, etc. The channel descriptor is described in
detail in Section 8.4.3 (p. 53) .
In addition to the basic transfer mode, the DMA Controller also supports two advanced transfer modes;
ping-pong and scatter-gather. Ping-pong transfers are ideally suited for streaming data for high-speed
peripheral communication as the DMA will be ready to retrieve the next incoming data bytes immediately
while the processor core is still processing the previous ones (and similarly for outgoing communication).
Scatter-gather involves executing a series of tasks from memory and allows sophisticated schemes to
be implemented by software.
Using different priority levels for the channels and setting the number of bytes after which the DMA
Controller re-arbitrates, it is possible to ensure that timing-critical transfers are serviced on time.
8.4.1 Channel Select Configuration
The channel select block allows selecting which peripheral's request lines (dma_req, dma_sreq) to
connect to each DMA channel.
This configuration is done by software through the control registers DMA_CH0_CTRLDMA_CH7_CTRL, with SOURCESEL and SIGSEL components. SOURCESEL selects which peripheral
to listen to and SIGSEL picks which output signals to use from the selected peripheral.
All peripherals are connected to dma_req. When this signal is triggered, the DMA performs a number
of transfers as specified by the channel descriptor (2R). The USARTs are additionally connected to the
dma_sreq line. When only dma_sreq is asserted but not dma_req, then the DMA will perform exactly
one transfer only (given that dma_sreq is enabled by software).
8.4.2 DMA control
8.4.2.1 DMA arbitration rate
You can configure when the controller arbitrates during a DMA transfer. This enables you to reduce the
latency to service a higher priority channel.
The controller provides four bits that configure how many AHB bus transfers occur before it re-arbitrates.
These bits are known as the R_power bits because the value you enter, R, is raised to the power of two
2014-07-02 - Gecko Family - d0001_Rev1.3043
www.silabs.com
Page 44
...the world's most energy friendly microcontrollers
and this determines the arbitration rate. For example, if R = 4 then the arbitration rate is 24, that is, the
controller arbitrates every 16 DMA transfers.
You must take care not to assign a low-priority channel with a large R_power because this
prevents the controller from servicing high-priority requests, until it re-arbitrates.
The number of dma transfers N that need to be done is specified by the user. When N > 2R and is not an
integer multiple of 2R then the controller always performs sequences of 2R transfers until N < 2R remain
to be transferred. The controller performs the remaining N transfers at the end of the DMA cycle.
You store the value of the R_power bits in the channel control data structure. See Section 8.4.3.3 (p.
56) for more information about the location of the R_power bits in the data structure.
8.4.2.2 Priority
When the controller arbitrates, it determines the next channel to service by using the following
information:
• the channel number
• the priority level, default or high, that is assigned to the channel.
You can configure each channel to use either the default priority level or a high priority level by setting
the DMA_CHPRIS register.
Channel number zero has the highest priority and as the channel number increases, the priority of a
channel decreases. Table 8.2 (p. 44) lists the DMA channel priority levels in descending order of
priority.
Table 8.2. DMA channel priority
Channel
number
0HighHighest-priority DMA channel
1High2High-
2014-07-02 - Gecko Family - d0001_Rev1.3044
Priority level
setting
Descending order of
channel priority
www.silabs.com
Page 45
...the world's most energy friendly microcontrollers
Channel
number
3High4High5High6High7High0Default1Default2Default3Default4Default5Default6Default7DefaultLowest-priority DMA channel
Priority level
setting
Descending order of
channel priority
After a DMA transfer completes, the controller polls all the DMA channels that are available. Figure 8.2 (p.
45) shows the process it uses to determine which DMA transfer to perform next.
Figure 8.2. Polling flowchart
Start polling
Is there
a channel
request ?
Yes
Are any
channel requests
using a high priority-
level ?
Yes
Select channel that has
the lowest channel
number and is set to
high priority- level
No
No
Select channel that has
the lowest channel
number
Start DMA transfer
8.4.2.3 DMA cycle types
The cycle_ctrl bits control how the controller performs a DMA cycle. You can set the cycle_ctrl bits as
Table 8.3 (p. 46) lists.
2014-07-02 - Gecko Family - d0001_Rev1.3045
www.silabs.com
Page 46
...the world's most energy friendly microcontrollers
Table 8.3. DMA cycle types
cycle_ctrlDescription
b000Channel control data structure is invalid
b001Basic DMA transfer
b010Auto-request
b011Ping-pong
b100Memory scatter-gather using the primary data structure
b101Memory scatter-gather using the alternate data structure
b110Peripheral scatter-gather using the primary data structure
b111Peripheral scatter-gather using the alternate data structure
Note
The cycle_ctrl bits are located in the channel_cfg memory location that Section 8.4.3.3 (p.
56) describes.
For all cycle types, the controller arbitrates after 2R DMA transfers. If you set a low-priority channel with
a large 2R value then it prevents all other channels from performing a DMA transfer, until the low-priority
DMA transfer completes. Therefore, you must take care when setting the R_power, that you do not
significantly increase the latency for high-priority channels.
8.4.2.3.1 Invalid
After the controller completes a DMA cycle it sets the cycle type to invalid, to prevent it from repeating
the same DMA cycle.
8.4.2.3.2 Basic
In this mode, you configure the controller to use either the primary or the alternate data structure. After
you enable the channel C and the controller receives a request for this channel, then the flow for this
DMA cycle is as follows:
1. The controller performs 2R transfers. If the number of transfers remaining becomes zero, then the
flow continues at step 3 (p. 46) .
2. The controller arbitrates:
• if a higher-priority channel is requesting service then the controller services that channel
• if the peripheral or software signals a request to the controller then it continues at step 1 (p. 46) .
3. The controller sets dma_done[C] HIGH for one HFCORECLK cycle. This indicates to the host
processor that the DMA cycle is complete.
8.4.2.3.3 Auto-request
When the controller operates in this mode, it is only necessary for it to receive a single request to enable
it to complete the entire DMA cycle. This enables a large data transfer to occur, without significantly
increasing the latency for servicing higher priority requests, or requiring multiple requests from the
processor or peripheral.
You can configure the controller to use either the primary or the alternate data structure. After you enable
the channel C and the controller receives a request for this channel, then the flow for this DMA cycle
is as follows:
1. The controller performs 2R transfers for channel C. If the number of transfers remaining is zero the
flow continues at step 3 (p. 47) .
2014-07-02 - Gecko Family - d0001_Rev1.3046
www.silabs.com
Page 47
...the world's most energy friendly microcontrollers
2. The controller arbitrates. When channel C has the highest priority then the DMA cycle continues at
step 1 (p. 46) .
3. The controller sets dma_done[C] HIGH for one HFCORECLK cycle. This indicates to the host
processor that the DMA cycle is complete.
8.4.2.3.4 Ping-pong
In ping-pong mode, the controller performs a DMA cycle using one of the data structures (primary or
alternate) and it then performs a DMA cycle using the other data structure. The controller continues to
switch from primary to alternate to primary… until it reads a data structure that is invalid, or until the
host processor disables the channel.
Figure 8.3 (p. 47) shows an example of a ping-pong DMA transaction.
Figure 8.3. Ping-pong example
Task A: Primary, cycle_ctrl = b011, 2
Request
Request
Task B: Alternate, cycle_ctrl = b011, 2
Task C: Primary, cycle_ctrl = b011, 2
Request
Task D: Alternate, cycle_ctrl = b011, 2
Task E: Primary, cycle_ctrl = b011, 2
Request
R
= 4, N = 6
R
= 4, N = 12
Request
Request
Request
R
= 2, N = 2
R
= 4, N = 5
Request
Request
R
= 4, N = 7
Task A
dma_done[C]
Task B
dma_done[C]
Task C
dma_done[C]
Task D
dma_done[C]
Task E
Request
End: Alternate, cycle_ctrl = b000
Invalid
dma_done[C]
In Figure 8.3 (p. 47) :
Task A1. The host processor configures the primary data structure for task A.
2. The host processor configures the alternate data structure for task B. This enables the
controller to immediately switch to task B after task A completes, provided that a higher
priority channel does not require servicing.
3. The controller receives a request and performs four DMA transfers.
4. The controller arbitrates. After the controller receives a request for this channel, the flow
continues if the channel has the highest priority.
2014-07-02 - Gecko Family - d0001_Rev1.3047
www.silabs.com
Page 48
...the world's most energy friendly microcontrollers
5. The controller performs the remaining two DMA transfers.
6. The controller sets dma_done[C] HIGH for one HFCORECLK cycle and enters the
arbitration process.
After task A completes, the host processor can configure the primary data structure for task C. This
enables the controller to immediately switch to task C after task B completes, provided that a higher
priority channel does not require servicing.
After the controller receives a new request for the channel and it has the highest priority then task B
commences:
Task B7. The controller performs four DMA transfers.
8. The controller arbitrates. After the controller receives a request for this channel, the flow
continues if the channel has the highest priority.
9. The controller performs four DMA transfers.
10.The controller arbitrates. After the controller receives a request for this channel, the flow
continues if the channel has the highest priority.
11.The controller performs the remaining four DMA transfers.
12.The controller sets dma_done[C] HIGH for one HFCORECLK cycle and enters the
arbitration process.
After task B completes, the host processor can configure the alternate data structure for task D.
After the controller receives a new request for the channel and it has the highest priority then task C
commences:
Task C13.The controller performs two DMA transfers.
14.The controller sets dma_done[C] HIGH for one HFCORECLK cycle and enters the
arbitration process.
After task C completes, the host processor can configure the primary data structure for task E.
After the controller receives a new request for the channel and it has the highest priority then task D
commences:
Task D15.The controller performs four DMA transfers.
16.The controller arbitrates. After the controller receives a request for this channel, the flow
continues if the channel has the highest priority.
17.The controller performs the remaining DMA transfer.
18.The controller sets dma_done[C] HIGH for one HFCORECLK cycle and enters the
arbitration process.
After the controller receives a new request for the channel and it has the highest priority then task E
commences:
Task E19.The controller performs four DMA transfers.
20.The controller arbitrates. After the controller receives a request for this channel, the flow
continues if the channel has the highest priority.
21.The controller performs the remaining three DMA transfers.
22.The controller sets dma_done[C] HIGH for one HFCORECLK cycle and enters the
arbitration process.
If the controller receives a new request for the channel and it has the highest priority then it attempts to
start the next task. However, because the host processor has not configured the alternate data structure,
2014-07-02 - Gecko Family - d0001_Rev1.3048
www.silabs.com
Page 49
...the world's most energy friendly microcontrollers
and on completion of task D the controller set the cycle_ctrl bits to b000, then the ping-pong DMA
transaction completes.
Note
You can also terminate the ping-pong DMA cycle in Figure 8.3 (p. 47) , if you configure
task E to be a basic DMA cycle by setting the cycle_ctrl field to 3’b001.
8.4.2.3.5 Memory scatter-gather
In memory scatter-gather mode the controller receives an initial request and then performs four DMA
transfers using the primary data structure. After this transfer completes, it starts a DMA cycle using the
alternate data structure. After this cycle completes, the controller performs another four DMA transfers
using the primary data structure. The controller continues to switch from primary to alternate to primary…
until either:
• the host processor configures the alternate data structure for a basic cycle
• it reads an invalid data structure.
Note
After the controller completes the N primary transfers it invalidates the primary data
structure by setting the cycle_ctrl field to b000.
The controller only asserts dma_done[C] when the scatter-gather transaction completes using an auto-
request cycle.
In scatter-gather mode, the controller uses the primary data structure to program the alternate data
structure. Table 8.4 (p. 49) lists the fields of the channel_cfg memory location for the primary data
structure, that you must program with constant values and those that can be user defined.
Table 8.4. channel_cfg for a primary data structure, in memory scatter-gather mode
BitFieldValueDescription
Constant-value fields:
[31:30}dst_incb10Configures the controller to use word increments for the address
[29:28]dst_sizeb10Configures the controller to use word transfers
[27:26]src_incb10Configures the controller to use word increments for the address
[25:24]src_sizeb10Configures the controller to use word transfers
[17:14]R_powerb0010Configures the controller to perform four DMA transfers
[3]next_useburst0For a memory scatter-gather DMA cycle, this bit must be set to zero
[2:0]cycle_ctrlb100Configures the controller to perform a memory scatter-gather DMA cycle
User defined values:
[23:21]dst_prot_ctrl-Configures the state of HPROT when the controller writes the destination data
[20:18]src_prot_ctrl-Configures the state of HPROT when the controller reads the source data
[13:4]n_minus_1N
1
Because the R_power field is set to four, you must set N to be a multiple of four. The value given by N/4 is the number of times
that you must configure the alternate data structure.
1
Configures the controller to perform N DMA transfers, where N is a multiple of four
See Section 8.4.3.3 (p. 56) for more information.
Figure 8.4 (p. 50) shows a memory scatter-gather example.
2014-07-02 - Gecko Family - d0001_Rev1.3049
www.silabs.com
Page 50
Figure 8.4. Memory scatter-gather example
...the world's most energy friendly microcontrollers
Initialization:
Memory scatter- gather transaction:
Request
1. Configure primary to enable the copy A, B, C, and D operations: cycle_ctrl = b100, 2
2. Write the primary source data to memory, using the structure shown in the following table.
Data for Task Acycle_ctrl = b101, 2
Data for Task B
Data for Task C
Data for Task D
In Figure 8.4 (p. 50) :
Initialization1. The host processor configures the primary data structure to operate in memory
scatter-gather mode by setting cycle_ctrl to b100. Because a data structure for a
single channel consists of four words then you must set 2R to 4. In this example,
there are four tasks and therefore N is set to 16.
2. The host processor writes the data structure for tasks A, B, C, and D to the
memory locations that the primary src_data_end_ptr specifies.
3. The host processor enables the channel.
The memory scatter-gather transaction commences when the controller receives a request on
dma_req[ ] or a manual request from the host processor. The transaction continues as follows:
Primary, copy A1. After receiving a request, the controller performs four DMA transfers. These
transfers write the alternate data structure for task A.
2. The controller generates an auto-request for the channel and then arbitrates.
Task A3. The controller performs task A. After it completes the task, it generates an
auto-request for the channel and then arbitrates.
Primary, copy B4. The controller performs four DMA transfers. These transfers write the alternate
data structure for task B.
5. The controller generates an auto-request for the channel and then arbitrates.
Task B6. The controller performs task B. After it completes the task, it generates an
auto-request for the channel and then arbitrates.
Primary, copy C7. The controller performs four DMA transfers. These transfers write the alternate
data structure for task C.
2014-07-02 - Gecko Family - d0001_Rev1.3050
www.silabs.com
Page 51
...the world's most energy friendly microcontrollers
8. The controller generates an auto-request for the channel and then arbitrates.
Task C9. The controller performs task C. After it completes the task, it generates an
auto-request for the channel and then arbitrates.
Primary, copy D10.The controller performs four DMA transfers. These transfers write the alternate
data structure for task D.
11.The controller sets the cycle_ctrl bits of the primary data structure to b000, to
indicate that this data structure is now invalid.
12.The controller generates an auto-request for the channel and then arbitrates.
Task D13.The controller performs task D using an auto-request cycle.
14.The controller sets dma_done[C] HIGH for one HFCORECLK cycle and enters
the arbitration process.
8.4.2.3.6 Peripheral scatter-gather
In peripheral scatter-gather mode the controller receives an initial request from a peripheral and then it
performs four DMA transfers using the primary data structure. It then immediately starts a DMA cycle
using the alternate data structure, without re-arbitrating.
Note
These are the only circumstances, where the controller does not enter the arbitration
process after completing a transfer using the primary data structure.
After this cycle completes, the controller re-arbitrates and if the controller receives a request from the
peripheral that has the highest priority then it performs another four DMA transfers using the primary
data structure. It then immediately starts a DMA cycle using the alternate data structure, without rearbitrating. The controller continues to switch from primary to alternate to primary… until either:
• the host processor configures the alternate data structure for a basic cycle
• it reads an invalid data structure.
Note
After the controller completes the N primary transfers it invalidates the primary data
structure by setting the cycle_ctrl field to b000.
The controller asserts dma_done[C] when the scatter-gather transaction completes using a basic cycle.
In scatter-gather mode, the controller uses the primary data structure to program the alternate data
structure. Table 8.5 (p. 51) lists the fields of the channel_cfg memory location for the primary data
structure, that you must program with constant values and those that can be user defined.
Table 8.5. channel_cfg for a primary data structure, in peripheral scatter-gather mode
BitFieldValueDescription
Constant-value fields:
[31:30]dst_incb10Configures the controller to use word increments for the address
[29:28]dst_sizeb10Configures the controller to use word transfers
[27:26]src_incb10Configures the controller to use word increments for the address
[25:24]src_sizeb10Configures the controller to use word transfers
[17:14]R_powerb0010Configures the controller to perform four DMA transfers
[2:0]cycle_ctrlb110Configures the controller to perform a peripheral scatter-gather DMA cycle
User defined values:
[23:21]dst_prot_ctrl-Configures the state of HPROT when the controller writes the destination data
2014-07-02 - Gecko Family - d0001_Rev1.3051
www.silabs.com
Page 52
...the world's most energy friendly microcontrollers
BitFieldValueDescription
[20:18]src_prot_ctrl-Configures the state of HPROT when the controller reads the source data
[13:4]n_minus_1N
1
Configures the controller to perform N DMA transfers, where N is a multiple of four
[3]next_useburst-When set to 1, the controller sets the chnl_useburst_set [C] bit to 1 after the
alternate transfer completes
1
Because the R_power field is set to four, you must set N to be a multiple of four. The value given by N/4 is the number of times
that you must configure the alternate data structure.
See Section 8.4.3.3 (p. 56) for more information.
Figure 8.5 (p. 52) shows a peripheral scatter-gather example.
Figure 8.5. Peripheral scatter-gather example
Initialization:
Peripheral scatter- gather transaction:
Request
1. Configure primary to enable the copy A, B, C, and D operations: cycle_ctrl = b110, 2
2. Write the primary source data in memory, using the structure shown in the following table.
0xXXXXXXXXData for Task A
0xXXXXXXXX
0xXXXXXXXX
0xXXXXXXXX
Task B
Copy from C in
memory, to Alternate
Copy from D in
memory, to Alternate
Request
Request
Request
Request
Task C
Request
Task D
N = 8, 2
N = 5, 2
N = 4, 2
R
R
R
= 2
= 8
= 4
dma_done[C]
In Figure 8.5 (p. 52) :
Initialization1. The host processor configures the primary data structure to operate in peripheral
scatter-gather mode by setting cycle_ctrl to b110. Because a data structure for a
single channel consists of four words then you must set 2R to 4. In this example,
there are four tasks and therefore N is set to 16.
2. The host processor writes the data structure for tasks A, B, C, and D to the
memory locations that the primary src_data_end_ptr specifies.
3. The host processor enables the channel.
The peripheral scatter-gather transaction commences when the controller receives a request on
dma_req[ ]. The transaction continues as follows:
2014-07-02 - Gecko Family - d0001_Rev1.3052
www.silabs.com
Page 53
...the world's most energy friendly microcontrollers
Primary, copy A1. After receiving a request, the controller performs four DMA transfers. These
transfers write the alternate data structure for task A.
Task A2. The controller performs task A.
3. After the controller completes the task it enters the arbitration process.
After the peripheral issues a new request and it has the highest priority then the process continues with:
Primary, copy B4. The controller performs four DMA transfers. These transfers write the alternate
data structure for task B.
Task B5. The controller performs task B. To enable the controller to complete the task,
the peripheral must issue a further three requests.
6. After the controller completes the task it enters the arbitration process.
After the peripheral issues a new request and it has the highest priority then the process continues with:
Primary, copy C7. The controller performs four DMA transfers. These transfers write the alternate
data structure for task C.
Task C8. The controller performs task C.
9. After the controller completes the task it enters the arbitration process.
After the peripheral issues a new request and it has the highest priority then the process continues with:
Primary, copy D10.The controller performs four DMA transfers. These transfers write the alternate
data structure for task D.
11.The controller sets the cycle_ctrl bits of the primary data structure to b000, to
indicate that this data structure is now invalid.
Task D12.The controller performs task D using a basic cycle.
13.The controller sets dma_done[C] HIGH for one HFCORECLK cycle and enters
the arbitration process.
8.4.2.4 Error signaling
If the controller detects an ERROR response on the AHB-Lite master interface, it:
• disables the channel that corresponds to the ERROR
• sets dma_err HIGH.
After the host processor detects that dma_err is HIGH, it must check which channel was active when
the ERROR occurred. It can do this by:
1. Reading the DMA_CHENS register to create a list of disabled channels.
When a channel asserts dma_done[ ] then the controller disables the channel. The program running
on the host processor must always keep a record of which channels have recently asserted their
dma_done[ ] outputs.
2. It must compare the disabled channels list from step 1 (p. 53) , with the record of the channels that
have recently set their dma_done[ ] outputs. The channel with no record of dma_done[C] being
set is the channel that the ERROR occurred on.
8.4.3 Channel control data structure
You must provide an area of system memory to contain the channel control data structure. This system
memory must:
2014-07-02 - Gecko Family - d0001_Rev1.3053
www.silabs.com
Page 54
...the world's most energy friendly microcontrollers
• provide a contiguous area of system memory that the controller and host processor can access
• have a base address that is an integer multiple of the total size of the channel control data structure.
Figure 8.6 (p. 54) shows the memory that the controller requires for the channel control data structure,
when all 8 channels and the optional alternate data structure are in use.
Figure 8.6. Memory map for 8 channels, including the alternate data structure
This structure in Figure 8.6 (p. 54) uses 256 bytes of system memory. The controller uses the lower
8 address bits to enable it to access all of the elements in the structure and therefore the base address
must be at 0xXXXXXX00.
You can configure the base address for the primary data structure by writing the appropriate value in
the DMA_CTRLBASE register.
You do not need to set aside the full 256 bytes if all dma channels are not used or if all alternate
descriptors are not used. If, for example, only 4 channels are used and they only need the primary
descriptors, then only 64 bytes need to be set aside.
Table 8.6 (p. 54) lists the address bits that the controller uses when it accesses the elements of the
channel control data structure.
Table 8.6. Address bit settings for the channel control data structure
Address bits
[7][6][5][4][3:0]
AC[2]C[1]C[0]0x0, 0x4, or 0x8
Where:
ASelects one of the channel control data structures:
A = 0Selects the primary data structure.
A = 1Selects the alternate data structure.
C[2:0]Selects the DMA channel.
Address[3:0]Selects one of the control elements:
0x0Selects the source data end pointer.
0x4Selects the destination data end pointer.
0x8Selects the control data configuration.
0xCThe controller does not access this address location. If required, you can
enable the host processor to use this memory location as system memory.
Note
It is not necessary for you to calculate the base address of the alternate data structure
because the DMA_ALTCTRLBASE register provides this information.
2014-07-02 - Gecko Family - d0001_Rev1.3054
www.silabs.com
Page 55
...the world's most energy friendly microcontrollers
Figure 8.7 (p. 55) shows a detailed memory map of the descriptor structure.
Figure 8.7. Detailed memory map for the 8 channels, including the alternate data structure
The controller uses the system memory to enable it to access two pointers and the control information
that it requires for each channel. The following subsections will describe these 32-bit memory locations
and how the controller calculates the DMA transfer address.
8.4.3.1 Source data end pointer
The src_data_end_ptr memory location contains a pointer to the end address of the source data.
Figure 8.7 (p. 55) lists the bit assignments for this memory location.
Table 8.7. src_data_end_ptr bit assignments
BitNameDescription
[31:0]src_data_end_ptrPointer to the end address of the source data
Before the controller can perform a DMA transfer, you must program this memory location with the end
address of the source data. The controller reads this memory location when it starts a 2R DMA transfer.
Note
The controller does not write to this memory location.
2014-07-02 - Gecko Family - d0001_Rev1.3055
www.silabs.com
Page 56
...the world's most energy friendly microcontrollers
8.4.3.2 Destination data end pointer
The dst_data_end_ptr memory location contains a pointer to the end address of the destination data.
Table 8.8 (p. 56) lists the bit assignments for this memory location.
Table 8.8. dst_data_end_ptr bit assignments
BitNameDescription
[31:0]dst_data_end_ptrPointer to the end address of the destination data
Before the controller can perform a DMA transfer, you must program this memory location with the end
address of the destination data. The controller reads this memory location when it starts a 2R DMA
transfer.
Note
The controller does not write to this memory location.
8.4.3.3 Control data configuration
For each DMA transfer, the channel_cfg memory location provides the control information for the
controller. Figure 8.8 (p. 56) shows the bit assignments for this memory location.
Figure 8.8. channel_cfg bit assignments
3121 2013
30 29 28 27 26 25 24 23
dst_inc
src_inc
dst_sizesrc_size
18 17
R_powern_minus_1
src_prot_ctrl
dst_prot_ctrl
Table 8.9 (p. 56) lists the bit assignments for this memory location.
[23:21]dst_prot_ctrlSet the bits to control the state of HPROT when the controller writes the destination data.
Bit [23]This bit has no effect on the DMA.
Bit [22]This bit has no effect on the DMA.
Bit [21]Controls the state of HPROT as follows:
0 = HPROT is LOW and the access is non-privileged.
1 = HPROT is HIGH and the access is privileged.
[20:18]src_prot_ctrlSet the bits to control the state of HPROT when the controller reads the source data.
Bit [20]This bit has no effect on the DMA.
Bit [19]This bit has no effect on the DMA.
Bit [18]Controls the state of HPROT as follows:
0 = HPROT is LOW and the access is non-privileged.
1 = HPROT is HIGH and the access is privileged.
[17:14]R_powerSet these bits to control how many DMA transfers can occur before the controller re-arbitrates.
The possible arbitration rate settings are:
b0000Arbitrates after each DMA transfer.
b0001Arbitrates after 2 DMA transfers.
b0010Arbitrates after 4 DMA transfers.
b0011Arbitrates after 8 DMA transfers.
b0100Arbitrates after 16 DMA transfers.
b0101Arbitrates after 32 DMA transfers.
b0110Arbitrates after 64 DMA transfers.
b0111Arbitrates after 128 DMA transfers.
2014-07-02 - Gecko Family - d0001_Rev1.3057
www.silabs.com
Page 58
BitNameDescription
b1000Arbitrates after 256 DMA transfers.
b1001Arbitrates after 512 DMA transfers.
b1010-b1111Arbitrates after 1024 DMA transfers. This means that no arbitration occurs
...the world's most energy friendly microcontrollers
during the DMA transfer because the maximum transfer size is 1024.
[13:4]n_minus_1Prior to the DMA cycle commencing, these bits represent the total number of DMA transfers
[3]next_useburstControls if the chnl_useburst_set [C] bit is set to a 1, when the controller is performing a
that the DMA cycle contains. You must set these bits according to the size of DMA cycle that
you require.
The 10-bit value indicates the number of DMA transfers, minus one. The possible values are:
b000000000 = 1 DMA transfer
b000000001 = 2 DMA transfers
b000000010 = 3 DMA transfers
b000000011 = 4 DMA transfers
b000000100 = 5 DMA transfers
.
.
.
b111111111 = 1024 DMA transfers.
The controller updates this field immediately prior to it entering the arbitration process. This
enables the controller to store the number of outstanding DMA transfers that are necessary to
complete the DMA cycle.
peripheral scatter-gather and is completing a DMA cycle that uses the alternate data structure.
Note
Immediately prior to completion of the DMA cycle that the alternate data structure
specifies, the controller sets the chnl_useburst_set [C] bit to 0 if the number of
remaining transfers is less than 2R. The setting of the next_useburst bit controls if the
controller performs an additional modification of the chnl_useburst_set [C] bit.
In peripheral scatter-gather DMA cycle then after the DMA cycle that uses the alternate data
structure completes, either:
0 = the controller does not change the value of the chnl_useburst_set [C] bit. If the
chnl_useburst_set [C] bit is 0 then for all the remaining DMA cycles in the peripheral scattergather transaction, the controller responds to requests on dma_req[ ] and dma_sreq[],
when it performs a DMA cycle that uses an alternate data structure.
1 = the controller sets the chnl_useburst_set [C] bit to a 1. Therefore, for the remaining DMA
cycles in the peripheral scatter-gather transaction, the controller only responds to requests on
dma_req[ ], when it performs a DMA cycle that uses an alternate data structure.
[2:0]cycle_ctrlThe operating mode of the DMA cycle. The modes are:
b000 Stop. Indicates that the data structure is invalid.
b001 Basic. The controller must receive a new request, prior to it entering the arbitration
process, to enable the DMA cycle to complete.
b010 Auto-request. The controller automatically inserts a request for the appropriate channel
during the arbitration process. This means that the initial request is sufficient to enable
the DMA cycle to complete.
b011 Ping-pong. The controller performs a DMA cycle using one of the data structures. After
the DMA cycle completes, it performs a DMA cycle using the other data structure. After
the DMA cycle completes and provided that the host processor has updated the original
data structure, it performs a DMA cycle using the original data structure. The controller
continues to perform DMA cycles until it either reads an invalid data structure or the
host processor changes the cycle_ctrl bits to b001 or b010. See Section 8.4.2.3.4 (p.
47) .
b100 Memory scatter/gather. See Section 8.4.2.3.5 (p. 49) .
When the controller operates in memory scatter-gather mode, you must only use this
value in the primary data structure.
b101 Memory scatter/gather. See Section 8.4.2.3.5 (p. 49) .
When the controller operates in memory scatter-gather mode, you must only use this
value in the alternate data structure.
b110 Peripheral scatter/gather. See Section 8.4.2.3.6 (p. 51) .
2014-07-02 - Gecko Family - d0001_Rev1.3058
www.silabs.com
Page 59
...the world's most energy friendly microcontrollers
BitNameDescription
When the controller operates in peripheral scatter-gather mode, you must only use this
value in the primary data structure.
b111 Peripheral scatter/gather. See Section 8.4.2.3.6 (p. 51) .
When the controller operates in peripheral scatter-gather mode, you must only use this
value in the alternate data structure.
At the start of a DMA cycle, or 2R DMA transfer, the controller fetches the channel_cfg from system
memory. After it performs 2R, or N, transfers it stores the updated channel_cfg in system memory.
The controller does not support a dst_size value that is different to the src_size value. If it detects a
mismatch in these values, it uses the src_size value for source and destination and when it next updates
the n_minus_1 field, it also sets the dst_size field to the same as the src_size field.
After the controller completes the N transfers it sets the cycle_ctrl field to b000, to indicate that the
channel_cfg data is invalid. This prevents it from repeating the same DMA transfer.
8.4.3.4 Address calculation
To calculate the source address of a DMA transfer, the controller performs a left shift operation on the
n_minus_1 value by a shift amount that src_inc specifies, and then subtracts the resulting value from the
source data end pointer. Similarly, to calculate the destination address of a DMA transfer, it performs a
left shift operation on the n_minus_1 value by a shift amount that dst_inc specifies, and then subtracts
the resulting value from the destination end pointer.
Depending on the value of src_inc and dst_inc, the source address and destination address can be
calculated using the equations:
The DMA interacts with the Energy Management Unit (EMU) to allow transfers from , e.g., the LEUART
to occur in EM2. The EMU can wake up the DMA sufficiently long to allow data transfers to occur. See
section "DMA Support" in the LEUART documentation.
8.4.5 Interrupts
The PL230 dma_done[n:0] signals (one for each channel) as well as the dma_err signal, are available as
interrupts to the Cortex-M3 core. They are combined into one interrupt vector, DMA_INT. If the interrupt
for the DMA is enabled in the ARM Cortex-M3 core, an interrupt will be made if one or more of the
interrupt flags in DMA_IF and their corresponding bits in DMA_IEN are set.
8.5 Examples
A basic example of how to program the DMA for transferring 42 bytes from the USART1 to
memory location 0x20003420. Assumes that the channel 0 is currently disabled, and that the
DMA_ALTCTRLBASE register has already been configured.
2014-07-02 - Gecko Family - d0001_Rev1.3060
www.silabs.com
Page 61
...the world's most energy friendly microcontrollers
Example 8.1. DMA Transfer
1. Configure the channel select for using USART1 with DMA channel 0
a. Write SOURCESEL=0b001101 and SIGSEL=XX to DMA_CHCTRL0
2. Configure the primary channel descriptor for DMA channel 0
a. Write XX (read address of USART1) to src_data_end_ptr
b. Write 0x20003420 + 40 to dst_data_end_ptr c
c. Write these values to channel_cfg for channel 0:
i. dst_inc=b01 (destination halfword address increment)
ii. dst_size=b01 (halfword transfer size)
iii. src_inc=b11 (no address increment for source)
iv.src_size=01 (halfword transfer size)
v. dst_prot_ctrl=000 (no cache/buffer/privilege)
vi.src_prot_ctrl=000 (no cache/buffer/privilege)
vii.R_power=b0000 (arbitrate after each DMA transfer)
viii.n_minus_1=d20 (transfer 21 halfwords)
ix.next_useburst=b0 (not applicable)
x. cycle_ctrl=b001 (basic operating mode)
3. Enable the DMA
a. Write EN=1 to DMA_CONFIG
4. Disable the single requests for channel 0 (i.e., do not react to data available, wait for buffer full)
a. Write DMA_CHUSEBURSTS[0]=1
5. Enable buffer-full requests for channel 0
a. Write DMA_CHREQMASKC[0]=1
6. Use the primary data structure for channel 0
a. Write DMA_CHALTC[0]=1
7. Enable channel 0
a. Write DMA_CHENS[0]=1
2014-07-02 - Gecko Family - d0001_Rev1.3061
www.silabs.com
Page 62
...the world's most energy friendly microcontrollers
8.6 Register Map
The offset register address is relative to the registers base address.
OffsetNameTypeDescription
0x000DMA_STATUSRDMA Status Registers
0x004DMA_CONFIGWDMA Configuration Register
0x008DMA_CTRLBASERWChannel Control Data Base Pointer Register
0x00CDMA_ALTCTRLBASERChannel Alternate Control Data Base Pointer Register
0x010DMA_CHWAITSTATUSRChannel Wait on Request Status Register
0x014DMA_CHSWREQW1Channel Software Request Register
0x018DMA_CHUSEBURSTSRW1HChannel Useburst Set Register
0x01CDMA_CHUSEBURSTCW1Channel Useburst Clear Register
0x020DMA_CHREQMASKSRW1Channel Request Mask Set Register
0x024DMA_CHREQMASKCW1Channel Request Mask Clear Register
0x028DMA_CHENSRW1Channel Enable Set Register
0x02CDMA_CHENCW1Channel Enable Clear Register
0x030DMA_CHALTSRW1Channel Alternate Set Register
0x034DMA_CHALTCW1Channel Alternate Clear Register
0x038DMA_CHPRISRW1Channel Priority Set Register
0x03CDMA_CHPRICW1Channel Priority Clear Register
0x04CDMA_ERRORCRWBus Error Clear Register
0xE10DMA_CHREQSTATUSRChannel Request Status
0xE18DMA_CHSREQSTATUSRChannel Single Request Status
0x1000DMA_IFRInterrupt Flag Register
0x1004DMA_IFSW1Interrupt Flag Set Register
0x1008DMA_IFCW1Interrupt Flag Clear Register
0x100CDMA_IENRWInterrupt Enable register
0x1100DMA_CH0_CTRLRWChannel Control Register
0x1104DMA_CH1_CTRLRWChannel Control Register
0x1108DMA_CH2_CTRLRWChannel Control Register
0x110CDMA_CH3_CTRLRWChannel Control Register
0x1110DMA_CH4_CTRLRWChannel Control Register
0x1114DMA_CH5_CTRLRWChannel Control Register
0x1118DMA_CH6_CTRLRWChannel Control Register
0x111CDMA_CH7_CTRLRWChannel Control Register
2014-07-02 - Gecko Family - d0001_Rev1.3062
www.silabs.com
Page 63
...the world's most energy friendly microcontrollers
8.7 Register Description
8.7.1 DMA_STATUS - DMA Status Registers
OffsetBit Position
0x000
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
0x07
R
CHNUM
16
15
141312
BitNameResetAccessDescription
31:21Reserved
20:16CHNUM0x07RChannel Number
Number of available DMA channels minus one.
15:8Reserved
7:4STATE0x0RControl Current State
State can be one of the following. Higher values (11-15) are undefined.
ValueModeDescription
0IDLEIdle
1RDCHCTRLDATAReading channel controller data
2RDSRCENDPTRReading source data end pointer
3RDDSTENDPTRReading destination data end pointer
4RDSRCDATAReading source data
5WRDSTDATAWriting destination data
6WAITREQCLRWaiting for DMA request to clear
7WRCHCTRLDATAWriting channel controller data
8STALLEDStalled
9DONEDone
10PERSCATTRANSPeripheral scatter-gather transition
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
11
10
0x0
R
STATE
0
0
R
EN
3:1Reserved
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
0EN0RDMA Enable Status
When this bit is 1, the DMA is enabled.
8.7.2 DMA_CONFIG - DMA Configuration Register
OffsetBit Position
0x004
Reset
Access
Name
BitNameResetAccessDescription
31:6Reserved
5CHPROT0WChannel Protection Control
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
10
0
W
CHPROT
0
0
W
EN
2014-07-02 - Gecko Family - d0001_Rev1.3063
www.silabs.com
Page 64
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
Control whether accesses done by the DMA controller are privileged or not. When CHPROT = 1 then HPROT is HIGH and the access
is privileged. When CHPROT = 0 then HPROT is LOW and the access is non-privileged.
4:1Reserved
0EN0WEnable DMA
Set this bit to enable the DMA controller.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
8.7.3 DMA_CTRLBASE - Channel Control Data Base Pointer Register
OffsetBit Position
0x008
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
0x00000000
RW
CTRLBASE
141312
11
9
8
7
6
5
4
3
2
10
1
BitNameResetAccessDescription
31:0CTRLBASE0x00000000RWChannel Control Data Base Pointer
The base pointer for a location in system memory that holds the channel control data structure. This register must be written to point
to a location in system memory with the channel control data structure before the DMA can be used. Note that ctrl_base_ptr[8:0]
must be 0.
8.7.4 DMA_ALTCTRLBASE - Channel Alternate Control Data Base Pointer
0
Register
OffsetBit Position
0x00C
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
0x00000080
R
ALTCTRLBASE
11
BitNameResetAccessDescription
31:0ALTCTRLBASE0x00000080RChannel Alternate Control Data Base Pointer
The base address of the alternate data structure. This register will read as DMA_CTRLBASE + 0x80.
9
8
7
10
6
5
4
3
2
1
0
2014-07-02 - Gecko Family - d0001_Rev1.3064
www.silabs.com
Page 65
...the world's most energy friendly microcontrollers
8.7.5 DMA_CHWAITSTATUS - Channel Wait on Request Status Register
OffsetBit Position
0x010
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
9
10
BitNameResetAccessDescription
31:8Reserved
7CH7WAITSTATUS1RChannel 7 Wait on Request Status
Status for wait on request for channel 7.
6CH6WAITSTATUS1RChannel 6 Wait on Request Status
Status for wait on request for channel 6.
5CH5WAITSTATUS1RChannel 5 Wait on Request Status
Status for wait on request for channel 5.
4CH4WAITSTATUS1RChannel 4 Wait on Request Status
Status for wait on request for channel 4.
3CH3WAITSTATUS1RChannel 3 Wait on Request Status
Status for wait on request for channel 3.
2CH2WAITSTATUS1RChannel 2 Wait on Request Status
Status for wait on request for channel 2.
1CH1WAITSTATUS1RChannel 1 Wait on Request Status
Status for wait on request for channel 1.
0CH0WAITSTATUS1RChannel 0 Wait on Request Status
Status for wait on request for channel 0.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
Write 1 to this bit to generate a DMA request for this channel.
6CH6SWREQ0W1Channel 6 Software Request
Write 1 to this bit to generate a DMA request for this channel.
2014-07-02 - Gecko Family - d0001_Rev1.3065
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
10
8
7
6
5
4
3
0
0
0
0
0
W1W1W1W1W1
CH7SWREQ
CH6SWREQ
CH5SWREQ
CH4SWREQ
CH3SWREQ
www.silabs.com
2
1
0
0
0
0
W1
W1
W1
CH2SWREQ
CH1SWREQ
CH0SWREQ
Page 66
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
5CH5SWREQ0W1Channel 5 Software Request
Write 1 to this bit to generate a DMA request for this channel.
4CH4SWREQ0W1Channel 4 Software Request
Write 1 to this bit to generate a DMA request for this channel.
3CH3SWREQ0W1Channel 3 Software Request
Write 1 to this bit to generate a DMA request for this channel.
2CH2SWREQ0W1Channel 2 Software Request
Write 1 to this bit to generate a DMA request for this channel.
1CH1SWREQ0W1Channel 1 Software Request
Write 1 to this bit to generate a DMA request for this channel.
0CH0SWREQ0W1Channel 0 Software Request
Write 1 to this bit to generate a DMA request for this channel.
8.7.7 DMA_CHUSEBURSTS - Channel Useburst Set Register
OffsetBit Position
0x018
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
BitNameResetAccessDescription
31:8Reserved
7CH7USEBURSTS0RW1HChannel 7 Useburst Set
See description for channel 0.
6CH6USEBURSTS0RW1HChannel 6 Useburst Set
See description for channel 0.
5CH5USEBURSTS0RW1HChannel 5 Useburst Set
See description for channel 0.
4CH4USEBURSTS0RW1HChannel 4 Useburst Set
See description for channel 0.
3CH3USEBURSTS0RW1HChannel 3 Useburst Set
See description for channel 0.
2CH2USEBURSTS0RW1HChannel 2 Useburst Set
See description for channel 0.
1CH1USEBURSTS0RW1HChannel 1 Useburst Set
See description for channel 0.
0CH0USEBURSTS0RW1HChannel 0 Useburst Set
Write to 1 to enable the useburst setting for this channel. Reading returns the useburst status. After the penultimate 2^R transfer
completes, if the number of remaining transfers, N, is less than 2^R then the controller resets the chnl_useburst_set bit to 0.
This enables you to complete the remaining transfers using dma_req[] or dma_sreq[]. In peripheral scatter-gather mode, if the
next_useburst bit is set in channel_cfg then the controller sets the chnl_useburst_set[C] bit to a 1, when it completes the DMA cycle
that uses the alternate data structure.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
10
0
0
0
0
0
0
RW1H
RW1H
RW1H
RW1H
RW1H
RW1H
CH7USEBURSTS
CH6USEBURSTS
CH5USEBURSTS
CH4USEBURSTS
CH3USEBURSTS
CH2USEBURSTS
0
0
0
RW1H
RW1H
CH1USEBURSTS
CH0USEBURSTS
2014-07-02 - Gecko Family - d0001_Rev1.3066
www.silabs.com
Page 67
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
ValueModeDescription
0SINGLEANDBURSTChannel responds to both single and burst requests
1BURSTONLYChannel responds to burst requests only
Write to 1 to enable peripheral requests for this channel.
6CH6REQMASKC0W1Channel 6 Request Mask Clear
Write to 1 to enable peripheral requests for this channel.
5CH5REQMASKC0W1Channel 5 Request Mask Clear
Write to 1 to enable peripheral requests for this channel.
4CH4REQMASKC0W1Channel 4 Request Mask Clear
Write to 1 to enable peripheral requests for this channel.
3CH3REQMASKC0W1Channel 3 Request Mask Clear
Write to 1 to enable peripheral requests for this channel.
2CH2REQMASKC0W1Channel 2 Request Mask Clear
Write to 1 to enable peripheral requests for this channel.
1CH1REQMASKC0W1Channel 1 Request Mask Clear
Write to 1 to enable peripheral requests for this channel.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
10
0
W1W1W1W1W1
CH7REQMASKC
4
0
0
0
CH6REQMASKC
CH5REQMASKC
CH4REQMASKC
3
2
1
0
0
0
0
0
W1
W1
W1
CH3REQMASKC
CH2REQMASKC
CH1REQMASKC
CH0REQMASKC
2014-07-02 - Gecko Family - d0001_Rev1.3068
www.silabs.com
Page 69
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
0CH0REQMASKC0W1Channel 0 Request Mask Clear
Write to 1 to enable peripheral requests for this channel.
8.7.11 DMA_CHENS - Channel Enable Set Register
OffsetBit Position
0x028
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
BitNameResetAccessDescription
31:8Reserved
7CH7ENS0RW1Channel 7 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
6CH6ENS0RW1Channel 6 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
5CH5ENS0RW1Channel 5 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
4CH4ENS0RW1Channel 4 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
3CH3ENS0RW1Channel 3 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
2CH2ENS0RW1Channel 2 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
1CH1ENS0RW1Channel 1 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
0CH0ENS0RW1Channel 0 Enable Set
Write to 1 to enable this channel. Reading returns the enable status of the channel.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
11
10
0
0
0
0
0
0
RW1
RW1
RW1
RW1
RW1
RW1
CH7ENS
CH6ENS
CH5ENS
CH4ENS
CH3ENS
CH2ENS
0
0
0
RW1
RW1
CH1ENS
CH0ENS
8.7.12 DMA_CHENC - Channel Enable Clear Register
OffsetBit Position
0x02C
Reset
Access
Name
BitNameResetAccessDescription
31:8Reserved
2014-07-02 - Gecko Family - d0001_Rev1.3069
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
10
0
0
0
0
0
0
W1W1W1W1W1
CH7ENC
CH6ENC
CH5ENC
CH4ENC
W1
CH3ENC
CH2ENC
0
0
0
W1
W1
CH1ENC
CH0ENC
www.silabs.com
Page 70
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
7CH7ENC0W1Channel 7 Enable Clear
Write to 1 to disable this channel. See also description for channel 0.
6CH6ENC0W1Channel 6 Enable Clear
Write to 1 to disable this channel. See also description for channel 0.
5CH5ENC0W1Channel 5 Enable Clear
Write to 1 to disable this channel. See also description for channel 0.
4CH4ENC0W1Channel 4 Enable Clear
Write to 1 to disable this channel. See also description for channel 0.
3CH3ENC0W1Channel 3 Enable Clear
Write to 1 to disable this channel. See also description for channel 0.
2CH2ENC0W1Channel 2 Enable Clear
Write to 1 to disable this channel. See also description for channel 0.
1CH1ENC0W1Channel 1 Enable Clear
Write to 1 to disable this channel. See also description for channel 0.
0CH0ENC0W1Channel 0 Enable Clear
Write to 1 to disable this channel. Note that the controller disables a channel, by setting the appropriate bit, when either it completes
the DMA cycle, or it reads a channel_cfg memory location which has cycle_ctrl = b000, or an ERROR occurs on the AHB-Lite bus.
A read from this field returns the value of CH0ENS from the DMA_CHENS register.
8.7.13 DMA_CHALTS - Channel Alternate Set Register
OffsetBit Position
0x030
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
BitNameResetAccessDescription
31:8Reserved
7CH7ALTS0RW1Channel 7 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
6CH6ALTS0RW1Channel 6 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
5CH5ALTS0RW1Channel 5 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
4CH4ALTS0RW1Channel 4 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
3CH3ALTS0RW1Channel 3 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
2CH2ALTS0RW1Channel 2 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
1CH1ALTS0RW1Channel 1 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
10
8
7
6
0
0
RW1
RW1
CH7ALTS
CH6ALTS
5
4
0
0
RW1
RW1
CH5ALTS
CH4ALTS
3
2
0
0
RW1
RW1
CH3ALTS
CH2ALTS
1
0
0
0
RW1
RW1
CH1ALTS
CH0ALTS
2014-07-02 - Gecko Family - d0001_Rev1.3070
www.silabs.com
Page 71
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
0CH0ALTS0RW1Channel 0 Alternate Structure Set
Write to 1 to select the alternate structure for this channel.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
Write to 1 to clear high priority for this channel.
Write to 1 to clear high priority for this channel.
Write to 1 to clear high priority for this channel.
Write to 1 to clear high priority for this channel.
Write to 1 to clear high priority for this channel.
Write to 1 to clear high priority for this channel.
Write to 1 to clear high priority for this channel.
201918
17
16
15
141312
11
10
9
8
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
0
W1W1W1W1W1
CH7PRIC
CH6PRIC
CH5PRIC
CH4PRIC
W1
CH3PRIC
CH2PRIC
W1
W1
CH1PRIC
CH0PRIC
2014-07-02 - Gecko Family - d0001_Rev1.3072
www.silabs.com
Page 73
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
Write to 1 to clear high priority for this channel.
8.7.17 DMA_ERRORC - Bus Error Clear Register
OffsetBit Position
0x04C
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
10
BitNameResetAccessDescription
31:1Reserved
0ERRORC0RWBus Error Clear
This bit is set high if an AHB bus error has occurred. Writing a 1 to this bit will clear the bit. If the error is deasserted at the same time
as an error occurs on the bus, the error condition takes precedence and ERRORC remains asserted.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
8.7.18 DMA_CHREQSTATUS - Channel Request Status
OffsetBit Position
0xE10
Reset
Access
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
RW
ERRORC
9
8
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
0
R
R
R
R
R
R
R
R
Name
BitNameResetAccessDescription
31:8Reserved
7CH7REQSTATUS0RChannel 7 Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
6CH6REQSTATUS0RChannel 6 Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
5CH5REQSTATUS0RChannel 5 Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
4CH4REQSTATUS0RChannel 4 Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
3CH3REQSTATUS0RChannel 3 Request Status
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
CH7REQSTATUS
CH6REQSTATUS
CH5REQSTATUS
CH4REQSTATUS
CH3REQSTATUS
CH2REQSTATUS
CH1REQSTATUS
CH0REQSTATUS
2014-07-02 - Gecko Family - d0001_Rev1.3073
www.silabs.com
Page 74
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
2CH2REQSTATUS0RChannel 2 Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
1CH1REQSTATUS0RChannel 1 Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
0CH0REQSTATUS0RChannel 0 Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using 2R DMA transfers.
8.7.19 DMA_CHSREQSTATUS - Channel Single Request Status
OffsetBit Position
0xE18
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
9
10
BitNameResetAccessDescription
31:8Reserved
7CH7SREQSTATUS0RChannel 7 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
6CH6SREQSTATUS0RChannel 6 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
5CH5SREQSTATUS0RChannel 5 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
4CH4SREQSTATUS0RChannel 4 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
3CH3SREQSTATUS0RChannel 3 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
2CH2SREQSTATUS0RChannel 2 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
1CH1SREQSTATUS0RChannel 1 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
0CH0SREQSTATUS0RChannel 0 Single Request Status
When this bit is 1, it indicates that the peripheral connected as the input to this DMA channel is requesting the controller to service
the DMA channel. The controller services the request by performing the DMA cycle using single DMA transfers.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
8
7
6
0
0
R
R
CH7SREQSTATUS
CH6SREQSTATUS
5
4
3
2
0
0
0
0
R
R
R
R
CH5SREQSTATUS
CH4SREQSTATUS
CH3SREQSTATUS
CH2SREQSTATUS
1
0
0
0
R
R
CH1SREQSTATUS
CH0SREQSTATUS
2014-07-02 - Gecko Family - d0001_Rev1.3074
www.silabs.com
Page 75
...the world's most energy friendly microcontrollers
8.7.20 DMA_IF - Interrupt Flag Register
OffsetBit Position
0x1000
Reset
Access
Name
31
0
R
ERR
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
9
8
10
7
0
R
CH7DONE
BitNameResetAccessDescription
31ERR0RDMA Error Interrupt Flag
This flag is set when an error has occurred on the AHB bus.
30:8Reserved
7CH7DONE0RDMA Channel 7 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
6CH6DONE0RDMA Channel 6 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
5CH5DONE0RDMA Channel 5 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
4CH4DONE0RDMA Channel 4 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
3CH3DONE0RDMA Channel 3 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
2CH2DONE0RDMA Channel 2 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
1CH1DONE0RDMA Channel 1 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
0CH0DONE0RDMA Channel 0 Complete Interrupt Flag
Set when the DMA channel has completed its transfer. If the channel is disabled, the flag is set when there is a request for the channel.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
6
5
0
0
R
R
CH6DONE
CH5DONE
4
3
0
0
R
R
CH4DONE
CH3DONE
2
1
0
0
R
R
CH2DONE
CH1DONE
0
0
R
CH0DONE
8.7.21 DMA_IFS - Interrupt Flag Set Register
OffsetBit Position
0x1004
Reset
Access
Name
31
0
W1
ERR
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
BitNameResetAccessDescription
31ERR0W1DMA Error Interrupt Flag Set
Set to 1 to set DMA error interrupt flag.
30:8Reserved
7CH7DONE0W1DMA Channel 7 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
2014-07-02 - Gecko Family - d0001_Rev1.3075
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
10
7
0
W1W1W1W1W1
CH7DONE
6
5
4
3
2
0
0
0
0
0
W1
CH6DONE
CH5DONE
CH4DONE
CH3DONE
CH2DONE
www.silabs.com
1
0
0
0
W1
W1
CH1DONE
CH0DONE
Page 76
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
6CH6DONE0W1DMA Channel 6 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
5CH5DONE0W1DMA Channel 5 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
4CH4DONE0W1DMA Channel 4 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
3CH3DONE0W1DMA Channel 3 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
2CH2DONE0W1DMA Channel 2 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
1CH1DONE0W1DMA Channel 1 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
0CH0DONE0W1DMA Channel 0 Complete Interrupt Flag Set
Write to 1 to set the corresponding DMA channel complete interrupt flag.
8.7.22 DMA_IFC - Interrupt Flag Clear Register
OffsetBit Position
0x1008
Reset
Access
Name
31
0
W1
ERR
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
9
8
7
6
10
5
0
0
0
W1W1W1W1W1
CH7DONE
CH6DONE
CH5DONE
BitNameResetAccessDescription
31ERR0W1DMA Error Interrupt Flag Clear
Set to 1 to clear DMA error interrupt flag. Note that if an error happened, the Bus Error Clear Register must be used to clear the DMA.
30:8Reserved
7CH7DONE0W1DMA Channel 7 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
6CH6DONE0W1DMA Channel 6 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
5CH5DONE0W1DMA Channel 5 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
4CH4DONE0W1DMA Channel 4 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
3CH3DONE0W1DMA Channel 3 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
2CH2DONE0W1DMA Channel 2 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
1CH1DONE0W1DMA Channel 1 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
0CH0DONE0W1DMA Channel 0 Complete Interrupt Flag Clear
Write to 1 to clear the corresponding DMA channel complete interrupt flag.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
4
3
0
0
CH4DONE
CH3DONE
2
1
0
0
W1
W1
CH2DONE
CH1DONE
0
0
W1
CH0DONE
2014-07-02 - Gecko Family - d0001_Rev1.3076
www.silabs.com
Page 77
...the world's most energy friendly microcontrollers
8.7.23 DMA_IEN - Interrupt Enable register
OffsetBit Position
0x100C
Reset
Access
Name
31
0
RW
ERR
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
9
8
10
7
0
RWRWRWRWRWRWRW
CH7DONE
BitNameResetAccessDescription
31ERR0RWDMA Error Interrupt Flag Enable
Set this bit to enable interrupt on AHB bus error.
...the world's most energy friendly microcontrollers
9 RMU - Reset Management Unit
1 2 3 4
0
Quick Facts
What?
The RMU ensures correct reset operation.
It is responsible for connecting the different
reset sources to the reset lines of the
EFM32G.
Why?
RESETn
POWERON
BROWNOUT
LOCKUP
SYSRESETREQ
WATCHDOG
Reset Management Unit
RESET
A correct reset sequence is needed to
ensure safe and synchronous startup of the
EFM32G. In the case of error situations such
as power supply glitches or software crash,
the RMU provides proper reset and startup of
the EFM32G.
How?
The Power-on Reset and Brown-out
Detector of the EFM32G provides power
line monitoring with exceptionally low power
consumption. The cause of the reset may be
read from a register, thus providing software
with information about the cause of the reset.
9.1 Introduction
The RMU is responsible for handling the reset functionality of the EFM32G.
9.2 Features
• Reset sources
• Power-on Reset (POR)
• Brown-out Detection (BOD)
• RESETn pin reset
• Watchdog reset
• Software triggered reset (SYSRESETREQ)
• Core LOCKUP condition
• A software readable register indicates the cause of the last reset
9.3 Functional Description
The RMU monitors each of the reset sources of the EFM32G. If one or more reset sources go active,
the RMU applies reset to the EFM32G. When the reset sources go inactive the EFM32G starts up. At
startup the EFM32G loads the stack pointer and program entry point from memory, and starts execution.
As seen in Figure 9.1 (p. 81) the Power-on Reset, Brown-out Detectors, Watchdog timeout and
RESETn pin all reset the whole system including the Debug Interface. A Core Lockup condition or a
System reset request from software resets the whole system except the Debug Interface.
Whenever a reset source is active, the corresponding bit in the RMU_RSTCAUSE register is set. At
startup the program code may investigate this register in order to determine the cause of the reset. The
register must be cleared by software.
2014-07-02 - Gecko Family - d0001_Rev1.3080
www.silabs.com
Page 81
...the world's most energy friendly microcontrollers
Figure 9.1. RMU Reset Input Sources and Connections.
Reset Management Unit
V
DD
V
_REGULATED
DD
RESETn
WDOG
LOCKUP
LOCKUPRDIS
SYSREQRST
POR
BROWNOUT_UNREGn
BOD
BROWNOUT_REGn
BOD
Filter
RCCLR
POWERONn
RMU_RSTCAUSE
Edge- to- pulse
filter
PORESETn
SYSRESETn
Debug
Interface
Peripherals
Cortex- M3
Core
9.3.1 RMU_RSTCAUSE Register
The RMU_RSTCAUSE register indicates the reason for the last reset. The register should be cleared
after the value has been read at startup. Otherwise the register may indicate multiple causes for the
reset at next startup.
The following procedure must be done to clear RMU_RSTCAUSE:
1. Write a 1 to RCCLR in RMU_CMD
2. Write a 1 to bit 0 in EMU_AUXCTRL
3. Write a 0 to bit 0 in EMU_AUXCTRL
RMU_RSTCAUSE should be interpreted according to Table 9.1 (p. 81) . X bits are don't care. Notice
that it is possible to have multiple reset causes. For example, an external reset and a watchdog reset
may happen simultaneously.
Table 9.1. RMU Reset Cause Register Interpretation
Register ValueCause
0bXXX XXX1A Power-on Reset has been performed. X bits are don't care.
0b0XX XX10A Brown-out has been detected on the unregulated power.
0bXX0 0100A Brown-out has been detected on the regulated power.
0bXXX 1X00An external reset has been applied.
0bXX1 XX00A watchdog reset has occurred.
0bX10 0000A lockup reset has occurred.
0b1X0 0000A system request reset has occurred.
Note
When exiting EM4 with external reset, both the BODREGRST and BODUNREGRST in
RSTCAUSE might be set (i.e. are invalid)
2014-07-02 - Gecko Family - d0001_Rev1.3081
www.silabs.com
Page 82
...the world's most energy friendly microcontrollers
9.3.2 Power-On Reset (POR)
The POR ensures that the EFM32G does not start up before the supply voltage VDD has reached
the threshold voltage VPORthr (see Device Datasheet Electrical Characteristics for details). Before the
threshold voltage is reached, the EFM32G is kept in reset state. The operation of the POR is illustrated
in Figure 9.2 (p. 82) , with the active low POWERONn reset signal. The reason for the “unknown”
region is that the corresponding supply voltage is too low for any reliable operation.
Figure 9.2. RMU Power-on Reset Operation
V
V
DD
VPORthr
POWERONn
Unknown
time
9.3.3 Brown-Out Detector Reset (BOD)
The EFM32G has 2 brownout detectors, one for the unregulated 3.0 V power and one for the internal 1.8
V power. The BODs are constantly monitoring the voltages. Whenever the voltage is below the VBODthr
value (see Electrical Characteristics for details), the corresponding active low BROWNOUTn line is held
low. The BODs also include hysteresis, which prevents instability in the corresponding BROWNOUTn
line when the supply is crossing the VBODthr limit or the AVDD bods drops below decouple pin (DEC).
The operation of the BOD is illustrated in Figure 9.3 (p. 82) . The “unknown” regions are handled
by the POR module.
Figure 9.3. RMU Brown-out Detector Operation
V
VBODthr
VBODhyst
VBODhyst
V
DD
BROWNOUTn
Unknown
Unknown
time
9.3.4 RESETn pin Reset
Forcing the RESETn pin low generates a reset of the EFM32G. The RESETn pin includes an on-chip pullup resistor, and can therefore be left unconnected if no external reset source is needed. Also connected
to the RESETn line is a filter which prevents glitches from resetting the EFM32G.
2014-07-02 - Gecko Family - d0001_Rev1.3082
www.silabs.com
Page 83
...the world's most energy friendly microcontrollers
9.3.5 Watchdog Reset
The Watchdog circuit is a timer which (when enabled) must be cleared by software regularly. If software
does not clear it, a Watchdog reset is activated. This functionality provides recovery from a software
stalemate. Refer to the Watchdog section for specifications and description.
9.3.6 Lockup Reset
A Cortex-M3 lockup is the result of the core being locked up because of an unrecoverable exception
following the activation of the processor’s built-in system state protection hardware.
For more information about the Cortex-M3 lockup conditions see the ARMv7-M Architecture Reference
Manual. The Lockup reset does not reset the Debug Interface. Set the LOCKUPRDIS bit in the
RMU_CTRL register in order to disable this reset source.
9.3.7 System Reset Request
Software may initiate a reset (e.g. if it finds itself in a non-recoverable state). By asserting the
SYSRESETREQ in the Application Interrupt and Reset Control Register (write 0x05FA 0004), a reset is
issued. The SYSRESETREQ does not reset the Debug Interface.
2014-07-02 - Gecko Family - d0001_Rev1.3083
www.silabs.com
Page 84
...the world's most energy friendly microcontrollers
9.4 Register Map
The offset register address is relative to the registers base address.
OffsetNameTypeDescription
0x000RMU_CTRLRWControl Register
0x004RMU_RSTCAUSERReset Cause Register
0x008RMU_CMDW1Command Register
9.5 Register Description
9.5.1 RMU_CTRL - Control Register
OffsetBit Position
0x000
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
BitNameResetAccessDescription
31:1Reserved
0LOCKUPRDIS0RWLockup Reset Disable
Set this bit to disable the LOCKUP signal (from the Cortex) from resetting the device.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9.5.2 RMU_RSTCAUSE - Reset Cause Register
OffsetBit Position
0x004
Reset
Access
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
9
8
7
6
5
4
3
2
1
11
10
9
8
7
6
5
4
3
11
10
0
0
0
R
R
R
2
0
0
R
R
0
0
RW
LOCKUPRDIS
1
0
0
0
R
R
Name
BitNameResetAccessDescription
31:7Reserved
6SYSREQRST0RSystem Request Reset
Set if a system request reset has been performed. Must be cleared by software. Please see Table 9.1 (p. 81) for details on how
to interpret this bit.
5LOCKUPRST0RLOCKUP Reset
Set if a LOCKUP reset has been requested. Must be cleared by software. Please see Table 9.1 (p. 81) for details on how to interpret
this bit.
4WDOGRST0RWatchdog Reset
Set if a watchdog reset has been performed. Must be cleared by software. Please see Table 9.1 (p. 81) for details on how to interpret
this bit.
2014-07-02 - Gecko Family - d0001_Rev1.3084
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
LOCKUPRST
BODREGRST
EXTRST
WDOGRST
SYSREQRST
www.silabs.com
PORST
BODUNREGRST
Page 85
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
3EXTRST0RExternal Pin Reset
Set if an external pin reset has been performed. Must be cleared by software. Please see Table 9.1 (p. 81) for details on how to
interpret this bit.
2BODREGRST0RBrown Out Detector Regulated Domain Reset
Set if a regulated domain brown out detector reset has been performed. Must be cleared by software. Please see Table 9.1 (p. 81)
for details on how to interpret this bit.
1BODUNREGRST0RBrown Out Detector Unregulated Domain Reset
Set if a unregulated domain brown out detector reset has been performed. Must be cleared by software. Please see Table 9.1 (p.
81) for details on how to interpret this bit.
0PORST0RPower On Reset
Set if a power on reset has been performed. Must be cleared by software. Please see Table 9.1 (p. 81) for details on how to interpret
this bit.
9.5.3 RMU_CMD - Command Register
OffsetBit Position
0x008
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
BitNameResetAccessDescription
31:1Reserved
0RCCLR0W1Reset Cause Clear
Set this bit to clear the LOCKUPRST and SYSREQRST bits in the RMU_RSTCAUSE register. Use the HRCCLR bit in the
EMU_AUXCTRL register to clear the remaining bits.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
11
10
0
0
W1
RCCLR
2014-07-02 - Gecko Family - d0001_Rev1.3085
www.silabs.com
Page 86
...the world's most energy friendly microcontrollers
10 EMU - Energy Management Unit
What?
The EMU (Energy Management Unit)
handles the different low energy modes in the
EFM32G microcontrollers.
Why?
The need for performance and peripheral
functions varies over time in most
1234
0
applications. By efficiently scaling the
available resources in real-time to match
the demands of the application, the energy
consumption can be kept at a minimum.
How?
With a broad selection of energy modes,
a high number of low-energy peripherals
available even in EM2, and short wakeup time (2 µs from EM2 and EM3),
applications can dynamically minimize energy
consumption during program execution.
Quick Facts
10.1 Introduction
The Energy Management Unit (EMU) manages all the low energy modes (EM) in EFM32G
microcontrollers. Each energy mode manages if the CPU and the various peripherals are available. The
energy modes range from EM0 to EM4, where EM0, also called run mode, enables the CPU and all
peripherals. The lowest recoverable energy mode, EM3, disables the CPU and most peripherals while
maintaining wake-up and RAM functionality. EM4 disables everything except the POR and pin reset.
The various energy modes differ in:
• Energy consumption
• CPU activity
• Reaction time
• Wake-up triggers
• Active peripherals
• Available clock sources
Low energy modes EM1 to EM4 are enabled through the application software. In EM1-EM3, a range
of wake-up triggers return the microcontroller back to EM0. EM4 can only return to EM0 by power on
reset or external pin reset.
The EMU can also be used to turn off the power to unused SRAM blocks.
10.2 Features
• Energy Mode control from software
• Flexible wakeup from low energy modes
• Low wakeup time
2014-07-02 - Gecko Family - d0001_Rev1.3086
www.silabs.com
Page 87
...the world's most energy friendly microcontrollers
10.3 Functional Description
The Energy Management Unit (EMU) is responsible for managing the wide range of energy modes
available in EFM32G. An overview of the EMU module is shown in Figure 10.1 (p. 87) .
Figure 10.1. EMU Overview
Peripheral bus
Control and
status registers
Cortex
Voltage
regulator
system
Oscillator
system
Energy Management
State Machine
Reset
system
Memory
system
Interrupt
controller
The EMU is available as a peripheral on the peripheral bus. The energy management state machine
is triggered from the Cortex-M3 and controls the internal voltage regulators, oscillators, memories and
interrupt systems in the low energy modes. Events from the interrupt or reset systems can in turn cause
the energy management state machine to return to its active state. This is further described in the
following sections.
10.3.1 Energy Modes
There are five main energy modes available in EFM32G, called Energy Mode 0 (EM0) through Energy
Mode 4 (EM4). EM0, also called the active mode, is the energy mode in which any peripheral function
can be enabled and the Cortex-M3 core is executing instructions. EM1 through EM4, also called low
energy modes, provide a selection of reduced peripheral functionality that also lead to reduced energy
consumption, as described below.
Figure 10.2 (p. 88) shows the transitions between different energy modes. After reset the EMU will
always start in EM0. A transition from EM0 to another energy mode is always initiated by software. EM0
is the highest activity mode, in which all functionality is available. EM0 is therefore also the mode with
highest energy consumption.
The low energy modes EM1 through EM4 result in less functionality being available, and therefore also
reduced energy consumption. The Cortex-M3 is not executing instructions in any low energy mode.
Each low energy mode provides different energy consumptions associated with it, for example because
a different set of peripherals are enabled or because these peripherals are configured differently.
A transition from EM0 to a low energy mode can only be triggered by software.
A transition from EM1 – EM3 to EM0 can be triggered by an enabled interrupt or event. In addition, a
chip reset will return the device to EM0.A transition from EM4 can only be triggered by a pin reset or
power-on reset.
2014-07-02 - Gecko Family - d0001_Rev1.3087
www.silabs.com
Page 88
Figure 10.2. EMU Energy Mode Transitions
...the world's most energy friendly microcontrollers
Active
mode
Low energy
modes
EM0
EM1
EM2
Interrupt triggered wakeup
Reduced energy consumption
EM3
Software triggered sleep
EM4
from EM4
Reset triggered wakeup
No direct transitions between EM1, EM2 or EM3 are available, as can also be seen from Figure 10.2 (p.
88) . Instead, a wakeup will transition back to EM0, in which software can enter any other low energy
mode. An overview of the supported energy modes and the functionality available in each mode is shown
in Table 10.1 (p. 89) . Most peripheral functionality indicated as "On" in a particular energy mode can
also be turned off from software in order to save further energy.
2014-07-02 - Gecko Family - d0001_Rev1.3088
www.silabs.com
Page 89
Table 10.1. EMU Energy Mode Overview
...the world's most energy friendly microcontrollers
1
EM0
Wakeup time to EM0--2 µs2 µs160 µs
MCU clock treeOn---High frequency peripheral clock treesOnOn--Core voltage regulatorOnOn--High frequency oscillatorOnOn--I2C full functionalityOnOn--Low frequency peripheral clock treesOnOnOn-Low frequency oscillatorOnOnOn-Real Time CounterOnOnOn-LCDOnOnOn-LEUARTOnOnOn-LETIMEROnOnOn-PCNTOnOnOnOnACMPOnOnOnOn-
EM1
2
EM2
2
EM3
2
EM4
2
I2C receive address recognitionOnOnOnOnWatchdogOnOnOnOn
Pin interruptsOnOnOnOnRAM voltage regulator/RAM retentionOnOnOnOnBrown Out ResetOnOnOnOnPower On ResetOnOnOnOnOn
Pin ResetOnOnOnOnOn
1
Energy Mode 0/Active Mode
2
Energy Mode 1/2/3/4
3
When the 1 kHz ULFRCO is selected
3
The different Energy Modes are summarized in the following sections.
10.3.1.1 EM0
• The high frequency oscillator is active
• High frequency clock trees are active
• All peripheral functionality is available
-
10.3.1.2 EM1
• The high frequency oscillator is active
• MCU clock tree is inactive
• High frequency peripheral clock trees are active
• All peripheral functionality is available
10.3.1.3 EM2
• The high frequency oscillator is inactive
2014-07-02 - Gecko Family - d0001_Rev1.3089
www.silabs.com
Page 90
...the world's most energy friendly microcontrollers
• The high frequency peripheral and MCU clock trees are inactive
• The low frequency oscillator and clock trees are active
• Low frequency peripheral functionality is available
• Wakeup through peripheral interrupt or asynchronous pin interrupt
• RAM and register values are preserved
10.3.1.4 EM3
• Both high and low frequency oscillators and clock trees are inactive
• Wakeup through asynchronous pin interrupts, I2C address recognition or ACMP edge interrupt
• Watchdog available when ULFRCO (1 kHz clock) has been selected
• All other peripheral functionality is disabled
• RAM and register values are preserved
10.3.1.5 EM4
• All oscillators and regulators are inactive
• RAM and register values are not preserved
• Wakeup from external pin reset
10.3.2 Entering a Low Energy Mode
A low energy mode is entered by first configuring the desired Energy Mode through the EMU_CTRL
register and the SLEEPDEEP bit in the Cortex-M3 System Control Register, see Table 10.2 (p. 90) .
A Wait For Interrupt (WFI) or Wait For Event (WFE) instruction from the Cortex-M3 triggers the transition
into a low energy mode.
The transition into a low energy mode can optionally be delayed until the lowest priority Interrupt Service
Routine (ISR) is exited, if the SLEEPONEXIT bit in the Cortex-M3 System Control Register is set.
Entering the lowest energy mode, EM4, is done by writing a sequence to the EM4CTRL bitfield in
the EMU_CTRL register. Writing a zero to the EM4CTRL bitfield will restart the power sequence.
EM2BLOCK prevents the EMU to enter EM2 or lower, and it will instead enter EM1.
EM3 is equal to EM2, except that the LFACLK/LFBCLK are disabled in EM3. The LFACLK/LFBCLK
must be disabled by the user before entering low energy mode.
The EMVREG bit in EMU_CTRL can be used to prevent the voltage regulator from being turned off in
low energy modes. The device will then essentially stay in EM1 when entering a low energy mode.
Table 10.2. EMU Entering a Low Energy Mode
Low Energy ModeEM4CTRLEMVREGEM2BLOCKSLEEPDEEPCortex-M3
Instruction
EM10xx0WFI or WFE
EM20001WFI or WFE
EM4Write sequence:
2, 3, 2, 3, 2, 3, 2,
3, 2
xxxx
(‘x’ means don’t care)
10.3.3 Leaving a Low Energy Mode
In each low energy mode a selection of peripheral units are available, and software can either enable or
disable the functionality. Enabled interrupts that can cause wakeup from a low energy mode are shown
2014-07-02 - Gecko Family - d0001_Rev1.3090
www.silabs.com
Page 91
...the world's most energy friendly microcontrollers
in Table 10.3 (p. 91) . The wakeup triggers always return the EFM32 to EM0. Additionally, any reset
source will return to EM0.
Table 10.3. EMU Wakeup Triggers from Low Energy Modes
The SRAM blocks can be individually disabled using the POWERDOWN bitfield in the EMU_MEMCTRL
register. To disable a block means that the power source is removed from the entire block, which will
conserve energy. Once a block has been disabled it can only be enabled by reset.
All the blocks can be turned off except the first one.
2014-07-02 - Gecko Family - d0001_Rev1.3091
www.silabs.com
Page 92
...the world's most energy friendly microcontrollers
10.4 Register Map
The offset register address is relative to the registers base address.
OffsetNameTypeDescription
0x000EMU_CTRLRWControl Register
0x004EMU_MEMCTRLRWMemory Control Register
0x008EMU_LOCKRWConfiguration Lock Register
0x024EMU_AUXCTRLRWAuxiliary Control Register
10.5 Register Description
10.5.1 EMU_CTRL - Control Register
OffsetBit Position
0x000
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
9
8
10
7
BitNameResetAccessDescription
31:4Reserved
3:2EM4CTRL0x0RWEnergy Mode 4 Control
This register is used to enter Energy Mode 4, in which the device only wakes up from an external pin reset or from a power cycle.
Energy Mode 4 is entered when the EM4 sequence is written to this bitfield.
1EM2BLOCK0RWEnergy Mode 2 Block
This bit is used to prevent the MCU to enter Energy Mode 2 or lower.
0EMVREG0RWEnergy Mode Voltage Regulator Control
Control the voltage regulator in low energy modes 2 and 3.
ValueModeDescription
0REDUCEDReduced voltage regulator drive strength in EM2 and EM3.
1FULLFull voltage regulator drive strength in EM2 and EM3.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
6
5
4
3
2
1
0
0
0x0
RW
EM4CTRL
0
RW
RW
EMVREG
EM2BLOCK
10.5.2 EMU_MEMCTRL - Memory Control Register
OffsetBit Position
0x004
Reset
Access
Name
BitNameResetAccessDescription
31:3Reserved
2014-07-02 - Gecko Family - d0001_Rev1.3092
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
11
10
0
0x0
RW
POWERDOWN
www.silabs.com
Page 93
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
2:0POWERDOWN0x0RWRAM block power-down
Individual 32KB RAM block power-down. When a block is powered down, it cannot be powered up again. The block will be powered
up after the reset. Block 0 (address range 0x20000000-0x20007FFF) may never be powered down.
ValueModeDescription
4BLK3Power down RAM block 3 (address range 0x20018000-0x2001FFFF).
6BLK23Power down RAM blocks 2-3 (address range 0x20010000-0x2001FFFF).
7BLK123Power down RAM blocks 1-3 (address range 0x20008000-0x2001FFFF).
10.5.3 EMU_LOCK - Configuration Lock Register
OffsetBit Position
0x008
Reset
Access
Name
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
11
BitNameResetAccessDescription
31:16Reserved
15:0LOCKKEY0x0000RWConfiguration Lock Key
Write any other value than the unlock code to lock all EMU registers, except the interrupt registers, from editing. Write the unlock
code to unlock. When reading the register, bit 0 is set when the lock is enabled.
ModeValueDescription
Read Operation
UNLOCKED0EMU registers are unlocked.
LOCKED1EMU registers are locked.
Write Operation
LOCK0Lock EMU registers.
UNLOCK0xADE8Unlock EMU registers.
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
10
0x0000
RW
LOCKKEY
0
10.5.4 EMU_AUXCTRL - Auxiliary Control Register
OffsetBit Position
0x024
Reset
Access
Name
BitNameResetAccessDescription
31:1Reserved
0HRCCLR0RWHard Reset Cause Clear
2014-07-02 - Gecko Family - d0001_Rev1.3093
31
30
29
28
272625
24
23
22
21
201918
17
16
15
141312
To ensure compatibility with future devices, always write bits to 0. More information in Section 2.1 (p. 3)
9
8
7
6
5
4
3
2
1
11
10
0
0
RW
HRCCLR
www.silabs.com
Page 94
...the world's most energy friendly microcontrollers
BitNameResetAccessDescription
Write to 1 and then 0 to clear the POR, BOD and WDOG reset cause register bits. See also the Reset Management Unit (RMU).
2014-07-02 - Gecko Family - d0001_Rev1.3094
www.silabs.com
Page 95
...the world's most energy friendly microcontrollers
11 CMU - Clock Management Unit
What?
The CMU controls oscillators and clocks.
EFM32G supports five different oscillators
with minimized power consumption and short
1 2 3 4
0
Oscillators
WDOG clock
LETIMER clock
LCD clock
CMU
Peripheral A clock
Peripheral B clock
start-up time. An additional separate RC
oscillator is used for flash programming and
debug trace. The CMU also has HW support
for calibration of RC oscillators.
Why?
Oscillators and clocks contribute significantly
to the power consumption of the MCU. With
the low power oscillators combined with the
flexible clock control scheme, it is possible
to minimize the energy consumption in any
given application.
How?
Quick Facts
Peripheral C clock
The CMU can configure different clock
sources, enable/disable clocks to peripherals
Peripheral D clock
CPU clock
on an individual basis and set the prescaler
for the different clocks. The short oscillator
start-up times makes duty-cycling between
active mode and the different low energy
modes (EM2-EM4) very efficient. The
calibration feature ensures high accuracy RC
oscillators. Several interrupts are available to
avoid CPU polling of flags.
11.1 Introduction
The Clock Management Unit (CMU) is responsible for controlling the oscillators and clocks on-board
the EFM32G. The CMU provides the capability to turn on and off the clock on an individual basis to all
peripheral modules in addition to enable/disable and configure the available oscillators. The high degree
of flexibility enables software to minimize energy consumption in any specific application by not wasting
power on peripherals and oscillators that are inactive.
11.2 Features
• Multiple clock sources available:
• 1-28 MHz High Frequency RC Oscillator (HFRCO)
• 4-32 MHz High Frequency Crystal Oscillator (HFXO)
• 32.768 Hz Low Frequency RC Oscillator (LFRCO)
• 32.768 Hz Low Frequency Crystal Oscillator (LFXO)
• 1 kHz Ultra Low Frequency RC Oscillator (ULFRCO)
• Low power oscillators
• Low start-up times
• Separate prescaler for High Frequency Core Clocks (HFCORECLK) and Peripheral Clocks
(HFPERCLK)
• Individual clock prescaler selection for each Low Energy Peripheral
2014-07-02 - Gecko Family - d0001_Rev1.3095
www.silabs.com
Page 96
...the world's most energy friendly microcontrollers
• Clock Gating on an individual basis to core modules and all peripherals
• Selectable clocks can be output on two pins for use externally.
• Auxiliary 14 MHz RC oscillator (AUXHFRCO) for flash programming and debug trace.
11.3 Functional Description
An overview of the CMU is shown in Figure 11.1 (p. 97) . The number of peripheral modules that are
connected to the different clocks varies from device to device.
2014-07-02 - Gecko Family - d0001_Rev1.3096
www.silabs.com
Page 97
Figure 11.1. CMU Overview
...the world's most energy friendly microcontrollers
AUXHFRCO
HFXO
HFRCO
Timeout
Timeout
Timeout
AUXCLK
CMU_HFPERCLKDIV.HFPERCLKEN
Debug Trace
MSC
(Flash Programming)
HFCLK
clock
switch
CMU_CMD.HFCLKSEL
prescaler
CMU_HFPERCLKDIV.HFPERCLKDIV
CMU_HFCORECLKDIV
prescaler
HFPERCLK
HFCORECLK
CMU_HFPERCLKEN0.TIMER0
CMU_HFPERCLKEN0.TIMER1
CMU_HFPERCLKEN0.I2C0
EM0
CMU_HFCORECLKEN0.DMA
CMU_HFCORECLKEN0.LE
Clock
Gate
Clock
Gate
.
.
.
Clock
Gate
Clock
Gate
Clock
Gate
.
.
.
Clock
Gate
HFPERCLK
HFPERCLK
.
.
.
HFPERCLK
HFCORECLK
HFCORECLK
.
.
.
HFCORECLK
TIMER0
TIMER1
I2C0
CM3
DMA
LE
LFXO
LFRCO
ULFRCO
Timeout
Timeout
clock
switch
CMU_LFCLKSEL.LFA
CMU_LFCLKSEL.LFB
clock
switch
WDOG_CTRL.CLKSEL
LFACLK
LFBCLK
WDOGCLK
/ 2
prescaler
CMU_LFAPRESC0.RTC
prescaler
CMU_LFAPRESC0.LETIMER0
prescaler
CMU_LFAPRESC0.LCD
CMU_LFBPRESC0.LEUART0
prescaler
prescaler
CMU_LFBPRESC0.LEUART1
WDOG
LFACLK
LCDpre
CMU_PCNTCTRL.PCNT0CLKEN
CMU_LFACLKEN0.RTC
CMU_LFACLKEN0.LETIMER0
CMU_LFACLKEN0.LCD
Frame Rate Control
CMU_LCDCTRL.FDIV
Clock
Gate
CMU_LFBCLKEN0.LEUART0
CMU_LFBCLKEN0.LEUART1
LFACLK
Clock
Gate
LFACLK
Clock
Gate
LFACLK
Clock
Gate
PCNTn_S0
CMU_PCNTCTRL.PCNTnCLKSEL
LFBCLK
Clock
Gate
LFBCLK
Clock
Gate
RTC
LETIMER0
LCD
PCNTnCLK
LEUART0
LEUART1
11.3.1 System Clocks
11.3.1.1 HFCLK - High Frequency Clock
HFCLK is the selected High Frequency Clock. This clock is used by the CMU and drives the two
prescalers that generate HFCORECLK and HFPERCLK. The HFCLK can be driven by a high-frequency
2014-07-02 - Gecko Family - d0001_Rev1.3097
www.silabs.com
Page 98
...the world's most energy friendly microcontrollers
oscillator (HFRCO or HFXO) or one of the low-frequency oscillators (LFRCO or LFXO). By default the
HFRCO is selected. In most applications, one of the high frequency oscillators will be the preferred
choice. To change the selected HFCLK write to HFCLKSEL in CMU_CMD. The HFCLK is running in
EM0 and EM1.
11.3.1.2 HFCORECLK - High Frequency Core Clock
HFCORECLK is a prescaled version of HFCLK. This clock drives the Core Modules, which consists of
the CPU and modules that are tightly coupled to the CPU, e.g. MSC, DMA etc. This also includes the
interface to the Low Energy Peripherals. Some of the modules that are driven by this clock can be clock
gated completely when not in use. This is done by clearing the clock enable bit for the specific module
in CMU_HFCORECLKEN0. The frequency of HFCORECLK is set using the CMU_HFCORECLKDIV
register. The setting can be changed dynamically and the new setting takes effect immediately.
Note
Note that if HFPERCLK runs faster than HFCORECLK, the number of clock cycles for each
bus-access to peripheral modules will increase with the ratio between the clocks. Please
refer to Section 5.2.3.2 (p. 20) for more details.
11.3.1.3 HFPERCLK - High Frequency Peripheral Clock
Like HFCORECLK, HFPERCLK can also be a prescaled version of HFCLK. This clock drives the
High-Frequency Peripherals. All the peripherals that are driven by this clock can be clock gated
completely when not in use. This is done by clearing the clock enable bit for the specific peripheral in
CMU_HFPERCLKEN0. The frequency of HFPERCLK is set using the CMU_HFPERCLKDIV register.
The setting can be changed dynamically and the new setting takes effect immediately.
Note
Note that if HFPERCLK runs faster than HFCORECLK, the number of clock cycles for each
bus-access to peripheral modules will increase with the ratio between the clocks. E.g. if a
bus-access normally takes three cycles, it will take 9 cycles if HFPERCLK runs three times
as fast as the HFCORECLK.
11.3.1.4 LFACLK - Low Frequency A Clock
LFACLK is the selected clock for the Low Energy A Peripherals. There are three selectable sources
for LFACLK: LFRCO, LFXO and HFCORECLKLE/2. In addition, the LFACLK can be disabled. From
reset, the LFACLK source is set to LFRCO. However, note that the LFRCO is disabled from reset. The
selection is configured using the LFA field in CMU_LFCLKSEL. The HFCORECLKLE/2 setting allows
the Low Energy A Peripherals to be used as high-frequency peripherals.
Note
If HFCORECLK/2 is selected as LFACLK, the clock will stop in EM2/3.
Each Low Energy Peripheral that is clocked by LFACLK has its own prescaler setting and enable bit.
The prescaler settings are configured using CMU_LFAPRESC0 and the clock enable bits can be found
in CMU_LFACLKEN0. Notice that the LCD has an additional high resolution prescaler for Frame Rate
Control, configured by FDIV in CMU_LCDCTRL. When operating in oversampling mode, the pulse
counters are clocked by LFACLK. This is configured for each pulse counter (n) individually by setting
PCNTnCLKSEL in CMU_PCNTCTRL.
11.3.1.5 LFBCLK - Low Frequency B Clock
LFBCLK is the selected clock for the Low Energy B Peripherals. There are three selectable sources
for LFBCLK: LFRCO, LFXO and HFCORECLKLE/2. In addition, the LFBCLK can be disabled. From
reset, the LFBCLK source is set to LFRCO. However, note that the LFRCO is disabled from reset. The
selection is configured using the LFB field in CMU_LFCLKSEL. The HFCORECLKLE/2 setting allows
the Low Energy B Peripherals to be used as high-frequency peripherals.
Note
If HFCORECLK/2 is selected as LFBCLK, the clock will stop in EM2/3.
2014-07-02 - Gecko Family - d0001_Rev1.3098
www.silabs.com
Page 99
...the world's most energy friendly microcontrollers
Each Low Energy Peripheral that is clocked by LFBCLK has its own prescaler setting and enable bit.
The prescaler settings are configured using CMU_LFBPRESC0 and the clock enable bits can be found
in CMU_LFBCLKEN0.
11.3.1.6 PCNTnCLK - Pulse Counter n Clock
Each available pulse counter is driven by its own clock, PCNTnCLK where n is the pulse counter instance
number. Each pulse counter can be configured to use an external pin (PCNTn_S0) or LFACLK as
PCNTnCLK.
11.3.1.7 WDOGCLK - Watchdog Timer Clock
The Watchdog Timer (WDOG) can be configured to use one of three different clock sources: LFRCO,
LFXO or ULFRCO. ULFRCO (Ultra Low Frequency RC Oscillator) is a separate 1 kHz RC oscillator
that also runs in EM3.
11.3.1.8 AUXCLK - Auxiliary Clock
AUXCLK is a 14 MHz clock driven by a separate RC oscillator, AUXHFRCO. This clock is used for flash
programming and Serial Wire Output (SWO). During flash programming, this clock will be active. If the
AUXHFRCO has not been enabled explicitly by software, the MSC module will automatically start and
stop it. The AUXHFRCO is enabled by writing a 1 to AUXHFRCOEN in CMU_OSCENCMD. This explicit
enabling is required when SWO is used.
11.3.2 Oscillator Selection
11.3.2.1 Start-up Time
The different oscillators have different start-up times. For the RC oscillators, the start-up time is fixed,
but both the LFXO and the HFXO have configurable start-up time. At the end of the start-up time a ready
flag is set to indicated that the start-up time has exceeded and that the clock is available. The low startup time values can be used for an external clock source of already high quality, while the higher start-up
times should be used when the clock signal is coming directly from a crystal. The startup time for HFXO
and LFXO can be set by configuring the HFXOTIMEOUT and LFXOTIMEOUT bitfields, respectively.
Both bitfields are located in CMU_CTRL. For HFXO it is also possible to enable a glitch detection filter
by setting HFXOGLITCHDETEN in CMU_CTRL. The glitch detector will reset the start-up counter if a
glitch is detected, making the start-up process start over again.
There are individual bits for each oscillator indicating the status of the oscillator:
• ENABLED - Indicates that the oscillator is enabled
• READY - Start-up time is exceeded
• SELECTED - Start-up time is exceeded and oscillator is chosen as clock source
These status bits are located in the CMU_STATUS register.
11.3.2.2 Switching Clock Source
The HFRCO oscillator is a low energy oscillator with extremely short wake-up time. Therefore, this
oscillator is always chosen by hardware as the clock source for HFCLK when the device starts up (e.g.
after reset and after waking up from EM2 and EM3). After reset, the HFRCO frequency is 14 MHz.
Software can switch between the different clock sources at run-time. E.g., when the HFRCO is the
clock source, software can switch to HFXO by writing the field HFCLKSEL in the CMU_CMD command
register. See Figure 11.2 (p. 100) for a description of the sequence of events for this specific operation.
Note
It is important first to enable the HFXO since switching to a disabled oscillator will effectively
stop HFCLK and only a reset can recover the system.
2014-07-02 - Gecko Family - d0001_Rev1.3099
www.silabs.com
Page 100
...the world's most energy friendly microcontrollers
During the start-up period HFCLK will stop since the oscillator driving it is not ready. This effectively
stalls the Core Modules and the High-Frequency Peripherals. It is possible to avoid this by first enabling
the HFXO and then wait for the oscillator to become ready before switching the clock source. This way,
the system continues to run on the HFRCO until the HFXO has timed out and provides a reliable clock.
This sequence of events is shown in Figure 11.3 (p. 100) .
A separate flag is set when the oscillator is ready. This flag can also be configured to generate an
interrupt.
Figure 11.2. CMU Switching from HFRCO to HFXO before HFXO is ready
CMU_CMD.HFCLKSEL
CMU_OSCENCMD.HFRCOEN
CMU_OSCENCMD.HFRCODIS
command
CMU_OSCENCMD.HFXOEN
CMU_OSCENCMD.HFXODIS
CMU_STATUS.HFRCORDY
CMU_STATUS.HFRCOENS
CMU_STATUS.HFRCOSEL
status
CMU_STATUS..HFXORDY
CMU_STATUS.HFXOENS
CMU_STATUS.HFXOSEL
clocks
00
HFCLK
HFRCO
HFXO
0200
HFXO time- out period
Figure 11.3. CMU Switching from HFRCO to HFXO after HFXO is ready
CMU_CMD.HFCLKSEL
CMU_OSCENCMD.HFRCOEN
CMU_OSCENCMD.HFRCODIS
command
CMU_OSCENCMD.HFXOEN
CMU_OSCENCMD.HFXODIS
CMU_STATUS.HFRCORDY
CMU_STATUS.HFRCOENS
CMU_STATUS.HFRCOSEL
status
CMU_STATUS.HFXORDY
CMU_STATUS.HFXOENS
CMU_STATUS.HFXOSEL
clocks
000200
HFCLK
HFRCO
HFXO
HFXO time- out period
2014-07-02 - Gecko Family - d0001_Rev1.30100
www.silabs.com
Loading...
+ 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.