The EFR32xG21 Wireless Gecko SoC is the first device in the Series 2 Wireless Gecko
Portfolio, and includes the EFR32MG21 Mighty Gecko and EFR32BG21 Blue Gecko.
The EFR32xG21 improves processing capability with a Cortex M33 core and has best in
class link budget while providing for lower active current for both the MCU and radio. The
dedicated security core (Secure Element) provides improved cryptography and hardware
security that is isolated from the main application CPU. This high performance and secure multi-protocol device supports Zigbee, Thread, and Bluetooth 5.0.
The single-die solution provides industry-leading energy efficiency, processing capability,
and RF performance in a small form factor for IoT connected applications.
Core / Memory
ARM Cortex
TM
M33 processor
with DSP extensions,
FPU and Trust Zone
ETMDebug InterfaceRAM Memory
Flash Program
Memory
Radio Transceiver
RF Frontend
LNA
PA
PA
I
Q
PGA
Frequency
Synth
DEMOD
IFADC
AGC
MOD
LDMA
Controller
FRC
CRC
HF Crystal
EM23 HF RC
Oscillator
LF Crystal
Peripheral Reflex System
Serial
Interfaces
BUFC
RAC
Clock Management
Oscillator
Oscillator
32-bit bus
USART
2
I
C
HF
RC Oscillator
Ultra LF RC
Oscillator
Fast Startup
RC Oscillator
RC Oscillator
I/O PortsAnalog I/F
External
Interrupts
General
Purpose I/O
Pin Reset
Pin Wakeup
KEY FEATURES
• 32-bit ARM® Cortex M33 core with 80
MHz maximum operating frequency
• Scalable Memory and Radio configuration
options available in QFN packaging
• Peripheral Reflex System enabling
autonomous interaction of MCU
peripherals
• Autonomous Hardware Crypto Accelerator
and True Random Number Generator
• Multiple Integrated 2.4 GHz PAs with up to
20 dBm transmit power
Management
LF
Power-On Reset
Timers and Triggers
Timer/Counter
Low Energy Timer
Energy
Voltage
Regulator
Brown-Out
Detector
Protocol Timer
Watchdog Timer
Real Time
Capture Counter
Back-Up Real
Time Counter
Security
Crypto Acceleration
True Random
Number Generator
Secure Debug
Authentication
Secure Element
Comparator
iADC
Analog
Lowest power mode with peripheral operational:
EM3—StopEM2—Deep SleepEM1—SleepEM0—Active
EM4—Shutoff
silabs.com | Building a more connected world.Rev. 0.4
Page 2
Table of Contents
1. About This Document...........................22
This document contains reference material for the EFR32xG21 devices. All modules and peripherals in the EFR32xG21 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 pinout, are covered in the device data sheets.
silabs.com | Building a more connected world.Rev. 0.4 | 22
Page 23
Reference Manual
About This Document
1.2 Conventions
Register Names
Register names are given with a module name prefix followed by the short register name:
TIMERn_CTRL - Control Register
The "n" denotes the module number for modules which can exist in 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
The "x" denotes the different ports.
Bit Fields
Registers contain one or more bit fields which can be 1 to 32 bits wide. Bit fields wider than 1 bit are given with start (x) and stop (y) bit
[y:x].
Bit fields containing more than one bit are unsigned integers unless otherwise is specified.
Unspecified bit field settings must not be used, as this may lead to unpredictable behaviour.
Address
The address for each register can be found by adding the base address of the module found in the Memory Map (see Figure 4.1 Sys-
tem Address Space with Core and Code Space Listing on page 40), 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 1.1 Register Access Types on page 23.
Table 1.1. Register Access Types
Access TypeDescription
RRead only. Writes are ignored
RWReadable and writable
RW1Readable and writable. Only writes to 1 have effect
(R)W1Sometimes readable. Only writes to 1 have effect. Currently only
used for IF_CLEAR registers (see 3.3.1 Interrupt Operation)
W1Read value undefined. Only writes to 1 have effect
WWrite only. Read value undefined.
RWHReadable, writable, and updated by hardware
RW(nB), RWH(nB), etc."(nB)" suffix indicates that register explicitly does not support pe-
ripheral bit set or clear (see 4. Memory and Bus System)
RW(a), R(a), etc."(a)" suffix indicates that reading the register cause an action and
ay alter the register value.
Number format
0x prefix is used for hexadecimal numbers
0b prefix is used for binary numbers
Numbers without prefix are in decimal representation.
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.
silabs.com | Building a more connected world.Rev. 0.4 | 23
Page 24
Reference Manual
About This Document
Reset Value
The reset value denotes the value after reset.
Registers denoted with X have unknown value out of reset and need to be initialized before use. Note that read-modify-write operations
on these registers before they are initialized results in undefined register values.
Pin Connections
Pin connections are given with a module prefix followed by a short pin name:
CMU_CLKOUT1 (Clock management unit, clock output pin number 1)
The location for the pin names given in the module documentation can be found in the device-specific datasheet.
1.3 Related Documentation
Further documentation on the EFR32xG21 devices and the ARM Cortex-M33 can be found at the Silicon Labs and ARM web pages:
www.silabs.com
www.arm.com
silabs.com | Building a more connected world.Rev. 0.4 | 24
Page 25
2. System Overview
43210
Reference Manual
System Overview
Quick Facts
What?
The EFR32 Wireless Gecko is a highly integrated,
configurable and low power wireless System-onChip (SoC) with a robust set of MCU and radio peripherals.
Why?
The Radio enables support for Bluetooth Smart
(BLE), ZigBee, Thread and Proprietary Protocols in
2.4 GHz frequency bands while the MCU system allows customized protocols and applications to run
efficiently.
How?
Dynamic or fixed packet lengths, optional address
recognition, and flexible CRC and security schemes
makes the EFR32xG21 ideal for many wireless IoT
applications. High performance analog and digital
peripherals allows complete applications to run on
the EFR32xG21 SoC.
silabs.com | Building a more connected world.Rev. 0.4 | 25
Page 26
Reference Manual
System Overview
2.1 Introduction
The high level features of EFR32xG21 include:
• High performance radio transceiver
• Low power consumption in transmit, receive, and standby modes
• Excellent receiver performance, including sensitivity, selectivity, and blocking
• Excellent transmitter performance, including programmable output power, low phase noise, and power-amplifier (PA) ramping
• Wake on Radio
• Configurable protocol support, including standards and customer developed protocols
• Preamble and frame synchronization insertion in transmit, and recovery in receive
• Flexible CRC support, including configurable polynomial and multiple CRCs for single data frames
• Basic address filtering performed in hardware
• High performance, low power MCU system
• High Performance 32-bit ARM Cortex-M33 CPU
• Flexible and efficient energy management
• Complete set of digital peripherals
• Peripheral Reflex System (PRS)
• Precision analog interfaces
• Low external component count
• Fully integrated 2.4 GHz BALUN
• Integrated tunable crystal loading capacitors
A further introduction to the MCU and radio system is included in the following sections.
Note: Detailed performance numbers, current consumption, pinout etc. is available in the device datasheet.
2.2 Block Diagrams
The block diagram for the EFR32xG21 System-On-Chip series is shown in (Figure 2.1 EFR32xG21 System-On-Chip Block Diagram on
silabs.com | Building a more connected world.Rev. 0.4 | 27
Page 28
• Timers/Counters
• 2 × 16-bit Timer/Counter (TIMER)
• Up to 3 Compare/Capture/PWM channels
• Dead-Time Insertion
• 32-bit Timer/Counter (TIMER)
• Up to 3 Compare/Capture/PWM channels
• 24-bit Low Energy Timer (LETIMER)
• 32-bit Ultra Low Energy Backup Real Time Counter (BURTC) for periodic wake-up from any Energy Mode
• 32-bit Real-Time Capture Counter (RTCC)
• 32-bit Back-Up Real-Time Counter (BURTC)
• 2 × Watchdog Timers (WDOG)
• Ultra low power precision analog peripherals
• 12-bit 1 Msps Incremental Analog to Digital Converter (IADC)
• Single ended or differential operation
• Conversion tailgating for predictable latency
• 2 × Analog Comparator (ACMP)
• Programmable speed/current
• Capacitive sensing
• Analog Bus (ABUS)
• Ultra efficient Power-on Reset (POR) and Brown-Out Detector (BOD)
• Debug Interface
• 4-pin Joint Test Action Group (JTAG) interface
• 2-pin serial-wire debug (SWD) interface
Reference Manual
System Overview
silabs.com | Building a more connected world.Rev. 0.4 | 28
Page 29
2.4 Oscillators and Clocks
EFR32xG21 has seven different oscillators integrated, as shown in Table 2.1 EFR32xG21 Oscillators on page 29.
Table 2.1. EFR32xG21 Oscillators
Reference Manual
System Overview
OscillatorFrequencyOptional?External
Description
components
HFXO38 MHz - 40 MHzNoCrystalHigh accuracy, low jitter high frequency crystal oscillator. Tun-
able crystal loading capacitors are fully integrated. The HFXO
is required for all types of RF communication to be active.
HFRCO1 MHz - 80 MHzYes-Medium accuracy RC oscillator, typically used for timing dur-
ing startup of the HFXO and as a clock source as long as no
RF communication is active. In EM0/1 energy modes, the
HFRCO can be used in conjunction with the DPLL.
FSRCO20 MHzNo-Fast startup RC oscillator.
HFRCOEM23 1 MHz - 40 MHzYes-Medium accuracy RC oscillator available in EM2 and EM3,
typically used as a clock source for the Analog to Digital Converter or Debug Trace.
LFRCO32.768 kHzYes-Medium accuracy frequency reference typically used for medi-
um accuracy RTCC timing.
LFXO32.768 kHzYesCrystalHigh accuracy frequency reference typically used for high ac-
curacy RTCC timing. Tunable crystal loading capacitors are
fully integrated.
ULFRCO1000 HzNo-Ultra low frequency oscillator typically used for the watchdog
timer.
The RC oscillators can be calibrated against either of the crystal oscillators in order to compensate for temperature and voltage supply
variations. Hardware support is included to measure the frequency of various oscillators against each other.
Oscillator and clock management is available through the Clock Management Unit (CMU), see section 8. CMU - Clock Management
Unit for details.
2.5 RF Frequency Synthesizer
The Fractional-N RF Frequency Synthesizer (SYNTH) provides a low phase noise LO signal to be used in both receive and transmit
modes.
The capabilities of the SYNTH include:
• High performance, low phase noise
• Fast frequency settling
• Fast and fully automated calibration
• Sub 100 Hz frequency resolution across the supported frequency bands
2.6 Modulation Modes
EFR32xG21 supports a wide range of modulation modes in transmit and receive:
• Baudrates ranging from below 100 Baud/s to 2 MBaud/s, allowing data rates up to 4 MBit/s
• Configurable frequency deviation
• Configurable Direct Sequence Spread Spectrum (DSSS), with spread sequences up to 32 chips encoding up to 4 information bits
• Configurable 4-FSK symbol encoding
silabs.com | Building a more connected world.Rev. 0.4 | 29
Page 30
Reference Manual
System Overview
2.7 Transmit Mode
In transmit mode EFR32xG21 performs the following functionality:
• Automatic PA power ramping during the start and end of a frame transmit
• Programmable output power
• Optional preamble and synchronization word insertion
• Accurate transmit frame timing to support time synchronized radio protocols
• Optional Carrier Sense Multiple Access - Collision Avoidance (CSMA-CA) or Listen Before Talk (LBT) hardware support
• Integrated transmit test modes, as described in 2.17 RF Test Modes
2.8 Receive Mode
In receive mode EFR32xG21 performs the following functionality:
• A single-ended (2.4 GHz) LNA amplifies the input RF signal. The amplified signal is then mixed to a low-IF signal through the quadrature down-coversion mixer. Further signal filtering is performed before conversion to a digital signal through the I/Q ADC.
• Digitally configurable receiver bandwidth from 100 Hz to 2.5 MHz
• Timing recovery on received data, including simultaneous support for two different frame synchronization words
• Automatic frequency offset compensation, to compensate for carrier frequency offset between the transmitter and receiver
• Support for a wide range of modulation formats as described in section 2.6 Modulation Modes
2.9 Data Buffering
EFR32xG21 supports buffered transmit and receive modes through its buffer controller (BUFC), with four individually configurable buffers. The BUFC uses the system RAM as storage, and each buffer can be individually configured with parameters such as:
• Buffer size
• Buffer interrupt thresholds
• Buffer RAM location
• Overflow and underflow detection
In receive mode, data following frame synchronization is moved directly from the demodulator to the buffer storage.
In transmit mode, data following the inserted preamble and synchronization word is moved directly from the buffer storage to the modulator.
2.10 Unbuffered Data Transfer
For most system designs it is recommended to use the data buffering within EFR32xG21 to provide a convenient user interface.
In cases where data buffering within EFR32xG21 is not desired, it is possible to set up direct unbuffered data transfers using a singlepin or two-pin interface on EFR32xG21. A bit clock output is provided on the Serial Clock (SC) output pin, and a serial bitstream is
provided to EFR32xG21 in a transmit mode and from EFR32xG21 in a receive mode.
In unbuffered data transfer modes the hardware support provided by EFR32xG21 to perform preamble and frame synchronization insertion in transmit mode and detection in receive mode can still optionally be used.
2.11 Frame Format Support
EFR32xG21 has an extensive support for frame handling in transmit and receive modes, which allows effective handling of even advanced protocols. The frame format support is controlled by the Frame Controller (FRC). The support includes:
• Preamble and frame synchronization inserted into transmitted frames
• Full frame synchronization of received frames
• Simple address matching of received frames in hardware, further configurable address and frame filtering supported through sequencer
• Support for variable length frames
• Automated CRC calculation and verification
• Configurable bit ordering, with the most or least significant bit transmitted and received first
silabs.com | Building a more connected world.Rev. 0.4 | 30
Page 31
Reference Manual
System Overview
2.12 Hardware CRC Support
EFR32xG21 supports a configurable CRC generation in transmit and verification in receive mode:
• 8, 16, 24 or 32 bit CRC value
• Configurable polynomial and initialization value
• Optional inversion of CRC value over air
• Configurable CRC byte ordering
• Support for multiple CRC values calculated and verified per transmitted or received frame
• The CRC module is typically controlled by the Frame Controller (FRC) for in-line operations in transmit and receive modes. Alternatively, the CRC module may be accessed directly from software to calculate and verify CRC data.
2.13 Convolutional Encoding / Decoding
EFR32xG21 includes hardware support for convolutional encoding and decoding, for forward error correction (FEC). This feature is performed by the Frame Controller (FRC) module:
• Constraint length configurable up to 7, for the highest robustness
• Configurable puncturing, to achieve rates between 1/2 rate and full rate
• Configurable soft decision or hard decision decoding
• Convolutional coding may be used together with the symbol interleaver to improve robustness against burst errors
2.14 Binary Block Encoding / Decoding
EFR32xG21 includes hardware support for binary block encoding and decoding, both performed real-time in the the transmit and receive path. This is performed in the Frame Controller (FRC) module:
The block coding works on blocks of up to 16 bits of data and adds parity bits to be capable of single or multiple bit corrections by the
receiver.
• One or more parity bits can be added and verified
• Bit error correction
• Lookup-codes can be used to implement virtually any block coding scheme
silabs.com | Building a more connected world.Rev. 0.4 | 31
Page 32
Reference Manual
System Overview
2.15 Data Encryption and Authentication
EFR32xG21 has hardware support for AES encryption, decryption and authentication modes. These security operations can be performed on data in RAM or any data buffer, without further CPU intervention. The key size is 128 bits.
AES modes of operations directly supported by the EFR32xG21 hardware are listed in Table 2.2 AES modes of operation with hard-
ware support on page 32. In addition to these modes, other modes can also be implemented by using combinations of modes. For
example, the CCM mode can be implemented using the CTR and CBC-MAC modes in combination.
Table 2.2. AES modes of operation with hardware support
The Cryptographic Acceleration module can operate directly on data buffers provided by the buffer controller (BUFC) module. It is also
possible to provide data directly from the embedded Cortex-M33 or via DMA.
silabs.com | Building a more connected world.Rev. 0.4 | 32
Page 33
2.16 Timers
EFR32xG21 includes multiple timers, as can be seen from Table 2.3 EFR32xG21 Timers Overview on page 33.
Table 2.3. EFR32xG21 Timers Overview
TimerNumber of instancesTypical clock sourceOverview
Reference Manual
System Overview
RTCC1Low frequency (LFXO or
LFRCO)
BURTC1Low frequency (LFXO or
LFRCO)
TIMER3High frequency (HFXO or
HFRCO)
Systick timer1High frequency (HFXO or
HFRCO)
WDOG1Low frequency (HCLK/1024,
LFXO, LFRCO or ULFRCO)
LETIMER1Low frequency (LFXO, LFRCO
or ULFRCO)
32 bit Real Time Counter and
Compare, typically used to accurately time inactive periods in
the radio communication protocol and enable wakeup on compare match.
32 bit Backup Real Time Counter that operates down to EM4.
16 or 32 bit general purpose
timer. (See configuration summary in datasheet for timer configration details.
24 bit systick timer integrated in
the Cortex-M33. Typically used
as an Operating System timer.
Watch dog timer. Once enabled,
this module must be periodically
accessed. If not, this is considered an error and the
EFR32xG21 is reset in order to
recover the system.
Low energy general purpose
timer.
PROTIMER1High frequency (HFXO or
HFRCO)
Protocol Timer, typically used
by the RF protocol Stack.
Advanced interconnect features allows synchronization between timers. This includes:
• Start / stop any high frequency timer synchronized with the RTCC
• Trigger RSM state transitions based on compare timer compare match, for instance to provide clock cycle accuracy on frame transmit timing
2.17 RF Test Modes
EFR32xG21 supports a wide range of RF test modes typically used for characterization and regulation compliance testing, including:
• Unmodulated carrier transmit
• Modulated carrier transmit, with internal configurable pseudo random data generator
• Continuous data reception for Bit Error Rate (BER) measurements
• Storing of raw receiver data to RAM
• Transmit of raw frequency data from RAM
silabs.com | Building a more connected world.Rev. 0.4 | 33
Page 34
3. System Processor
43210
CM33 Core
Reference Manual
System Processor
Quick Facts
What?
The EFR32xG21 features the industry leading Cortex-M33 CPU from ARM.
Why?
The ARM Cortex-M33 is designed for exceptionally
short response time, high code density, and high 32bit throughput while maintaining a strict cost and
power consumption budget.
3.1 Introduction
32-bit ALU
Hardware divider
Memory Protection UnitDSP extensions
Trust Zone
Instruction InterfaceData Interface
NVIC Interface
Single cycle
32-bit multiplier
Floating-Point Unit
Thumb & Thumb-2
Decode
How?
Combined with the ultra low energy peripherals
available in EFR32xG21 devices, the Cortex-M33
processor's Harvard architecture, 3 stage pipeline,
single cycle instructions, Thumb-2 instruction set
support, and fast interrupt handling make it perfect
for 8-bit, 16-bit, and 32-bit applications.
The ARM Cortex-M33 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-M33 implemented is revision r0p1.
silabs.com | Building a more connected world.Rev. 0.4 | 34
Page 35
Reference Manual
System Processor
3.2 Features
• Harvard architecture
• Separate data and program memory buses (No memory bottleneck as in a single bus system)
• 3-stage pipeline
• Thumb-2 instruction set
• Enhanced levels of performance, energy efficiency, and code density
• Single cycle multiply and hardware divide instructions
• 32-bit multiplication in a single cycle
• Signed and unsigned divide operations between 2 and 12 cycles
• 1.5 DMIPS/MHz
• Trust Zone
• Independent Secure and Privileged states
• Accelerated context switching
• 16 Region MPU
• 24-bit System Tick Timer for Real Time OS
• 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-bit and 16-bit architectures
• Aligned or unaligned data storage and access
• Contiguous storage of data requiring different byte lengths
• Data access in a single core access 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
3.3 Functional Description
For a full functional description of the ARM Cortex-M33 implementation in the EFR32xG21 family, the reader is referred to the ARM
Cortex-M33 documentation.
silabs.com | Building a more connected world.Rev. 0.4 | 35
Page 36
Reference Manual
System Processor
3.3.1 Interrupt Operation
ModuleCortex-M NVIC
IEN[n]
Register
Write
Interrupt
condition
setclear
IF[n]
IRQ
Figure 3.1. Interrupt Operation
The interrupt request (IRQ) lines are connected to the Cortex-M33. Each of these lines (shown in 3.3.3 Interrupt Request lines (IRQ)) is
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 IF registers. When setting or clearing and interrupt through the IF register use of
the IF_SET or IF_CLEAR bit operation registers is recommended.
SETENA[n]/CLRENA[n]
Active interrupt
setclear
SETPEND[n]/CLRPEND[n]
Software generated interrupt
Interrupt
request
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
ISPRn/ICPRn) in the Cortex-M33 NVIC. The pending bit is then qualified with an enable bit (set/cleared with SETENA/CLRENA bits in
ISERn/ICERn) before generating an interrupt request to the core. Figure 3.1 Interrupt Operation on page 36 illustrates the interrupt system. For more information on how the interrupts are handled inside the Cortex-M33, the reader is referred to the EFR32 Cortex-M33
Reference Manual.
3.3.1.1 Avoiding Extraneous Interrupts
There can be latencies in the system such that clearing an interrupt flag could take longer than leaving an Interrupt Service Routine
(ISR). This can lead to the ISR being re-entered as the interrupt flag has yet to clear immediately after leaving the ISR. To avoid this,
when clearing an interrupt flag at the end of an ISR, the user should execute ARM's Data Synchronization Barrier (DSB) instruction.
Another approach is to clear the interrupt flag immediately after identifying the interrupt source and then service the interrupt as shown
in the pseudo-code below. The ISR typically is sufficiently long to more than cover the few cycles it may take to clear the interrupt status, and also allows the status to be checked for further interrupts before exiting the ISR.
irqXServiceRoutine() {
do {
clearIrqXStatus();
serviceIrqX();
} while(irqXStatusIsActive());
}
3.3.2 TrustZone
The Cortex-M33 implements ARM TrustZone which provides the ability to restrict access to peripherals and memory regions based on
the CPU security attribute. TrustZone works in combination which the MPU which controls privileged/unprivileged execution of code to
provide a full security solution. The Security Management Unit (SMU) is used to configure access restrictions in the various modes.
Refer to 10. SMU - Security Management Unit for more information.
For information about TrustZone features in the core or information on TrustZone specific instructions please see the EFR32 CortexM33 Reference Manual provided by ARM
silabs.com | Building a more connected world.Rev. 0.4 | 36
Page 37
3.3.3 Interrupt Request lines (IRQ)
This table shows all IRQ's for the system processor. M33 High Speed interrupts are indicated by an '*'.
See the individual peripheral chapters for more information on interrupt function.
IRQ #NameSource(s)
0*SETAMPERHOSTSE.tamper_hostirq
1*SEMBRXSE.mb_rxint
2*SEMBTXSE.mb_txint
3*SMU_SECURESMU.SECURE
4*SMU_PRIVILEGEDSMU.PRIVILEGED
5*EMUEMU.MAIN
6*TIMER0TIMER0.MAIN
7*TIMER1TIMER1.MAIN
8*TIMER2TIMER2.MAIN
9*TIMER3TIMER3.MAIN
Reference Manual
System Processor
10*RTCCRTCC.MAIN
11*USART0_RXUSART0.RX
12*USART0_TXUSART0.TX
13*USART1_RXUSART1.RX
14*USART1_TXUSART1.TX
15*USART2_RXUSART2.RX
16*USART2_TXUSART2.TX
17*ICACHE0ICACHE0.MAIN
18*BURTCBURTC.MAIN
19*LETIMER0LETIMER0.MAIN
20*SYSCFGSYSCFG.MAIN
21*LDMALDMA.MAIN
22*LFXOLFXO.MAIN
23*LFRCOLFRCO.MAIN
24*ULFRCOULFRCO.MAIN
25*GPIO_ODDGPIO.ODD
26*GPIO_EVENGPIO.EVEN
27*I2C0I2C0.irq
28*I2C1I2C1.irq
29*EMUDGEMU.DG
30*EMUSEEMU.SE
31*AGCAGC.MAIN
32*BUFCBUFC.MAIN
33*FRC_PRIFRC.PRI
silabs.com | Building a more connected world.Rev. 0.4 | 37
Page 38
IRQ #NameSource(s)
34*FRCFRC.MAIN
35*MODEMMODEM.MAIN
36*PROTIMERPROTIMER.MAIN
37*RAC_RSMRAC.RSM
38*RAC_SEQRAC.SEQ
39*PRORTCPRORTC.MAIN
40*SYNTHSYNTH.MAIN
41*ACMP0ACMP0.MAIN
42*ACMP1ACMP1.MAIN
43*WDOG0WDOG0.MAIN
44*WDOG1WDOG1.MAIN
45*HFXO00HFXO0.MAIN
46*HFRCO0HFRCO0.MAIN
Reference Manual
System Processor
47*HFRCOEM23HFRCOEM23.MAIN
48*CMUCMU.MAIN
49*AESRADIOAES.MAIN
50*IADCIADC0.MAIN
51*MSCMSC.irq_imem
52*DPLL0DPLL0.MAIN
53*SW0SYSCFG.SW0
54*SW1SYSCFG.SW1
55*SW2SYSCFG.SW2
56*SW3SYSCFG.SW3
57*KERNEL0
58*KERNEL1
59*M33CTI0CORE.CTI0
60*M33CTI1CORE.CTI1
silabs.com | Building a more connected world.Rev. 0.4 | 38
Page 39
4. Memory and Bus System
43210
ARM Cortex-M
DMA Controller
Flash
RAM
Peripherals
Reference Manual
Memory and Bus System
Quick Facts
What?
A low latency memory system including low energy
Flash and RAM with data retention which makes the
low energy modes attractive.
Why?
RAM retention reduces the need for storing data in
Flash and enables frequent use of the ultra low energy modes EM2 and EM3.
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.
4.1 Introduction
The EFR32xG21 contains a set of AMBA buses which move data between peripherals, memory, and the CPU. All memories and register interfaces are memory mapped into a unified address space.
silabs.com | Building a more connected world.Rev. 0.4 | 39
Page 40
Reference Manual
Memory and Bus System
4.2 Functional Description
The internal memory segments of the Cortex-M33 are mapped into the system memory map as shown by Figure 4.1 System Address
Space with Core and Code Space Listing on page 40.
Figure 4.1. System Address Space with Core and Code Space Listing
Flash for the main program memory (CODE) is located at address 0x00000000 in the memory map of the EFR32xG21.
SRAM for the main data memory (RAM) is located at address 0x20000000 in the memory map of the EFR32xG21. When running code
located in RAM, the Cortex-M33 uses the System bus interface to fetch instructions. This results in reduced performance as the CortexM33 accesses stack, other data in SRAM and peripherals using the System bus interface.
The Sequencer RAM (SEQRAM) is located at address 0xA0000000 and is used by the Sequencer for both instructions and data. This
RAM is also available for general use if not required by the RF subsystem.
silabs.com | Building a more connected world.Rev. 0.4 | 40
Page 41
Reference Manual
Memory and Bus System
4.2.1 Bus Matrix
A multilayer AMBA AHB bus matrix connects the master bus interfaces to the AHB slaves. 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 CPU has two AHB bus masters (Code and System) so that it may retrieve instructions and data in parallel. The Code master is
used to access all memory below address 0x20000000 and the System master access addresses 0x20000000 and above.
Cortex-M
LDMA
Code
System
AHB Multilayer
Bus Matrix
Flash
RAM (DMEM)
SEQRAM
SE_MAILBOX
AHB/APB
Bridge
(High
Frequency)
AHB/APB
Bridge
(Low
Frequency)
Peripheral a
Peripheral n
Peripheral m
Peripheral z
Figure 4.2. EFR32xG21 Bus System
4.2.1.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 during peak interaction. However, one wait state is inserted for master accesses occurring after a prolonged inactive time. This wait state allows for increased power efficiency during master idle time.
4.2.1.2 Bus Faults
System accesses from the core can receive a bus fault in the following condition(s):
• The core attempts to access an address that is not assigned to any peripheral or other system device. These faults can be enabled
or disabled by setting the ADDRFAULTEN bit in the SYSCFG_CTRL register.
• The core attempts to access a peripheral register that is LOCKED.
• The core attempts to access a peripheral or system device that has its clock disabled. The radio subsystem is the only peripheral
with an independent bus clock that can generate a fault of this type. This fault can be enabled or disabled by setting the ADDRFAULTEN bit in the SYSCFG_CTRL register.
• System RAM controller or RADIO RAM controller detects a 2bit ECC error. These faults can be enabled or disabled by setting the
RAMECCERRFAULTEN bit in the SYSCFG_CTRL register
• Registers with synchronization requirements may generate bus faults if accessed incorrectly. See 4.2.4.4 Peripheral Access Per-
formance for more details on register access types. In particular the following actions can cause bus faults:
• Config register written while peripheral enabled.
• Sync register written while peripheral disabled
• LfSync register written while a previous write is pending
• Peripheral disabled while any LfSync write is pending
In addition to any condition-specific bus fault control bits, the bus fault interrupt itself can be enabled or disabled in the same way as all
other internal core interrupts.
silabs.com | Building a more connected world.Rev. 0.4 | 41
Page 42
Reference Manual
Memory and Bus System
4.2.2 Flash
The Flash retains data in any state and typically stores the application code and special user data. The Flash memory is typically programmed through the debug interface, but can also be erased and written to from software.
• Up to 1024 kB of memory
• Page size of 8 KB (minimum erase unit)
• Minimum 10k erase cycles endurance
• Greater than 10 years data retention at 85°C
• Lock registers for memory protection
• Data retention in any state
4.2.3 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 be set up to transfer data between the SRAM, Flash and peripherals.
The device contains several blocks of SRAM for various purposes including general data memory (RAM) and various RF subsystem
rams (SEQRAM, FRCRAM). For more detailed information see 6. MSC - Memory System Controller .
• Up to 96 kB of memory (RAM)
• RAM blocks may be powered down when not in use
• Data retention of the entire memory in EM2 to EM3
4.2.4 Peripherals
The peripherals are mapped into the peripheral memory segment, each with a fixed size address range shown in the 4.2.4.1 Peripheral
Map
silabs.com | Building a more connected world.Rev. 0.4 | 42
Page 43
Reference Manual
Memory and Bus System
4.2.4.1 Peripheral Map
This table shows the address range for each peripheral. In addition it shows the lowest energy mode in which the peripheral is powered. Note that EM3 is defined as EM2 with all clocks disabled. Therefore all peripherals powered in EM2 are also powered in EM3 but
may not function if they require a running clock.
See the individual peripheral chapters for more information on low power operation.
Address RangeModule NamePower Domain
0x40004000 - 0x40007FFFEMUEM2.B
0x40008000 - 0x4000BFFFCMUEM2.B
0x4000C000 - 0x4000FFFFHFXO0EM1
0x40010000 - 0x40013FFFHFRCO0EM1
0x40018000 - 0x4001BFFFFSRCOEM4
0x4001C000 - 0x4001FFFFDPLL0EM1
0x40020000 - 0x40023FFFLFXOEM4
0x40024000 - 0x40027FFFLFRCOEM4
0x40028000 - 0x4002BFFFULFRCOEM4
0x40030000 - 0x40033FFFMSCEM1
0x40034000 - 0x40037FFFICACHE0EM1
0x40038000 - 0x4003BFFFPRSEM2.B
0x4003C000 - 0x4003FFFFGPIOEM2.A
0x40040000 - 0x40043FFFLDMAEM1
0x40044000 - 0x40047FFFLDMAXBAREM1
0x40048000 - 0x4004BFFFTIMER0EM1
0x4004C000 - 0x4004FFFFTIMER1EM1
0x40050000 - 0x40053FFFTIMER2EM1
0x40054000 - 0x40057FFFTIMER3EM1
0x40058000 - 0x4005BFFFUSART0EM1
0x4005C000 - 0x4005FFFFUSART1EM1
0x40060000 - 0x40063FFFUSART2EM1
0x40064000 - 0x40067FFFBURTCEM4
0x40068000 - 0x4006BFFFI2C1EM1
0x40074000 - 0x40077FFFLVGDEM2.B
0x4007C000 - 0x4007FFFFSYSCFGEM1
0x40080000 - 0x40083FFFBURAMEM4
0x40088000 - 0x4008BFFFGPCRCEM1
0x44000000 - 0x44003FFFRADIOAESEM1
0x44004000 - 0x44007FFFBUFCEM1
0x44008000 - 0x4400BFFFSMUEM1
0x48000000 - 0x48003FFFRTCCEM2.A
0x4A000000 - 0x4A003FFFLETIMER0EM2.B
silabs.com | Building a more connected world.Rev. 0.4 | 43
Page 44
Memory and Bus System
Address RangeModule NamePower Domain
0x4A004000 - 0x4A007FFFIADC0EM2.B
0x4A008000 - 0x4A00BFFFACMP0EM2.B
0x4A00C000 - 0x4A00FFFFACMP1EM2.B
0x4A010000 - 0x4A013FFFI2C0EM2.B
0x4A014000 - 0x4A017FFFHFRCOEM23EM2.B
0x4A018000 - 0x4A01BFFFWDOG0EM2.B
0x4A01C000 - 0x4A01FFFFWDOG1EM2.B
0x4A020000 - 0x4A023FFFAMUXCP0EM2.B
0x4C000000 - 0x4C00007FSEMAILBOXEM1
0x50004000 - 0x50007FFFEMU_NSEM2.B
0x50008000 - 0x5000BFFFCMU_NSEM2.B
0x5000C000 - 0x5000FFFFHFXO0_NSEM1
0x50010000 - 0x50013FFFHFRCO0_NSEM1
Reference Manual
0x50018000 - 0x5001BFFFFSRCO_NSEM4
0x5001C000 - 0x5001FFFFDPLL0_NSEM1
0x50020000 - 0x50023FFFLFXO_NSEM4
0x50024000 - 0x50027FFFLFRCO_NSEM4
0x50028000 - 0x5002BFFFULFRCO_NSEM4
0x50030000 - 0x50033FFFMSC_NSEM1
0x50034000 - 0x50037FFFICACHE0_NSEM1
0x50038000 - 0x5003BFFFPRS_NSEM2.B
0x5003C000 - 0x5003FFFFGPIO_NSEM2.A
0x50040000 - 0x50043FFFLDMA_NSEM1
0x50044000 - 0x50047FFFLDMAXBAR_NSEM1
0x50048000 - 0x5004BFFFTIMER0_NSEM1
0x5004C000 - 0x5004FFFFTIMER1_NSEM1
0x50050000 - 0x50053FFFTIMER2_NSEM1
0x50054000 - 0x50057FFFTIMER3_NSEM1
0x50058000 - 0x5005BFFFUSART0_NSEM1
0x5005C000 - 0x5005FFFFUSART1_NSEM1
0x50060000 - 0x50063FFFUSART2_NSEM1
0x50064000 - 0x50067FFFBURTC_NSEM4
0x50068000 - 0x5006BFFFI2C1_NSEM1
0x50074000 - 0x50077FFFLVGD_NSEM2.B
0x5007C000 - 0x5007FFFFSYSCFG_NSEM1
0x50080000 - 0x50083FFFBURAM_NSEM4
0x50088000 - 0x5008BFFFGPCRC_NSEM1
silabs.com | Building a more connected world.Rev. 0.4 | 44
Page 45
Memory and Bus System
Address RangeModule NamePower Domain
0x54000000 - 0x54003FFFRADIOAES_NSEM1
0x54004000 - 0x54007FFFBUFC_NSEM1
0x54008000 - 0x5400BFFFSMU_NSEM1
0x58000000 - 0x58003FFFRTCC_NSEM2.A
0x5A000000 - 0x5A003FFFLETIMER0_NSEM2.B
0x5A004000 - 0x5A007FFFIADC0_NSEM2.B
0x5A008000 - 0x5A00BFFFACMP0_NSEM2.B
0x5A00C000 - 0x5A00FFFFACMP1_NSEM2.B
0x5A010000 - 0x5A013FFFI2C0_NSEM2.B
0x5A014000 - 0x5A017FFFHFRCOEM23_NSEM2.B
0x5A018000 - 0x5A01BFFFWDOG0_NSEM2.B
0x5A01C000 - 0x5A01FFFFWDOG1_NSEM2.B
0x5A020000 - 0x5A023FFFAMUXCP0_NSEM2.B
Reference Manual
0x5C000000 - 0x5C00007FSEMAILBOX_NSEM1
0xA8004000 - 0xA8007FFFFRCEM1
0xA800C000 - 0xA800FFFFAGCEM1
0xA8010000 - 0xA8013FFFRFCRCEM1
0xA8014000 - 0xA8017FFFMODEMEM1
0xA8018000 - 0xA801BFFFSYNTHEM1
0xA801C000 - 0xA801FFFFPROTIMEREM1
0xA8020000 - 0xA8023FFFRACEM1
0xB8004000 - 0xB8007FFFFRC_NSEM1
0xB800C000 - 0xB800FFFFAGC_NSEM1
0xB8010000 - 0xB8013FFFRFCRC_NSEM1
0xB8014000 - 0xB8017FFFMODEM_NSEM1
0xB8018000 - 0xB801BFFFSYNTH_NSEM1
0xB801C000 - 0xB801FFFFPROTIMER_NSEM1
0xB8020000 - 0xB8023FFFRAC_NSEM1
4.2.4.2 Peripheral non-word access behavior
When writing to peripheral registers, all accesses are treated as 32-bit accesses. This means that writes to a register need to be large
enough to cover all bits of register, otherwise, any uncovered bits may become corrupted from the partial-word transfer. Thus, the safest practice is to always do 32-bit writes to peripheral registers.
When reading, there is generally no issue with partial word accesses, however, note that any read action (e.g. FIFO popping) will be
triggered regardless of whether the actual FIFO bit-field was included in the transfer size.
silabs.com | Building a more connected world.Rev. 0.4 | 45
Page 46
Reference Manual
Memory and Bus System
4.2.4.3 Peripheral Bit Set and Clear
The EFR32xG21 supports bit set, bit clear, and bit toggle access to most peripheral registers. The bit set and bit clear functionality (also
called Bit Access) enables modification of bit fields without the need to perform a read-modify-write. Also, the operation is contained
within a single bus access. Bit access registers and their addresses are shown in the register map for each peripheral. Peripherals with
no _SET, _CLR, or _TGL registers in the register map to not support these functions.
Each register with Bit Set functionality will have a _SET register. Whenever a bit in the SET register is written to a 1 the corresponding
bit in its target register is set. The SET register is located at TARGET + 0x1000 where TARGET is the address of the target register and
has the same name as the target register with '_SET' appended.
Each register with Bit Clear functionality will have a CLR register. Whenever a bit in the CLR register is written to a 1 the corresponding
bit in its target register is cleared. The CLR register is located at TARGET + 0x2000 where TARGET is the address of the target register
and has the same name as the target register with '_CLR' appended.
Each register with Bit Toggle functionality will have a TGL register. Whenever a bit in the TGL register is written to a 1 the corresponding bit in its target register is inverted. The TGL register is located at TARGET + 0x3000 where TARGET is the address of the target
register and has the same name as the target register with '_TGL' appended.
Note: It is possible to combine bit clear and bit set operations in order to arbitrarily modify multi-bit register fields without affecting other
fields in the same register. In this case, care should be taken to ensure that the field does not have intermediate values that can lead to
erroneous behavior. For example, if bit clear and bit set operations are used to change an analog tuning register field from 0x2 to 0x4
by clearing bit 1 and then setting bit 2, the field would take on a value of zero for short time. If the analog module is active at the time,
this could lead to undesired behavior.
4.2.4.4 Peripheral Access Performance
The Cortex-M33, DMA Controller, and peripherals run on clocks which can be pre-scaled separately. Clocks and pre-scaling are described in more detail in 8. CMU - Clock Management Unit. This section describes the access performance for a peripheral register based
on its frequency relative to the CPUCLK frequency and its access type. For this discussion, PERCLK refers to a selected peripheral's
clock frequency and CPUCLK refers to the core's clock frequency.
The type of each register in a peripheral is indicated in the 'Access' column of the peripherals register table. Register types are: ENABLE, CONFIG, SYNC, LFSYNC, and INTFLAG. If not type is listed then the register is a Generic register.
4.2.4.4.1 Generic Registers
Registers with no type listed are generic registers. They may be read or written to at any time. Access will not stall the CPU.
4.2.4.4.2 CONFIG Registers
CONFIG Registers contain configuration that does not change during peripheral operation.
CONFIG registers may only be written when a peripheral is disabled. Writing to a CONFIG register when a peripheral is enabled will
result in a BUSFAULT. CONFIG register writes will not stall the CPU.
CONFIG registers may be read at any time. Reads will not stall the CPU.
4.2.4.4.3 SYNC Registers
SYNC registers are used to communicate with running high-speed peripherals where PERCLK is expected to be either higher or marginally slower (within an order of magnitude) than CPUCLK. For example a timer running at 80Mhz when the core is at 40Mhz or at
10Mhz when the core is 80Mhz. In this case CPU stalls of several PERCLOCK cycles do not significantly impact overall system performance in most systems.
SYNC registers may only be written to when the peripheral is enabled. Writing to a SYNC register when a peripheral is disabled will
result in a BUSFAULT. A write will take several (2 - 3) PERCLK cycles to complete (take effect) during which time the entire module will
be in a pending state. If a SYNC register is written to while the peripheral is already in a pending state, the CPU is stalled until the
previous write finishes. If a SYNC register is written to while the peripheral is not in a pending state, the CPU is not stalled.
SYNC registers may be read at any time. If a SYNC register is read while the peripheral is disabled, the CPU is not stalled. If a SYNC
register is read while the peripheral is enabled, the CPU will be stalled for several (2 -3) PERCLK cycles while up to date values are
retrieved from the peripheral.
silabs.com | Building a more connected world.Rev. 0.4 | 46
Page 47
Reference Manual
Memory and Bus System
4.2.4.4.4 LFSYNC Registers
LFSYNC registers are used to communicate with running low frequency peripherals where PERCLK is expected to be much lower than
the CPU clock and synchronization delays may be long. For example, a LETIMER running at 32Khz when the core is at 80Mhz. In this
case CPU stalls of several PERCLOCK cycles represent a significant blockage of the CPU and need to be avoided whenever possible.
LFSYNC registers accommodate this by allowing the CPU to write the register and continue to do other work while the value is
synchronized.
Each LFSYNC register has a SYNCBUSY bit indicating if it is currently pending. Software should check the busy status bit before writing to an LFSYNC register. If a LFSYNC register is written to while it is in a pending state, a BUSFAULT will occur. A write will take will
take several (3 -4) PERCLK cycles to complete during which time the register will be in a pending state with the busy status bit set.
Software may use the busy status bit to determine when the write has taken effect.
LFSYNC registers may be read at any time. The CPU is never stalled on a read. Some LFSYNC registers are static, meaning the value
is not modified by hardware. If a static LFSYNC register is read while pending, the pending (recently written) data may be returned even
though it has not yet taken effect. Some LFSYNC registers are volatile, meaning the value may be modified by hardware. If a volatile
LFSYNC register is read, it will return the current value of the register, ignoring any pending (recently written) data that has not yet
taken effect.
4.2.4.4.5 ENABLE Registers
ENABLE registers contain the enable bit for a peripheral.
ENABLE registers may be written at any time. When the peripheral is enabled it takes some time for the enable to take effect during
which time the module is pending. Peripherals will be in the pending state for a few (2 - 3) PERCLK cycles when first enabled. Since the
clock source for the peripheral may not be running before the peripheral is enabled, the start up time for the clock source may increase
the pending time. See EFR32xG21 Wireless Gecko for more information on on-demand clock sources.
Disabling a high frequency module will stall the CPU until all pending SYNC writes have completed and any pending enable has completed. If the module is fully enabled and no SYNC writes are pending, the disable will be instantaneous. Disabling low frequency peripheral which a LFSYNC is pending will result in a bus fault. Disabling a low frequency peripherals while an enable is still pending
causes no CPU stall.
ENABLE registers may be read at any time.
4.2.4.4.6 INTFLAG Registers
INTFLAG registers contain interrupt flags. To set or clear an interrupt flag, the _SET or _CLR register alias must be used. Writing directly to the INTFLAG register will have no effect.
Note that for an interrupt to occur when a flag is set the IRQ must be enabled in the NVIC.
silabs.com | Building a more connected world.Rev. 0.4 | 47
Page 48
5. Radio Transceiver
43210
Reference Manual
Radio Transceiver
Quick Facts
What?
The Radio Transceiver provides access to transmit
and receive data, radio settings and control interface.
Why?
The Radio Transceiver enables the user to communicate using a wide range of data rates, modulation
and frame formats.
How?
Dynamic or fixed frame lengths, optional address
recognition, flexible CRC and crypto schemes
makes the EFR32 Series 2 perfectly suit any application using low or medium data rate radio communication.
silabs.com | Building a more connected world.Rev. 0.4 | 48
Page 49
Reference Manual
Radio Transceiver
5.1 Introduction
The Radio Transceiver of the EFR32 Series 2 enables the user to control a wide range of settings and options for tailoring radio operation precisely to the users need. It provides access to the transmit and receive data buffers and supports both dynamic and static frame
lengths, as well as automatic address filtering and CRC insertion/verification.
As seen in the Radio Overview illustration (Figure 5.1 Radio Overview on page 49), the radio consists of several modules all responsible for specific tasks. Please refer to the abbreviations section (Appendix 1. Abbreviations) for a comprehensive description of acronyms.
Radio Transceiver
IFADC
RFIN
LNA
IFADC
Demodulator
(DEMOD)
(BUFC)
Buffer Controller
MATCH / FILTER
RFOUT0
RFOUT1
PA0
PA1
Fractional-N
Frequency
Synthesizer
Automatic
Gain Control
(AGC)
Modulator
(MOD)
(FRC)
Frame Controller
(RAC)
Radio Controller
CRC
Figure 5.1. Radio Overview
During transmission (TX), the Radio Controller enables the SYNTH, Modulator and PA. The Modulator requests data from the Frame
Controller, which reads data from a buffer. Based upon modulation format and data to send, the Modulator manipulates the SYNTH to
output the correct frequency and phase. When the whole frame has been transmitted, the radio can automatically switch to receive
mode.
In receive mode (RX), the radio controller enables the LNA, SYNTH, Mixer, ADC and Demodulator. The Demodulator searches for valid
frames according to modulation format and data rate. If a frame is detected, the demodulated data is handed to the Frame Controller,
which stores the data in the Buffer. When the complete frame has been received (determined by the Frame Controller), it is possible to
either go to TX or stay in RX to search for a new frame.
The Radio Transceiver interface is accessible through software drivers provided by Silicon Labs.
silabs.com | Building a more connected world.Rev. 0.4 | 49
Page 50
6. MSC - Memory System Controller
43210
Reference Manual
MSC - Memory System Controller
Quick Facts
What?
The user can perform Flash memory read, read configuration, and write operations through the Memory
System Controller (MSC). SRAM operation may be
configured though System Configuration (SYSCFG).
The MSC allows the application code, user data,
and flash lock bits to be stored in non-volatile Flash
memory. Certain memory system functions, such as
program memory wait-states 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.
A highly efficient low energy instruction cache reduces the number of flash reads significantly, thus
saving energy. Performance is also improved when
wait-states are used, since many of the wait-states
are eliminated. Built-in performance counters can be
used to measure the efficiency of the instruction
cache.
Instruction prefetcher improves program execution
performance by reducing the number of wait-state
cycles needed.
6.1 Introduction
The Memory System Controller (MSC) is the program memory unit of the EFR32xG21 microcontroller. The flash memory is readable
and writable from both the Cortex-M33 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. The information block is available for special user data. There is also a readonly page in the information block containing system and device calibration data. Flash read and write operations are supported in the
energy modes EM0 and EM1.
silabs.com | Building a more connected world.Rev. 0.4 | 50
Page 51
6.2 Features
• AHB read interface
• Scalable access performance to optimize the Cortex-M33 code interface
• Advanced energy optimization functionality
• Conditional branch target prefetch suppression
• Cortex-M33 disfolding of if-then (IT) blocks
• Instruction Cache
• Instruction Prefetch
• DMA read support in EM0 and EM1
• Command and status interface
• Flash write and erase
• Accessible from Cortex-M33 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
• No special time scaling registers needed
• Configurable interrupt erase abort
• Improved interrupt predictability
• Memory and bus fault control
• Security features
• Lockable debug access
• Page lock registers
• SW Mass erase and User Data lock bits
• End-of-write and end-of-erase interrupts
Reference Manual
MSC - Memory System Controller
6.3 Functional Description
The size of the main flash block is device dependent. The largest size available is 1024 kB (128 pages). The information block has 8
KB 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 6.1 MSC Flash Memory Mapping
on page 51 outlines how the Flash is mapped in the memory space. All Flash memory is organized into 8 KB pages.
Main00x00000000Software, debugYesUser code and data16 KB - 1024 kB
10x00002000Software, debugYes
...Software, debugYes
127
1
0x000FE000Software, debugYes
InformationN/A0x0FE00000SoftwareYesUser Data (UD)1 KB
N/A0x0FE08000-YesDevice Information (DI)1 KB
Note:
1. 127 pages for largest device.
6.3.1 Ram Configuration
The SYSCFG module contains controls for configuring the various RAM blocks on the device. Options include enabling EM2/EM3 data
retention, ECC, prefetch, and cache. For a complete description see 6.6 SYSCFG - System Configuration.
silabs.com | Building a more connected world.Rev. 0.4 | 51
Page 52
Reference Manual
MSC - Memory System Controller
6.3.2 Instruction Cache
The instruction cache improves the speed and power consumption of the Cortex-M33 by providing fast low power access to recently
executed instructions. For detailed information see 6.5 ICACHE - Instruction Cache
6.3.3 Device Information (DI) Page
This read-only page holds calibration data from the production test, several unique device IDs, and other part specific information. For a
complete description see 6.4 DEVINFO - Device Info Page.
6.3.4 User Data (UD) Page Description
This is the user data page in the information block. The page can be erased and written by software.
This page is not erased as part of a mass erase and can only be erased by issuing a command to the Secure Element. This is described in EFR32xG21 Wireless Gecko.
This page is written in the same way as any page in the Main user code area.
6.3.5 Bootloader
The EFR32xG21 supports use of the Gecko Bootloader detailed in UG266: Silicon Labs Gecko Bootloader User’s Guide (https://
www.silabs.com/support/resources).To enable bootloader functionality the second stage of the bootloader must be configured and pro-
grammed into the first 16KB of flash. The first stage of the bootloader is provided by the SE and is not user accessible. More details on
SE bootloader support see the SE peripheral documentation.
6.3.6 Post-reset Behavior
Calibration values are automatically written to registers by the MSC before application code start-up. The values can also be read from
the DI page by software. Other information such as the device ID and production date is also stored in the DI page and is readable from
software.
As part of the reset, hardware performs repeated flash reads to determine when flash is fully powered up and available for use by the
CPU. PWRUPCKBDFAILCOUNT in MSC_STATUS contains the number of failed reads during the last reset.
6.3.7 Flash Startup
On transitions from EM2/3 to EM0, the flash must be powered up. The time this takes depends on the current operating conditions. To
have a deterministic wake time, set STDLY0 in MSC_STARTUP to 0x64 and clear STDLY1, ASTWAIT, STWSEN and STWS. This will
result in a 10 us delay before the flash is ready. The system will wake up before this, but the Cortex will stall on the first access to the
flash until it is ready. Execute code from RAM or cache to get a faster CPU wake time.
To get a faster flash wake time that depends on the current operating conditions, set STDLY0 to 0x32 and set ASTWAIT in
MSC_STARTUP. When configured this way, the system will poll the flash to determine when it is ready, and then start execution.
For the fastest possible wakeup, code may be run with a set of wait-states initially and then automatically switched to normal operation.
Set STDLY0 to 0x32, STDLY1 to 0x32, and set ASTWAIT and STWSEN. Then configure STWS in MSC_STARTUP to the number of
wait-states to run with. With this setup, execution will begin with the given number of wait-states after 5 uS, and the system will run with
reduced throughput due to the wait-states for another 5 us before returning to normal full speed operation
The recommended setting for MSC_STARTUP register is to set STDLY0 to 0x32 for a 5 us wait and set ASTWAIT to one for active
sampling. Set STWSEN to zero to bypass second delay period. This provides the best wakeup time without sacrificing power consumption.
Flash wakeup on demand is supported when wakeup from EM2/3 to EM0. Set bit FLASHPWRUPONDEMAND of register EMU_CTRL
to enable the power up on demand. When enabled, flash will not be powered up until accessed. In this case it is possible for the MCU
to wake, execute out of RAM or cache, and return to sleep mode without ever powering on the Flash. Software can force the flash to
power up by writing PWRUP in MSC_CMD. When flash is powered via MSC_CMD the MSC_IF.PWRUPF interrupt flag will be set when
power up is complete and the CPU will be interrupted if MSC_IEN.PWRUPF is set.
silabs.com | Building a more connected world.Rev. 0.4 | 52
Page 53
Reference Manual
MSC - Memory System Controller
6.3.8 Wait-states
Since the CPU may be clocked faster than the Flash can respond it is necessary to configure wait-states for flash accesses at higher
CPU clock speeds. See the device Datasheet for information on the maximum allowed frequency for each wait-state setting. To configure the flash wait-states set the MODE field in MSC_READCTRL.
When changing wait states, care should be taken that the system is never in an invalid state. To ensure this, MODE should be changed
after the clock is changed when reducing clock speed and before the clock is changed when increasing clock speed.
In addition to the flash wait-state configuration, users must also correctly configure RAM wait states as discussed in 6.6.3 RAM Wait-
states.
6.3.9 Cortex-M33 If-Then Block Folding
The Cortex-M33 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-M33 Technical Reference Manual for details. Normally, it is expected that this feature is most efficient when operating with 0
wait-states. Folding is enabled by default.
6.3.10 Line Buffering (Prefetch)
The MSC reads a 2 word line from flash on any flash access. The data being accessed is returned immediately and the other word
locally cached so that it can be provided immediately if accessed. This has the effect of pre-fetching the second word when the first is
read resulting in fewer wait-states when executing sequential code. This feature may be disabled by setting DOUTBUFEN in
MSC_READCTRL.
silabs.com | Building a more connected world.Rev. 0.4 | 53
Page 54
Reference Manual
MSC - Memory System Controller
6.3.11 Erase and Write Operations
The 20 MHz FSRCO is used for timing during flash write and erase operations. The default values in MSC_FLASHPROGRAMTIME
and MSC_FLASHERASETIME contain the recommended programming configuration.
To erase a page first set WREN in MSC_WRITECTRL and load any address in the page to be erased into the MSC_ADDRB register.
Next check INVADDR, LOCKED, and WREADY in MSC_STATUS to ensure that the address is valid, not locked, and the MSC is ready
to modify flash. Writing ERASEPAGE in MSC_WRITEMD will execute the page erase operation. ERASE in MSC_IF will be set when
the page erase is complete. If ERASE in MSC_IEN is set, the end of a page erase will also trigger an interrupt. Finally, clear WREN to
disable flash operations.
In addition to a page erase, a mass erase will clear the entire contents of the main flash array. To execute a mass erase, set WREN
and then set ERASEMAIN0 in MSC_WRITECMD. When the mass erase completes ERASE is set just as with the page erase command. WREN should be cleared when a page erase has completed. User Data page contents are not included in a mass erase.
To perform a programming operation, set WREN and load the address to be programmed into the MSC_ADDRB register. Next check
INVADDR, LOCKED, WREADY, and WDATAREADY in MSC_STATUS to ensure that the address is valid, not locked, the MSC is
ready to modify flash, and the write data buffer is clear. Writing data to MSC_WDATA will begin the programming operation. If a burst
write is being performed, the next data word can be programmed to MSC_WDATA as soon as WDATAREADY is set. WRITE in
MSC_IF will be set when the programming operation is complete. If WRITE in MSC_IEN is set, the end of the program operation will
also trigger an interrupt. Finally, clear WREN to disable flash operations.
If data is written to the MSC_WDATA register faster than it can be processed, WDATAOV in MSC_IF will be set. If WDATAOV in
MSC_IEN is set an interrupt will also be fired.
The MSC_ADDRB register only has to be written once when writing to sequential words. After each word is written, ADDRB is incremented automatically by 4. The INVADDR bit of the MSC_STATUS register is set if the loaded address is outside the flash. The
LOCKED bit of the MSC_STATUS register is set if the page addressed is locked. Any attempts to erase or write to the page are ignored
if INVADDR or the LOCKED bits of the MSC_STATUS register are set.
Write and erase operations may be aborted by software. To abort an erase, set the ERASEABORT bit in the MSC_WRITECMD register. To abort a write, set WRITEEND in MSC_WRITECMD
For a DMA write, CLEARWDATA in MSC_WRITECMD to assert a DMA request and transfer the first word. Alternately the first word
may be programmed manually into MSC_WDATA by code.
By default, if any interrupt occurs during an erase operation, the erase is aborted. This feature may be disabled by clearing IRQERASEABORT in MSC_WRITECTRL. When an erase is aborted due to an interrupt, ERASEABORTED in MSC_STAUTS is set by hardware.
Software may observe the status of the MSC via the MSC_STATUS register. When a flash operation is in progress, BUSY will be set. If
a flash operation has been requested but not yet started, PENDING will be set. This may occur if a subsystem such as the radio controller is performing MSC operations. When the write buffer underflows, TIMEOUT will be set. Buffer underflow is a normal part of the
write procedure since it will occur once the last word has been written and no more data is available.
The Flash memory is organized into 64-bit wide double-words. Each 64-bit double-word can be written only twice between erase cycles. The lower and upper 32-bit words may be written sequentially in any order, or one at a time. Each flash bit is 1 after erase. Writing
a 0 will clear the bit. Writing a 1 will not change the bit value.
While it is possible to write twice to the lower or upper 32-bit word of the 64-bit double word, then the other 32-bit word cannot be used.
In this case, it is permitted to write to either the lower or upper 32-bit word twice between each erase, so long as no bit is ever cleared
more than once.
Note: The ERASEMAIN0, ERASEPAGE, and CMD_WDATA registers 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.
Note: During a write or erase, flash read accesses will be stalled, effectively halting code execution from flash. Code execution continues upon write/erase completion. Code residing in RAM or ICACHE may be executed during a write/erase operation.
6.3.11.1 Low-Power Write/Erase
To limit maximum current, the programming operations can be slowed down. Set LPWRITE in MSC_WRITECTRL to double the write/
erase time, halving the write/erase current.
silabs.com | Building a more connected world.Rev. 0.4 | 54
Page 55
Reference Manual
MSC - Memory System Controller
6.3.11.2 Flash Lock
The ability to program or erase pages may be disabled using the MSC_PAGELOCKWORDn registers. The bits in these registers may
only be set by the CPU and are cleared when the device is reset. This means that once locked a page may not be unlocked until a
reset occurs. Users wishing to lock accesses to flash should implement code to write to the MSC_PAGELOCKWORDn registers immediately after a reset. Any page locked in this way may not be written to or erased.
The user data page may be locked by setting UDLOCKBIT in MSC_MISCLOCKWORD. Page erase may be disabled by setting MELOCKBIT in MSC_MISCLOCKWORD.
6.4 DEVINFO - Device Info Page
The Device Info Page holds factory programmed information about the device. It contains the following data:
31:16ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
15:0OFFSETANA3HISPD0x0R
High-speed mode offset term for OSR>=4x
0
silabs.com | Building a more connected world.Rev. 0.4 | 81
Page 82
6.4.2.35 DEVINFO_LEGACY - Legacy Device Info
OffsetBit Position
Reference Manual
MSC - Memory System Controller
0x1FC
Reset
Access
31
30
29
28
27
26
25
24
23
22
21
20
19
0x80
R
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
Name
DEVICEFAMILY
BitNameResetAccessDescription
31:24ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
23:16DEVICEFAMILY0x80RDevice Family
Device Family
ValueModeDescription
16EFR32MG1PEFR32 Mighty Gecko Family Series 1 Device Config 1
17EFR32MG1BEFR32 Mighty Gecko Family Series 1 Device Config 1
0
18EFR32MG1VEFR32 Mighty Gecko Family Series 1 Device Config 1
19EFR32BG1PEFR32 Blue Gecko Family Series 1 Device Config 1
20EFR32BG1BEFR32 Blue Gecko Family Series 1 Device Config 1
21EFR32BG1VEFR32 Blue Gecko Family Series 1 Device Config 1
25EFR32FG1PEFR32 Flex Gecko Family Series 1 Device Config 1
26EFR32FG1BEFR32 Flex Gecko Family Series 1 Device Config 1
27EFR32FG1VEFR32 Flex Gecko Family Series 1 Device Config 1
28EFR32MG12PEFR32 Mighty Gecko Family Series 1 Device Config 2
29EFR32MG12BEFR32 Mighty Gecko Family Series 1 Device Config 2
30EFR32MG12VEFR32 Mighty Gecko Family Series 1 Device Config 2
31EFR32BG12PEFR32 Blue Gecko Family Series 1 Device Config 2
32EFR32BG12BEFR32 Blue Gecko Family Series 1 Device Config 2
33EFR32BG12VEFR32 Blue Gecko Family Series 1 Device Config 2
37EFR32FG12PEFR32 Flex Gecko Family Series 1 Device Config 2
38EFR32FG12BEFR32 Flex Gecko Family Series 1 Device Config 2
39EFR32FG12VEFR32 Flex Gecko Family Series 1 Device Config 2
40EFR32MG13PEFR32 Mighty Gecko Family Series 13 Device Config 3
41EFR32MG13BEFR32 Mighty Gecko Family Series 13 Device Config 3
42EFR32MG13VEFR32 Mighty Gecko Family Series 1 Device Config 3
43EFR32BG13PEFR32 Blue Gecko Family Series 1 Device Config 3
silabs.com | Building a more connected world.Rev. 0.4 | 82
Page 83
BitNameResetAccessDescription
44EFR32BG13BEFR32 Blue Gecko Family Series 1 Device Config 3
45EFR32BG13VEFR32 Blue Gecko Family Series 1 Device Config 3
49EFR32FG13PEFR32 Flex Gecko Family Series 1 Device Config 3
50EFR32FG13BEFR32 Flex Gecko Family Series 1 Device Config 3
51EFR32FG13VEFR32 Flex Gecko Family Series 1 Device Config 3
52EFR32MG14PEFR32 Mighty Gecko Family Series 1 Device Config 4
53EFR32MG14BEFR32 Mighty Gecko Family Series 1 Device Config 4
54EFR32MG14VEFR32 Mighty Gecko Family Series 1 Device Config 4
55EFR32BG14PEFR32 Blue Gecko Family Series 1 Device Config 4
56EFR32BG14BEFR32 Blue Gecko Family Series 1 Device Config 4
57EFR32BG14VEFR32 Blue Gecko Family Series 1 Device Config 4
61EFR32FG14PEFR32 Flex Gecko Family Series 1 Device Config 4
62EFR32FG14BEFR32 Flex Gecko Family Series 1 Device Config 4
Reference Manual
MSC - Memory System Controller
63EFR32FG14VEFR32 Flex Gecko Family Series 1 Device Config 4
71EFM32GEFM32 Gecko Device Family
72EFM32GGEFM32 Giant Gecko Device Family
73EFM32TGEFM32 Tiny Gecko Device Family
74EFM32LGEFM32 Leopard Gecko Device Family
75EFM32WGEFM32 Wonder Gecko Device Family
76EFM32ZGEFM32 Zero Gecko Device Family
77EFM32HGEFM32 Happy Gecko Device Family
81EFM32PG1BEFM32 Pearl Gecko Device Family Series 1 Device Config 1
83EFM32JG1BEFM32 Jade Gecko Device Family Series 1 Device Config 1
85EFM32PG12BEFM32 Pearl Gecko Device Family Series 1 Device Config 2
87EFM32JG12BEFM32 Jade Gecko Device Family Series 1 Device Config 2
89EFM32PG13BEFM32 Pearl Gecko Device Family Series 1 Device Config 3
91EFM32JG13BEFM32 Jade Gecko Device Family Series 1 Device Config 3
100EFM32GG11BEFM32 Giant Gecko Device Family Series 1 Device Config 1
103EFM32TG11BEFM32 Giant Gecko Device Family Series 1 Device Config 1
120EZR32LGEZR32 Leopard Gecko Device Family
121EZR32WGEZR32 Wonder Gecko Device Family
122EZR32HGEZR32 Happy Gecko Device Family
128SERIES2V0DI page is encoded with the series 2 layout. Check alternate lo-
cation.
15:0ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
silabs.com | Building a more connected world.Rev. 0.4 | 83
Page 84
Reference Manual
MSC - Memory System Controller
6.5 ICACHE - Instruction Cache
The ICACHE provides fast access to recently executed instructions improving both speed and power consumption of code execution.
The instruction cache is enabled by default, but can be disabled by setting CACHEDIS in ICACHE_CTRL. When enabled, the instruction cache typically reduces the number of flash reads significantly, thus saving energy. In most cases, a cache hit-rate of more than 70
% is achievable. When a 32-bit instruction fetch hits in the cache, the data is returned to the processor in one clock cycle, bypassing the
flash accesses wait-states. The cache content is retained in EM2 and EM3.
The instruction cache is connected directly to the CODE bus on the ARM core and functions as a memory access filter between the
processor and the memory system, as illustrated in Figure 6.1 Instruction Cache Block Diagram on page 84. The cache consists of an
access filter, lookup logic, SRAM, and three performance counters. The access filter checks if a transfer is an instruction fetch located
in a cacheable region. If it is the cache lookup logic and SRAM is enabled. Otherwise, the cache is bypassed and the access is forwarded to the memory system. If lookup is enabled data is either returned from the cache (hit) or fetch from the memory system and cached (miss).
Memory
CODE
AHB Bus
Access
Filter
Cache
Look-up Logic
Instruction Cache
SRAM
Loop Cache
Performance
Counters
SYSTEM
AHB Bus
CODE
AHB Bus
ARM Core
Figure 6.1. Instruction Cache Block Diagram
Note that while all access to code spaces use the CODE bus only instruction fetches are cached. Data accesses to the CODE region
are passed through the ICACHE.
6.5.1 Cache Operation
It is highly recommended to keep the cache enabled. To improve cache-efficiency, sections of code with very low cache hit rate should
not be cached. This is achieved by placing these code sections in non-cacheable MPU regions and setting USEMPU in ICACHE_CTRL. When USEMPU is set, instruction fetches to non-cacheable MPU regions will not be looked up or saved in cache. This
feature may also be used to avoid instructions from low-power memory taking up space from more power-hungry memory. For more
information on the MPU see the ARM Cortex-M33 MPU documentation.
The optional loop-cache is optimized to store smaller code-loops efficiently. The loop-cache is enabled when LPLEVEL in ICACHE_LPMODE is set to ADVANCED or MINACTIVITY. The difference between the two settings is that when MINACTIVITY is selected loop-cache outputs may be gated off to reduce power at the cost of more wait-states due to loop-cache misses. Having LPLEVEL
set to BASIC disables the loop-cache functionality completely. NESTFACTOR in ICACHE _LPMODE is used to decide when to stick
with the currently detected loop rather than start tracking a new loop. Optimal value will depend on the actual code running, meaning
that this setting may be tuned for optimal performance.
By default, the instruction cache is automatically invalidated when the contents of the flash is changed (i.e. written or erased). In many
cases, however, the application only makes changes to data in the flash, not code. In this case, the automatic invalidate feature can be
disabled by setting AUTOFLUSHDIS in ICACHE_CTRL. The cache can also be manually invalidated by writing 1 to FLUSH in ICACHE_CMD.
In the event that a parity error in the cache is detected, the RAMERRORIF flag will be set in ICACHE_IF. The data is automatically
reloaded when this occurs so no action is required by software. This flag informational only, and can be used to detect the rate of corruption events. If RAMERRORIEN in ICACHE_IEN is set, an interrupt will be triggered.
The cache is automatically flushed whenever a BUS-FAULT occurs. If this occurs during performance counting the counts will be effected.
silabs.com | Building a more connected world.Rev. 0.4 | 84
Page 85
Reference Manual
MSC - Memory System Controller
6.5.2 Performance Measurement
To measure the hit-rate of a code-section, the built-in performance counters can be used. Before the section, start the performance
counters by setting STARTPC in ICACHE_CMD register. This starts the performance counters, counting from 0. At the end of the section, stop the performance counters by setting STOPPC in ICACHE_CMD. The number of cache hits and cache misses for that section
can then be read from PCHITS and PCMISSES. The cache hit-ratio can be calculated as PCHITS / (PCHITS + PCMISSES). PCAHITS
contains the loopcache hits only. Any hits in PCAHITS are also counted in PCHITS. The loopcache hit-ratio can be calculated as PCAHITS / (PCHITS + PCMISSES). When PCHITS/PCAHITS/PCMISSES overflow, the HITOF/AHITOF/MISSOF interrupt flags are set respectively. These flags must be cleared by software. The range of the performance counters can be extended by increasing a counter
in the interrupt routine. The performance counters only count when a cache lookup is performed. Access to non-cacheable regions,
data fetches, and access made while the ICACHE is disabled do not increment PCMISSES.
Software may check the if the performance counters are running using PCRUNNING in ICACHE_STATUS.
silabs.com | Building a more connected world.Rev. 0.4 | 85
Page 86
MSC - Memory System Controller
6.5.3 Register Map
The offset register address is relative to the registers base address.
silabs.com | Building a more connected world.Rev. 0.4 | 86
Page 87
OffsetNameTypeDescription
0x3014ICACHE_STATUS_TGLRHStatus Register
0x3018ICACHE_CMD_TGLWCommand Register
0x301C ICACHE_LPMODE_TGLRWLow Power Mode
0x3020ICACHE_IF_TGLRWH INTFLAGInterrupt Flag
0x3024ICACHE_IEN_TGLRWInterrupt Enable
6.5.4 Register Description
6.5.4.1 ICACHE_IPVERSION - IP Version
OffsetBit Position
Reference Manual
MSC - Memory System Controller
0x000
Reset
Access
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
0x0
R
15
14
Name
IPVERSION
BitNameResetAccessDescription
31:0IPVERSION0x0RIP version ID
The read only IPVERSION field gives the version for this module. There may be minor software changes required for
modules with different values of IPVERSION.
13
12
11
10
9
8
7
6
5
4
3
2
1
0
silabs.com | Building a more connected world.Rev. 0.4 | 87
Page 88
6.5.4.2 ICACHE_CTRL - Control Register
OffsetBit Position
Reference Manual
MSC - Memory System Controller
0x004
Reset
Access
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0x0
0x0
RWRWRW
Name
AUTOFLUSHDIS
USEMPU
BitNameResetAccessDescription
31:3ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
2AUTOFLUSHDIS0x0RWAutomatic Flushing Disable
Disables automatic flushing based on Internal Flash write/erase
1USEMPU0x0RWUse MPU
Use MPU to select non/cacheable regions
0CACHEDIS0x0RWCache Disable
0
0x0
CACHEDIS
Disables caching for all regions
6.5.4.3 ICACHE_PCHITS - Performance Counter Hits
OffsetBit Position
0x008
Reset
Access
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
0x0
R
15
14
13
12
11
Name
PCHITS
BitNameResetAccessDescription
31:0PCHITS0x0RPerformance Counter Hits
Hit counter value
10
9
8
7
6
5
4
3
2
1
0
silabs.com | Building a more connected world.Rev. 0.4 | 88
Hit counter value for hits due to Advanced Buffering mode. These hits are also represented in PCHITS.
silabs.com | Building a more connected world.Rev. 0.4 | 89
Page 90
6.5.4.6 ICACHE_STATUS - Status Register
OffsetBit Position
Reference Manual
MSC - Memory System Controller
0x014
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
Reset
Access
Name
BitNameResetAccessDescription
31:1ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
0PCRUNNING0x0RPC Running
Performance Counters are running
6.5.4.7 ICACHE_CMD - Command Register
OffsetBit Position
0x018
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0x0
R
PCRUNNING
0
Reset
Access
0x0
W
0x0
W
Name
STOPPC
STARTPC
BitNameResetAccessDescription
31:3ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
2STOPPC0x0WStop Performance Counters
Stops the Performance Counters
1STARTPC0x0WStart Performance Counters
Starts the Performance Counters
0FLUSH0x0WFlush
Clears Cached Data
0x0
W
FLUSH
silabs.com | Building a more connected world.Rev. 0.4 | 90
Page 91
6.5.4.8 ICACHE_LPMODE - Low Power Mode
OffsetBit Position
Reference Manual
MSC - Memory System Controller
0x01C
Reset
Access
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0x2
RW
0x3
RW
Name
NESTFACTOR
LPLEVEL
BitNameResetAccessDescription
31:8ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
7:4NESTFACTOR0x2RWLow Power Nest Factor
Parameter used in the advanced buffering mode to control its estimation when a branch access is likely to be accssed in
the near future. In general, a higher number will improve performance in code with deeply nested loops.
3:2ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
1:0LPLEVEL0x3RWLow Power Level
0
Controls the low-power level of the cache. In general, the default setting is best for most applications.
ValueModeDescription
0BASICBase instruction cache functionality
1ADVANCEDAdvanced buffering mode, where the cache uses the fetch pat-
tern to predict highly accessed data and store it in low-energy
memory
3MINACTIVITYMinimum activity mode, which allows the cache to minimize ac-
tivity in logic that it predicts has a low probability being used.
This mode can introduce wait-states into the instruction fetch
stream when the cache exits one of its low-activity states. The
number of wait-states introduced is small, but users running with
0-wait-state memory and wishing to reduce the variability that
the cache might introduce with additional wait-states may wish
to lower the cache low-power level. Note, this mode includes the
advanced buffering mode functionality.
silabs.com | Building a more connected world.Rev. 0.4 | 91
Page 92
6.5.4.9 ICACHE_IF - Interrupt Flag
OffsetBit Position
Reference Manual
MSC - Memory System Controller
0x020
Reset
Access
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0x0
RW
0x0
0x0
RWRWRW
Name
RAMERROR
MISSOF
AHITOF
BitNameResetAccessDescription
31:9ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
8RAMERROR0x0RWRAM error Interrupt Flag
RAM parity error detected
7:3ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
2AHITOF0x0RWAdvanced Hit Overflow Interrupt Flag
Advanced hit performance counter has overflowed
0
0x0
HITOF
1MISSOF0x0RWMiss Overflow Interrupt Flag
Miss performance counter has overflowed
0HITOF0x0RWHit Overflow Interrupt Flag
Hit performance counter has overflowed
silabs.com | Building a more connected world.Rev. 0.4 | 92
Page 93
6.5.4.10 ICACHE_IEN - Interrupt Enable
OffsetBit Position
Reference Manual
MSC - Memory System Controller
0x024
Reset
Access
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0x0
RW
0x0
0x0
RWRWRW
Name
RAMERRORIEN
MISSOF
AHITOF
BitNameResetAccessDescription
31:9ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
8RAMERRORIEN0x0RWRAM error Interrupt Enable
Enable RAMERROR interrupt
7:3ReservedTo ensure compatibility with future devices, always write bits to 0. More information in 1.2 Con-
ventions
2AHITOF0x0RWAdvanced Hit Overflow Interrupt Enable
Enable AHITOF interrupt
0
0x0
HITOF
1MISSOF0x0RWMiss Overflow Interrupt Enable
Enable MISSOF interrupt
0HITOF0x0RWHit Overflow Interrupt Enable
Enable HITOF interrupt
6.6 SYSCFG - System Configuration
The SYSCFG block is used to configure SRAM. It also contains some interrupt flags for software use. The system has the following
major SRAM blocks:
• DMEM0 - Primary system data memory (RAM)
• FRCRAM - Frame Rate Controller SRAM
• SEQRAM - Sequencer SRAM
• DEMODRAM - Demodulator SRAM
6.6.1 Ram Retention
DMEM0 is broken into 16 KB banks. By default all banks are retained in EM2/EM3. Sleep mode current can be significantly reduced by
fully powering down banks that do not need to be retained. To select the amount of RAM to be powered down in EM2/EM3, set RAMRETNCTRL in SYSCFG_DMEM0RETCTRL to the desired value.
FRCRAM and SEQRAM may be powered down in EM2/EM3 if not required. To disable retention, set FRCRAMRETNCTRL or SEQRAMRETNCTRL in SYSCFG_RADIORAMRETCTRL.
silabs.com | Building a more connected world.Rev. 0.4 | 93
Page 94
Reference Manual
MSC - Memory System Controller
6.6.2 ECC
DMEM0, FRCRAM, and SEQRAM support one bit correction and two bit detection ECC. To enable error detection for DMEM0, set
RAMECCCHKEN in SYSCFG_DMEM0ECCCTRL. To enable error detection for FRCRAM and SEQRAM, set FRCRAMECCCHKEN
and SEQRAMECCCHKEN in SYSCFG_RADIOECCCTRL. To enable auto-correction of one bit errors in DMEM0, set RAMECCEWEN
in SYSCFG_DMEM0ECCCTRL. To enable auto-correction of one bit errors in FRCRAM and SEQRAM, set FRCRAMECCEWEN and
SEQRAMECCEWEN in SYSCFG_RADIOECCCTRL.
When ECC error events are detected, the corresponding flags in SYSCFG_IF are set. When a flag is set, an interrupt will be triggered if
the corresponding interrupt enable bit is set in SYSCFG_IEN.
When an error occurs, the address of the detected error is written to SYSCFG_DMEM0ECCADDR, SYSCFG_FRCRAMECCADDR, or
SYSCF_SEQRAMECCERR depending on the source of the error.
The recommend procedure for initializing ECC RAM is to first enable ECC, then write zeros to all locations. This will clear the RAM and
initialize the syndrome. If the ECC RAM is not written as described, then any reads to uninitialized RAM locations will result in an ECC
error.
Note: The RAM ECC feature must be enabled to achieve good long term reliability. The long term reliability of the RAM is only specified
with ECC enabled.
6.6.3 RAM Wait-states
The Cortex-M33 may be run faster than the RAM is capable of responding. In this case a RAM wait state must be enabled to ensure
that the RAM has adequate response time. To enable wait states, set RAMWSEN in SYSCFG_DMEM0RAMCTRL or SEQRAMWSEN/
FRCRAMWSEN in SYSCFG_RADIORAMCTRL.
To ensure the RAM is never run in an invalid region, the wait-state value should be changed before the clock frequency when increasing frequency, and after the clock frequency when decreasing clock frequency. See the 'General Operating Conditions' table in the device Data Sheet for details on the maximum allowed frequency for each wait-state setting.
6.6.4 RAM Prefetch
DEMEM0, FRCRAM, and SEQRAM support a one word pre-fetch buffer to improve performance of sequential accesses when waitstates are used. When enabled, the RAM wait-state occurs on only the first read of a sequential access.
When reading non-sequential data, the prefetch provides no benefit. Enabling the RAM Cache is recommended when prefetch is enabled to limit the power consumption impact of the prefetch.
To enable prefetch, set RAMPREFETCHEN in SYSCFG_DRAM0MEMCTRL, or FRCRAMPREFETCHEN/SEQRAMPREFETCHEN in
SYSCFG_RADIORAMCTRL.
6.6.5 RAM Cache
DMEM0, FRCRAM, SEQRAM, and DEMODRAM have an optional 4 word cache which reduces the power consumed by sequential
reads from RAM. The cache is enabled by setting RAMCACHEEN in SYSCFG_DMEM0RAMCTRL, or DEMODRAMCACHEEN/
FRCRAMCACHEEN/SEQRAMCACHEEN in SYSCFG_RADIORAMCTRL. When enabled a read from RAM will either be returned from
the cache (HIT) or cause the cache to be updated with the contents of the 4 word cache-line the target word is on.
Since reading data from the cache consumes significantly less power than reading from the main array, the cache dramatically reduces
the power consumption of sequential reads. However, in the case of random reads where all access are cache misses, use of the RAM
cache will consume slightly more power due to the extra wide reads.
The RAM cache is independent of the prefetch and has no effect on the speed or throughput of RAM accesses.
6.6.6 Software Interrupts
The SYSCFG block also provides some software interrupts that can be used to communicate between software tasks. To trigger a software interrupt set the corresponding bit in SYSCFG_IF.
6.6.7 Bus faults
By default, two bit ECC errors and reads to unmapped addresses trigger a BusFault. These bus fault sources can be disabled by clearing RAMECCERRFAULTEN and ADDRFAULTEN in SYSCFG_CTRL.
silabs.com | Building a more connected world.Rev. 0.4 | 94
Page 95
MSC - Memory System Controller
6.6.8 Register Map
The offset register address is relative to the registers base address.
OffsetNameTypeDescription
0x000SYSCFG_IFRWH INTFLAGInterrupt Flag Register
0x004SYSCFG_IENRWInterrupt Enable Register
0x010SYSCFG_CHIPREVHWRWHHardwired Chip Rev values
0x014SYSCFG_CHIPREVRWPart Family and Revision values
0x200SYSCFG_CTRLRWMemory System Control Register
0x208SYSCFG_DMEM0RETNCTRLRWDMEM retention Control Register