DA14531 Datasheet 3v1
DA14531 Datasheet 3v1
DA14531 Datasheet 3v1
General Description
The DA14531 is an ultra-low power SoC integrating a 2.4 GHz transceiver and an Arm® Cortex-M0+
microcontroller with a RAM of 48 kB and a One-Time Programmable (OTP) memory of 32 kB. It can
be used as a standalone application processor or as a data pump in hosted systems.
The radio transceiver, the baseband processor, and the qualified Bluetooth® low energy stack is fully
compliant with the Bluetooth® Low Energy 5.1 standard.
The DA14531 has dedicated hardware for the Link Layer implementation of BLE and interface
controllers for enhanced connectivity capabilities.
The BLE firmware includes the L2CAP service layer protocols, Security Manager (SM), Attribute
Protocol (ATT), the Generic Attribute Profile (GATT), and the Generic Access Profile (GAP). All
profiles published by the Bluetooth® SIG as well as custom profiles are supported.
The device is suitable for disposables, wireless sensor nodes, beacons, proximity tags and trackers,
smart HID devices (stylus, keyboards, mice, and trackpads), toys, and medical and industrial
applications.
Key Features
■ Compatible with Bluetooth v5.1, ETSI EN 300 ■ Clocks
328 and EN 300 440 Class 2 (Europe), FCC □ 32 MHz crystal and 32 MHz RC osc.
CFR47 Part 15 (US) and ARIB STD-T66
(Japan) □ 32 kHz crystal and 32/512 kHz RC osc.
■ Supports up to three BLE connections □ 15 kHz RCX as crystal replacement
■ Typical cold boot to radio active 35 ms ■ Programmable Reset Circuitry
■ Processing power ■ 2× General purpose Timers with capture and
PWM capabilities
□ 16 MHz 32-bit Arm® Cortex-M0+ with
SWD interface ■ Digital interfaces
□ 18300 EEMBC IoTMark-BLE® score □ GPIOs: 6 (WLCSP17), 12 (FCGQFN24)
□ Dedicated Link Layer and AES-128 □ 2× UARTs (one with flow control)
Encryption Processor □ SPI Master/Slave up to 32 MHz (Master)
□ Software-based True Random Number □ I2C bus at 100 kHz and 400 kHz
Generator (TRNG) □ 3-axis capable Quadrature Decoder
■ Memories □ Keyboard controller
□ 32 kB One-Time-Programmable (OTP) ■ Analog interfaces
□ 48 kB Retainable System RAM □ 4-channel 10-bit ADC
□ 144 kB ROM ■ Radio transceiver
■ Power management □ Fully integrated 2.4 GHz CMOS
□ Integrated Buck/Boost DCDC converter transceiver
□ Buck: 1.1 V ≤ VBAT_HIGH ≤ 3.3 V (min 1.8V if □ Single wire antenna
OTP read needed) □ TX: 3.5 mA, RX: 2.2 mA (system currents
□ Boost: 1.1 V ≤ VBAT_LOW ≤ 1.65 V with DC-DC, VBAT_HIGH =3 V and 0 dBm)
□ Clock-less hibernation mode: Buck 270 □ Programmable transmit output power from
nA, Boost 240 nA -19.5 dBm to +2.5 dBm
□ Built-in temperature sensor for die □ -94 dBm receiver sensitivity
temperature monitoring ■ Packages:
□ WLCSP 17 balls, 1.7 × 2.05, 0.5 mm pitch
□ FCGQFN 24 pins, 2.2 × 3, 0.4 mm pitch
Applications
■ Medical applications
■ Disposables
■ Beacons
■ Proximity tags and trackers
■ Wireless sensor nodes
□ Fitness trackers
□ Consumer health
■ Smartwatches
■ Human interface devices (HID)
□ Stylus pens
□ Keyboards
□ Mouse devices
□ Trackpads
■ Toys
■ Industrial appliances
Key Benefits
■ Lowest power consumption
■ Smallest system size
■ Lowest system cost
System Diagram
Contents
General Description ............................................................................................................................ 1
Key Features ........................................................................................................................................ 1
Applications ......................................................................................................................................... 2
Key Benefits ......................................................................................................................................... 2
System Diagram .................................................................................................................................. 2
Contents ............................................................................................................................................... 3
Figures .................................................................................................................................................. 9
Tables ................................................................................................................................................. 10
1 Block Diagram ............................................................................................................................. 19
2 Packages and Pinout .................................................................................................................. 20
2.1 WLCSP17 ........................................................................................................................... 20
2.2 FCGQFN24 ......................................................................................................................... 24
3 Specifications .............................................................................................................................. 28
3.1 Absolute Maximum Ratings ................................................................................................ 30
3.2 Recommended Operating Conditions ................................................................................. 30
3.3 DC Characteristics .............................................................................................................. 31
3.4 Timing Characteristics......................................................................................................... 33
3.5 RCX Oscillator ..................................................................................................................... 33
3.6 XTAL32MHz Oscillator ........................................................................................................ 34
3.7 XTAL32kHz Oscillator ......................................................................................................... 34
3.8 RC32MHz Oscillator ............................................................................................................ 35
3.9 DC-DC Converter ................................................................................................................ 35
3.10 LDO_LOW Characteristics .................................................................................................. 36
3.11 Digital I/O Characteristics.................................................................................................... 37
3.12 Power On Reset .................................................................................................................. 39
3.13 GP ADC .............................................................................................................................. 39
3.14 Temperature Sensor ........................................................................................................... 41
3.15 Radio ................................................................................................................................... 41
4 System Overview ......................................................................................................................... 46
4.1 Internal Blocks..................................................................................................................... 46
4.2 Power Management Unit..................................................................................................... 47
4.2.1 Introduction .......................................................................................................... 47
4.2.2 Architecture .......................................................................................................... 47
4.2.2.1 Digital Power Domains .................................................................... 49
4.2.2.2 Power Modes ................................................................................... 50
4.2.2.3 VDD Level in Hibernation ................................................................ 53
4.2.2.4 Retainable Registers ....................................................................... 53
4.2.3 Programming ....................................................................................................... 53
4.2.3.1 Buck Configuration .......................................................................... 53
4.2.3.2 Boost Configuration ......................................................................... 54
4.2.3.3 Bypass Configuration....................................................................... 55
4.3 HW FSM (Power-up, Wake-up, and Go-to-Sleep) .............................................................. 56
Figures
Figure 1: System Diagram ..................................................................................................................... 2
Figure 2: DA14531 Block Diagram ...................................................................................................... 19
Figure 3: WLCSP17 Ball Assignment (Top View) ............................................................................... 20
Figure 4: FCGQFN24 Pin Assignment (Top View) ............................................................................. 24
Figure 5: Boost configuration system diagram .................................................................................... 29
Figure 6: Buck configuration system diagram ..................................................................................... 29
Figure 7: Power Management Unit: Buck Configuration ..................................................................... 48
Figure 8: Power Management Unit: Boost Configuration .................................................................... 48
Figure 9: Power Management Unit: Bypass Configuration ................................................................. 49
Figure 10: Digital Power Domains ....................................................................................................... 49
Figure 11: Power-Up/Wake-Up/Sleep FSM Diagram .......................................................................... 56
Figure 12: Power-up (Buck)................................................................................................................. 57
Figure 13: Wake-Up from hibernation (Buck) ...................................................................................... 57
Figure 14: Wake-Up (Buck) ................................................................................................................. 58
Figure 15: Power-Up (Boost) ............................................................................................................... 58
Figure 16: Wake-Up from hibernation (Boost)..................................................................................... 59
Figure 17: Wake-Up from extended/deep sleep (Boost) ..................................................................... 59
Figure 18: Go-to-Sleep and Bandgap Refresh .................................................................................... 59
Figure 19: OTP Layout Scheme .......................................................................................................... 60
Figure 20: BootROM Sequence .......................................................................................................... 65
Figure 21: Reset Block Diagram ......................................................................................................... 67
Figure 22: POR Timing Diagram ......................................................................................................... 70
Figure 23: Arm Cortex-M0+ Block Diagram ........................................................................................ 71
Figure 24: AMBA Bus Architecture and Power Domains .................................................................... 75
Figure 25: Memory Controller Block Diagram ..................................................................................... 79
Figure 26: Clock Tree Diagram ........................................................................................................... 81
Figure 27: Crystal Oscillator Circuits ................................................................................................... 83
Figure 28: XTAL32MHz Oscillator Frequency Trimming ..................................................................... 84
Figure 29: Automated Mechanism for XTAL32M Trim and Settling .................................................... 85
Figure 30: OTP Controller Block Diagram ........................................................................................... 87
Figure 31: DMA Controller Block Diagram .......................................................................................... 90
Figure 32: DMA Channel Diagram ...................................................................................................... 92
Figure 33: I2C Controller Block Diagram ............................................................................................. 95
Figure 34: Master/Slave and Transmitter/Receiver Relationships ...................................................... 96
Figure 35: Data Transfer on the I2C Bus ............................................................................................ 97
Figure 36: START and STOP Conditions ............................................................................................ 98
Figure 37: 7-bit Address Format .......................................................................................................... 99
Figure 38: 10-bit Address Format ........................................................................................................ 99
Figure 39: Master-Transmitter Protocol ............................................................................................. 100
Figure 40: Master-Receiver Protocol ................................................................................................. 101
Figure 41: START BYTE Transfer ..................................................................................................... 101
Figure 42: Multiple Master Arbitration ............................................................................................... 102
Figure 43: Multiple Master Clock Synchronization ............................................................................ 103
Figure 44: UART Block Diagram ....................................................................................................... 105
Figure 45: Serial Data Format ........................................................................................................... 106
Figure 46: Receiver Serial Data Sampling Points ............................................................................. 106
Figure 47: Flowchart of Interrupt Generation for Programmable THRE Interrupt Mode ................... 109
Figure 48: Flowchart of Interrupt Generation When Not in Programmable THRE Interrupt Mode ... 110
Figure 49: SPI Block Diagram ........................................................................................................... 112
Figure 50: SPI Slave Mode Timing (CPOL = 0, CPHA = 0) .............................................................. 113
Figure 51: Quadrature Decoder Block Diagram ................................................................................ 116
Figure 52: Moving Forward on Axis X ............................................................................................... 117
Datasheet Revision 3.1 09-Jul-2020
Tables
Table 1: DA14531 WLCSP17 Ball Description.................................................................................... 21
Table 2: DA14531 FCGQFN24 Pin Description .................................................................................. 24
Table 3: Absolute Maximum Ratings ................................................................................................... 30
Table 4: Recommended Operating Conditions ................................................................................... 30
Table 5: DC Characteristics................................................................................................................. 31
Table 6: Timing Characteristics ........................................................................................................... 33
Table 7: RCX Oscillator - Timing Characteristics ................................................................................ 33
Table 8: XTAL32MHz Oscillator - Recommended Operating Conditions ........................................... 34
Table 9: XTAL oscillator 32kHz - Recommended Operating Conditions ............................................ 34
Table 10: XTAL oscillator 32kHz - Timing Characteristics .................................................................. 35
Table 11: RC32MHz Oscillaor - Timing Characteristics ...................................................................... 35
Table 12: DCDC Converter - Recommended Operating Conditions................................................... 35
Table 13: DCDC Converter - DC Characteristics ................................................................................ 36
Table 14: LDO_LOW - Recommended Operating Conditions ............................................................ 36
Table 15: LDO_LOW - DC Characteristics.......................................................................................... 37
Table 16: Digital Pad - Recommended Operating Conditions ............................................................ 37
Table 17: Digital Pad - DC Characteristics .......................................................................................... 38
Table 18: Digital Pad with LPF - DC Characteristics ........................................................................... 38
Table 19: Digital Pad with LPF - Recommended Operating Conditions ............................................. 39
Datasheet Revision 3.1 09-Jul-2020
1 Block Diagram
24 April 2012
Temperature
XTAL XTAL (BUCK/BOOST) 32/512
32 MHz
Sensor
32.768 kHz 32 MHz kHz
CORE LDO LDO LDO
LDO
CLAMP LDO
RET SYS SYS
SYS POR HIGH
RF
POR LOW
SWD (JTAG) Bluetooth 5.1 Core
Radio
4-CH DMA LINK LAYER
AES-128 Transceiver
HARDWARE
SysRAM1
16 KB
Memory Controller
APB bridge
SysRAM2
12 KB
SysRAM3
KEYBOARD CTRL
QUAD DECODER
20 KB TIMERS
WAKEUP CTRL
WAKEUP CTRL
Management (PMU)
CLOCK-LESS
CLOCKED
GP ADC
POWER/CLOCK
UART2
Timer 0
UART
Real Time Clock
SPI
I2C
1xPWM
OTP DMA
Timer 1
FIFO
FIFO
FIFO
FIFO
32 KB OTPC Capture
Timer 2
ROM 6xPWM GPIO MULTIPLEXING
144 KB
P0_4
A RFIOP RFIOM
XTAL32km
P0_3
B XTAL32kp
D XTAL32Mp P0_5
RST
F GND_DCDC
P0_0
G VBAT_LOW LX BAT_HIGH
(Top view)
F4 P0_0 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power-
down.
E5 P0_1 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
C5 P0_2 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
B4 P0_3 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down. Check GP_DATA_REG[P03_P04_FILT_DIS] for
correct pad filter settings.
A5 P0_4 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down. Check GP_DATA_REG[P03_P04_FILT_DIS] for
correct pad filter settings.
D4 P0_5 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
Debug Interface
C5 SWCLK DIO I-PD INPUT JTAG clock signal. Mapped on P0_2 (by
default).
Clocks
B4 XTAL32kp AI INPUT. Crystal input for the 32.768 kHz XTAL. Mapped
on P0_3.
Quadrature Decoder
SDA DIO/DIOD INPUT/OUTPUT. I2C bus data with open drain port.
Mapped on Px ports. The mapped Px pin is
automatically configured with a pull-up resistor
(25KOhm) when pin x is mapped to the I2C_SDA PID
function.
SCL DIO/DIOD INPUT/OUTPUT. I2C bus Clock with open drain port.
In open drain mode, SCL is monitored to support bit
stretching by a slave. Mapped on Px ports. The
mapped Px pin is automatically configured with a pull-
up resistor (25KOhm) when pin x is mapped to the
I2C_SCL PID function.
UART interface
ADC IO Channels
Radio Transceiver
Miscellaneous
Note 1 Data input only. MOSI in SPI slave mode and MISO in SPI master mode.
Note 2 Data output only. MISO in SPI slave mode and MOSI in SPI master mode.
Note 3 The differences between Type A and Type B GPIO pads are presented in Types of GPIO Pads.
2.2 FCGQFN24
10 P0_0 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
11 P0_1 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
12 P0_2 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
13 P0_3 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down. Check GP_DATA_REG[P03_P04_FILT_DIS] for
correct pad filter settings.
14 P0_4 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down. Check GP_DATA_REG[P03_P04_FILT_DIS] for
correct pad filter settings.
24 P0_5 DIO (Type B) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
22 P0_6 DIO (Type A) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
15 P0_7 DIO (Type A) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
17 P0_8 DIO (Type A) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
16 P0_9 DIO (Type A) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
9 P0_10 DIO (Type A) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
8 P0_11 DIO (Type A) I-PD INPUT/OUTPUT with selectable pull up/down resistors.
Pull-down enabled during and after reset. General
purpose I/O port bit or alternate function nodes.
Contains state retention mechanism during power
down.
Debug Interface
12 SWCLK DIO I-PD INPUT JTAG clock signal. Mapped on P0_2 (by
default).
Clocks
13 XTAL32kp AI INPUT. Crystal input for the 32.768 kHz XTAL. Mapped
on P0_3.
Quadrature Decoder
SDA DIO/DIOD INPUT/OUTPUT. I2C bus Data with open drain port.
Mapped on Px ports. The mapped Px pin is
automatically configured with a pull-up resistor
(25KOhm) when pin x is mapped to the I2C_SDA PID
function.
SCL DIO/DIOD INPUT/OUTPUT. I2C bus Clock with open drain port.
In open drain mode, SCL is monitored to support bit
stretching by a slave. Mapped on Px ports. The
mapped Px pin is automatically configured with a pull-
up resistor (25KOhm) when pin x is mapped to the
I2C_SCL PID function.
UART Interface
ADC IO Channels
Radio Transceiver
Miscellaneous
Note 1 Data input only. MOSI in SPI slave mode and MISO in SPI master mode.
Note 2 Data output only. MISO in SPI slave mode and MOSI in SPI master mode.
Note 3 The differences between Type A and Type B GPIO pads are presented in Types of GPIO Pads.
3 Specifications
All MIN/MAX specification limits are guaranteed by design, production testing and/or statistical
characterization. Typical values are based on characterization results at default measurement
conditions and are informative only.
Default measurement conditions (unless otherwise specified): VBAT_HIGH = 3.0 V (buck mode),
VBAT_LOW = 1.5 V (boost mode), TA = 25 oC. All radio measurements are performed with standard RF
measurement equipment providing a source/load impedance of 50 Ω. All listed currents involving any
radio operation have been conducted without the external CLC filter.
Due to the voltage dependent capacitance of MLCC capacitors the specified capacitor values at
VBAT_HIGH and VBAT_LOW are effective capacitances.
L1
C1 2. 2u C2 BT1
1u 10u 1. 5V
G3
G5
G1
A T1
Lx
2
VBAT I G
3. 3n
VBAT L
A1
RI p
A3 1 3
0 0 4 RI m 1. 8p 1. 8p
0 1 E5 0 0 RST
0 2 C5 0 1
0 5 D4 0 2 S CL D2
0 5 S DI TAL32 p
U1
3
2 4
1
32. 0000
E1
TAL32 m
1
DA14531
1 ball LCS
A5 0 4
0 4 TAL32km
2
32. 68
B4 0 3
0 3 TAL32kp
G D DCDC
G DR1
G DR2
VSS
wlcsp1 1. x2. 0
E3
C3
C1
L1
C1 2. 2u C2
BT1
10u 1u
3. 0V
6
A T1
Lx
2
VBAT I G
3. 3n
VBAT L
1
RI p
18 1 3
0 0 10 RI m 1. 8p 1. 8p
0 1 11 0 0 RST
0 2 12 0 1
0 2 S CL
U1
0 5 24 3
0 5 TAL32 p
3
2 4
1
32. 0000
0 6 22
0 6
DA14531 TAL32 m
4
1
0
0 8
15
1 0 24 pin CG
0 16 0 8
0 14 0 4
0 4 TAL32km
2
0 10 32. 68
0 11 8 0 10 S DI 13 0 3
0 11 0 3 TAL32kp
G D DCDC
G DR 1
G DR 2
G D
VSS
qf n24 2. 2x3. 0
2
20
21
23
VBAT_HIGH_OT Voltage range for OTP Required temperature for 2.25 3.3 V
P_Program programming. programming: -20oC to 85oC
3.3 DC Characteristics
Table 5: DC Characteristics
ΔfRC RCX oscillator frequency drift 100ms time slot 100 500 ppm
ΔfRC ΔT_1 Temperature dependency temperature range -40°C to -125 125 ppm/d
85°C, RC BIAS at eg
preferred value
ΔfRC ΔT_2 Temperature dependency temperature range -40°C to -200 200 ppm/d
105°C, RC BIAS at eg
preferred value
Note 1 Select a crystal which can handle a drive level of at least this specification.
Note 2 Using the internal varicaps a wide range of crystals can be trimmed to the required tolerance.
Note 3 Maximum allowed frequency tolerance for compensation by the internal varicap trimming mechanism.
C0 shunt capacitance 1 2 pF
Note 1 Select a crystal that can handle a drive level of at least this specification.
tSTA_XTAL crystal oscillator startup time Typical application, time until 100 300 ms
1000 clocks are detected.
Note 1 Digital pad characteristics are equal to the standard GPIO pads unless overruled or added in this
table.
Note 2 P0_3 and P0_4 are type B pads with selectable filter via GP_DATA_REG[P03_P04_FILT_DIS], C IN is
equal to a Type A pad both with filter enabled or disabled.
3.13 GP ADC
Table 22: GP ADC - Recommended Operating Conditions
EG_COR ADC gain error after software Trimmed bandgap & Gain -1 1 %
correction (single-ended) Error + Offset correction
applied
EG_DIF_COR ADC gain error after software Trimmed bandgap & Gain -1 1 %
correction (differential) Error + Offset correction
applied
EG_ATTNX ADC gain error after software Trimmed bandgap & GPADC -4 4 %
correction (including Gain Error + Offset
attenuator) correction applied
EOFS_ATTNX ADC offset error after Trimmed bandgap, chopping -16 16 LSB
software correction (including enabled & GPADC Gain
attenuator) Error + Offset correction
applied
EG_OFFSH ADC gain error after software Trimmed bandgap & Offset -1 1 %
correction (including offset Shifter Gain Error + Offset
shifter) correction applied
Note 1 INL is the deviation of a code from a straight line passing through the actual endpoints of the transfer
curve.
TSENSE_ACC_ Applies to the CSP package. TAMBIENT = 25°C, VBAT_LOW = TBD TBD °C
OTP_CSP Absolute accuracy of 1.1 V
temperature sensor using
calibration value from OTP
(single point calibration at
25°C) .
Formula: TX = 25°C + (ADCX
- ADCOTP_CAL_25C) / (TCSENSE
* 64) (64 is used to correct
16b to 10b ADC values)
TCSENSE Temperature coefficient of reading via GP_ADC (10bit 1.15 1.45 1.75 LSB °
the internal temperature result) C
sensor
3.15 Radio
Table 26: BLE 1Mb/s specifications - Recommended Operating Conditions
CIR4 carrier to interferer ratio |n| ≥ 4 (any other BLE -41.5 -27 dB
channel); interferer @ f1 = f0
+ n*1 MHz;
Note 1
ACP2M_EOC adjacent channel power level Extreme Operating -53 -47 dBm
Conditions; fOFS = 2 MHz; -40
°C ≤ TA ≤ +85 °C
Note 1
ACP3M_EOC adjacent channel power level Extreme Operating -57 -47 dBm
Conditions; fOFS ≥ 3 ; -40
°C ≤ TA ≤ +85 °C
Note 1
4 System Overview
Wake-Up Timer. This timer captures external events and it can be used on any of the GPIO ports as
a wake-up trigger based on a programmable number of external events.
Quadrature Decoder. This block decodes the pulse trains from a rotary encoder to provide the step
and the direction of a movement of an external device. Three axes (X, Y, and Z) are supported. The
block also supports an edge counting mode which enables counting positive or negative edges on
the selected GPIOs.
Keyboard Controller. This circuit enables the reading and debouncing of a programmable number
of GPIOs and generates an interrupt upon a configurable action.
AHB/APB Bus. This block implements the AMBA Lite version of the AHB and APB specifications.
Power Management. This sophisticated power management circuit is equipped with a Buck/Boost
DC-DC converter and several low-dropout regulators (LDOs) that can be turned on/off via software.
A more detailed description of each component of the DA14531 is presented in the following
sections.
4.2.1 Introduction
The DA14531 has an integrated power management unit (PMU) which comprises a VDD_Clamp, a
POR circuitry, a DCDC convertor, and various LDOs. The system diagram of the integrated PMU is
shown in Figure 7.
Features
● Boost, Buck, and DCDC bypass configurations
● Single inductance DCDC converter configured for Boost or Buck configuration
● Programmable DCDC converter outputs
● Active and sleep mode LDOs
● Low BOM and use of small external components
4.2.2 Architecture
The PMU integrates two externally decoupled power rails: VBAT_HIGH and VBAT_LOW , and one internal
VDD power rail. There are three main power configurations: Buck, Boost, and Bypass. The integrated
PMU configures itself automatically to the appropriate mode depending on how the battery is initially
connected in the application.
● VBAT_HIGH: voltage range of 1.8 V - 3.3 V. This power rail is used for the blocks which require a
higher supply voltage. The OTP and the GPIOs are connected to this power rail. VBAT_HIGH is
protected by the POR circuit POR_HIGH, which generates a POR when the voltage drops below
the threshold voltage.
● VBAT_LOW: the main system supply and most internal blocks are powered from this rail. Its
functional range is from 1.1 V to 3.3 V. When used in Boost configuration, its default voltage
range is from 1.1 V to 1.65 V, and within this range the DCDC converter can provide a supply at
VBAT_HIGH in the range of 1.8 V to 3.0 V (see section 4.2.3.2). VBAT_LOW is protected with the POR
circuit POR_LOW which generates a HW reset when the voltage drops below the threshold
voltage.
● The internal VDD power rail supplies the digital power domains (refer to section 4.2.2.1 for the
details)
The VDD_Clamp and RC32k blocks are supplied by the highest of VBAT_HIGH and VBAT_LOW .
In Buck configuration (Figure 7), the battery is connected to VBAT_HIGH. The voltage on VBAT_LOW is
generated from VBAT_HIGH. In Boost configuration (Figure 8), the battery is connected to VBAT_LOW . The
voltage on VBAT_HIGH is generated from VBAT_LOW . The different power modes of the system are
explained in section 4.2.2.2.
BATTERY
VBAT_HL_RES
VBAT_HL_SW
Coin Cell DCDC
3V CONVERTER POR
HIGH
ret mode <1.66V
Nx GPIO
LX DCDC PORTS
OTP VDD Clamp VDD
control LDO
Memory POR_VDD LOW
>1.8V RC32kHz
FB
POR
Initial VDD
250Ω
Temp
LOW RC 32M RCX
sensor
<1.00V
ret mode
PD_SLEEP
PD_TIM
Radio
RAM1 12KB
RAM2 20KB
RAM3 16KB
DIG
32kHz XTAL 32k RF Blocks RF Blocks RF Blocks GP ADC XTAL 32M 32MHz
32k_p XTAL2
DCORE RADIO
Decap DCDC
CONVERTER POR
HIGH
FB ret mode <1.66V
Nx GPIO
LX DCDC PORTS
OTP VDD Clamp VDD
control LDO
Memory POR_VDD LOW
>1.8V RC32kHz
POR
Initial VDD
250Ω
Temp
LOW RC 32M RCX
sensor
<1.00V
Silver Oxide
Bandgap LDO CORE
1.55V
VDD 0.75V ... 0.9V
LDO RF LDO RF LDO RF LDO GPADC LDO XTAL
PD_SLEEP
PD_TIM
Radio
RAM1 12KB
RAM2 20KB
RAM3 16KB
DIG
DCORE RADIO
In bypass configuration (Figure 9), the DCDC is bypassed and the battery is connected to both
VBAT_LOW and VBAT_HIGH. In this mode an external inductor is omitted resulting to lower BOM. GPIOs
supply follows the battery voltage in this configuration. The minimum cold boot voltage is 1.8V. After
cold boot and providing that no OTP or GPIO (at a specific voltage level) is needed, POR HIGH can
be disabled and then VBAT_BYPASS can go down to 1.1V.
VBAT_HL_RES
VBAT_HL_SW
DCDC
CONVERTER POR POR
Temp
HIGH HIGH
sensor
>1.62V <1.66V
ret mode Nx GPIO
LX DCDC PORTS
VBAT_BYPASS control
OTP VDD Clamp LDO
LDO VDD
Memory POR_VDD LOW
(1.1 ... 3.3V) >1.8V RC32kHz
LOW
RET
FB
POR POR
Initial VDD
250Ω
Temp VDD
LOW RC 32M LOW RCX RC 32M RCX
sensor
>0.95V <1.00V
0.9V 0.9V
0.9V 0.9V
0.9V 0.9V
0.9V 0.9V
32k_n XTAL1
PD_RAD
AON incl PMU
PD_SYS
PD_SLEEP
PD_TIM
ADPLL
LNA/Mix/
Radio
RAM2 20KB
RAM1 12KB
DIG
XTAL 32k RF Blocks RF Blocks
TIA/IFF/ RF Blocks GP ADC XTAL 32M 32MHz
32k_p DIV Isup=50uA XTAL2
ADC/DACs
DCORE RADIO
XTAL
32 MHz
32 KHz
POR HIGH XTAL BUCK/ LDO LDO
RC
32.768 RF RC
POR LOW 32 MHz BOOST SYS RET LDO
kHz
Radio
Arm Cortex M0+
BLE TIMER
Tranceiver
CLOCK Digital
GEN
BLE 5.1 MAC PHY
RFCU
OTP
CLOCKED
sensor
WAKEUP
WAKEUP
32 kB QuadRature
TIMER1 SPI
Decoder (x3)
ROM General Purpose
ROM Ctrl RTC I2C Keyboard Scanner
144 kB Registers
The list of blocks residing in each one of the digital power domains is presented in Table 30.
Table 31: Power Modes, Digital Power Domains, Clocks, and Wake-up triggers
Power Mode Digital Power LDOs, DCDC Converter, and Clock RAM Wake Up from
Domains VDD Level Availability
Active or Sleep PD_AON = ON VDD = 0.9 V SysRAM1 = ON (Application)
(WFI) PD_SLP = ON DCDC = ON (Buck or Boost) SysRAM2 = optionally retained
PD_SYS = ON LDO_LOW = OFF SysRAM3 = ON (Stack Data)
PD_TIM = LDO_CORE = ON, Active (0.9 All
OPTIONAL V)
PD_RAD = OPT VDD_Clamp = OFF
LDO_RADIO = Programmable
Extended Sleep PD_AON = ON VDD = 0.75 V SysRAMx =optionally retained ● RTC alarm
(with or without PD_SLP = ON DCDC = OFF (typically only SysRAM1 is ● Timer1
OTP) retained)
PD_SYS = OFF LDO_LOW = ON, in Buck mode. ● BLE sleep timer
RCX or
PD_TIM = LDO_CORE = ON, in retain XTAL32K
OPTIONAL mode (0.75 V)
PD_RAD = OFF VDD_Clamp = OFF
LDO_RADIO = OFF
Deep Sleep PD_AON = ON VDD = 0.75 V SysRAMx = optionally retained ● from any GPIOs
PD_SLP = ON DCDC = OFF (Typically OFF) ● RTC alarm
PD_SYS = OFF LDO_LOW = ON, in Buck mode. ● Timer1
RCX or
PD_TIM = LDO_CORE = ON, in retain XTAL32K
OPTIONAL mode (0.75 V)
PD_RAD = OFF VDD_Clamp = OFF
LDO_RADIO = OFF
Hibernation PD_AON = ON VDD = ~0.75 V SysRAMx =optionally retained Wake up from P0_1, P0_2,
PD_SLP = OFF DCDC = OFF P0_3, P0_4, P0_5
PD_SYS = OFF LDO_LOW = OFF
No Clocks
PD_TIM = OFF LDO_CORE = OFF
PD_RAD = OFF VDD_Clamp = ~0.75 V
LDO_RADIO = OFF
Table 32 shows the typical rail voltages and their drivers present during various PMU modes.
4.2.3 Programming
● Hibernation Mode
In hibernation mode the VBAT_LOW rail is not powered and the digital core VDD is supplied by the VDD
clamp.
The VDD clamp is supplied automatically by selecting the highest of VBAT_HIGH and VBAT_LOW . Since in
Buck configuration the VBAT_HIGH rail is always the highest supply on the chip, it is safe to disable this
automatic supply selection. Setting POWER_AON_CTRL_REG[CMP_VCONT_SLP_DISABLE] =
0x1 forces the clamp to use VBAT_HIGH as supply and reduces the hibernation current by approximately
40 nA.
● Extended Sleep and Deep Sleep Modes
In the extended sleep mode or deep sleep mode, the VBAT_LOW rail is supplied from LDO_LOW which
is in a retention low power mode. The digital core VDD is powered from LDO_CORE, retention mode.
To configure this mode the following settings must be applied:
○ POWER_CTRL_REG[LDO_LOW_CTRL_REG] = 0x3
○ POWER_CTRL_REG[LDO_CORE_RET_ENABLE] = 0x1
● Active and Sleep Modes
The VBAT_LOW rail is powered by LDO_LOW or by the DCDC converter. To enable the DCDC
converter the following settings must be applied:
○ POWER_LEVEL_REG[DCDC_LEVEL] = 0x0
○ DCDC_CTRL_REG[DCDC_ENABLE] = 0x1
Note that, the DCDC converter is automatically disabled and re-enabled when PD_SYS is powered
down and powered up again. Therefore, to use the DCDC converter to power V BAT_LOW rail,
LDO_LOW has to be turned off again after the system wakes up by setting the register:
○ POWER_CTRL_REG[LDO_LOW_CTRL_REG] = 0x1
● Register settings when the VBAT_LOW rail is powered by LDO_LOW:
○ POWER_CTRL_REG[LDO_LOW_CTRL_REG] = 0x3
NOTE
In Boost configuration, several diodes between VBAT_HIGH and VBAT_LOW can prevent VBAT_HIGH from dropping
more than a few hundred millivolts below VBAT_LOW.
During boot, external circuits connected to the VBAT_HIGH rail must be disabled. To guarantee a smooth startup,
a load on of VBAT_HIGH less than 50 µA is required.
In Boost configuration (Figure 8), voltages on VBAT_HIGH and VDD are generated from VBAT_LOW as
explained below:
● Hibernation Mode
Hibernation mode is generally a state in which the device stays longer. It is recommended to force
the VBAT_HL_RES switch on to reduce the power consumption from the comparator. When the
VBAT_HL_RES switch is on, VBAT_HIGH is connected to VBAT_LOW . The register setting is:
○ POWER_AON_CTRL_REG[VBAT_HL_CONNECT_RES_CTRL] = 0x1
In the hibernation mode of the Boost configuration, the digital core VDD is powered from VDD Clamp.
● Extended Sleep and Deep Sleep Modes
The digital core VDD is supplied by LDO_CORE switched to retention mode. The reference voltage
for this LDO is generated by periodically enabling and sampling the bandgap (see section 4.3.3 for
details). VBAT_HIGH rail, can be supplied by the following options:
Diodes controlled: VBAT_HIGH is connected to VBAT_LOW via diodes. This option is useful for short sleep
durations, typically below a second. When no significant load is present on VBAT_HIGH, it will not drop
below VBAT_LOW during the sleep interval. This is the reset setting.
Software controlled: VBAT_HIGH and VBAT_LOW are connected via VBAT_HL_RES. In typical use cases
this setting is energy efficient for sleep durations longer than one second. This mode requires the
following register settings:
– POWER_CTRL_REG[LDO_CORE_RET_ENABLE] = 0x1
– POWER_AON_CTRL_REG[VBAT_HL_CONNECT_RES_CTRL] = 0x2
– HW controlled: For short sleep durations, typically under one second, in combination with
increased load conditions that can discharge VBAT_HIGH to the level of VBAT_LOW during the
sleep interval, it is recommended to use the HW-controlled VBAT_HIGH connection, in which
the two rails are connected as soon as VBAT_HIGH drops to the same level of VBAT_LOW (+/- 50
mV). This mode requires the following register settings:
– POWER_AON_CTRL_REG[LDO_CORE_RET_ENABLE] = 0x1
– POWER_CTRL_REG[CMP_VBAT_HIGH_OK_ENABLE] = 0x1
– POWER_AON_CTRL_REG[VBAT_HL_CONNECT_RES_CTRL] = 0x3
● Active and Sleep Modes
In these modes the VBAT_HIGH rail is normally powered by the DCDC converter at 1.8 V. This level can
be changed to 2.5 V or 3.0 V by configuring POWER_LEVEL_REG[DCDC_LEVEL].
Since the Boost converter is only needed to generate 1.8V allowing for accessing to the OTP call and
supply the GPIOs, it is possible to disable it when access to the OTP is required and no GPIOs are
being driven. In this mode the VBAT_HL_SW should be activated to clamp VBAT_HIGH at VBAT_LOW , allowing
some load on VBAT_HIGH and GPIO operation at a reduced speed and voltage. Note that this mode
rapidly discharges VBAT_HIGH from the boosted voltage down to VBAT_LOW level. Also, the POR_HIGH
block has to be masked or disabled to avoid resets:
if it is masked, the POR_HIGH status remains available, but it will not generate a reset;
if it is disabled, the status becomes unavailable as well.
The following settings are required to enter this mode of operation:
– POWER_CTRL_REG[POR_VBAT_HIGH_DISABLE] = 0x1 (Disable) or
– POWER_AON_CTRL_REG[POR_VBAT_HIGH_RST_MASK] = 0x1 (Mask)
– DCDC_CTRL_REG[DCDC_ENABLE] = 0x0
– POWER_CTRL_REG[VBAT_HL_CONNECT] = 0x1
RESET_N=0
NO YES
Charge VBAT_LOW BOOST_MODE Bandgap Enable
VBAT_LOW = OK Bandgap = OK
Bandgap Enable
Bandgap = OK
LDO_LOW_RET Enable
LDO_LOW_RET = OK
LDO_CORE Enable
LDO_CORE = OK
YES
BOOST_MODE
YES
NO
NO VBAT_LOW
Charged BootROM (SW) starts Running Charge VBAT_HIGH
Go To Sleep
Wake up Buck mode Wake up Boost mode
Sleep
Referent Voltage
Tracking
The details of the power-up, wake-up, and sleep sequences of the FSM for the different modes are
described in the following sections.
In Boost configuration the DCDC is enabled by the Booter during power up. After waking up, if the
DCDC was left enabled, it will be started by the HW FSM. In Buck configuration, upon a wake-up, the
DCDC is enabled by programming DCDC_CTRL_REG[DCDC_ENABLE]. If DCDC_ENABLE is kept
asserted before the system goes to sleep, the DCDC will be started by the HW FSM upon waking-up.
If DCDC_ENABLE is cleared before the system goes to sleep, the DCDC can only be started by SW
asserting this bit after a wake-up. When the system is allowed to go to sleep, the HW FSM is
activated and the DCDC controller is automatically turned off.
sequence of the Buck configuration is shown in Figure 12. When the system is at the start of the
Buck configuration path, then VBAT_HIGH rail has a stable supply already and "boost_mode = 0" (which
means buck is identified) has been set.
To start the system, it is required that the VBAT_LOW rail is also brought up to an acceptable level,
which is done by HW, enabling the resistive switch VBAT_HL_RES and monitoring POR_LOW. The
rising voltage of the VBAT_LOW rail will eventually trigger POR_LOW to "ok" after that, the bandgap will
be enabled. The HW FSM runs at 32 kHz from the RC32K oscillator at this time, and it will
dynamically change to 512 kHz in one clock cycle after the switch is enabled. The HW FSM will
continue working at 512 kHz. When the reference voltage from the bandgap is stable, LDO_LOW is
enabled. After a stable 1.1 V is generated, LDO_CORE is enabled to generate a stable VDD of 0.9 V.
After this, the main system clock, RC32MHz, is enabled. All conditions are now in place to release
the system reset so that the Booter can start running. An indicative time needed to power up the
system in Buck configuration up until the application SW starts running, is around 2.5 ms. The time
required to charge VBAT_LOW and VBAT_HIGH depends on the external capacitor values on these rails.
In hibernation, the resistive switch VBAT_HL_RES can be closed to pre-charge VBAT_LOW to the level
of VBAT_HIGH by programming POWER_AON_CTRL_REG[VBAT_HL_CONNECT_RES_CTRL].
Therefore, during the wake-up sequence from the hibernation mode, step "Charge VBAT_LOW " can be
omitted (Figure 13) via POWER_AON_CTRL_REG[CHARGE_VBAT_DISABLE]. All other steps are
same as in the power-up cold-boot sequence. The total time needed to wake up the system from
hibernation up until booter software starts running is around 185 µs.
The wake-up sequence from the clocked, extended sleep or deep sleep mode using an external
GPIO toggle is shown in Figure 14. The difference between the power-up and wake-up sequence in
Buck configuration is that the VBAT_LOW rail is already charged via the switch VBAT_HL_RES in the
wakeup sequence as shown in Figure 11. Therefore, when the system wakes up from a deep sleep
or an extended deep sleep, the bandgap will be enabled within one 32 kHz clock cycle after the
wake-up signal is triggered. After the bandgap is enabled, LDO_LOW and LDO_CORE will be
enabled one after the other. The total time which is needed to wake up the system up until software
starts running is around 800 µs. If RAM has been retained, running software means application; if not
then the Booter will be started.
A GPIO trigger will have to go through the wake up controller first, which requires 7 RCX clock cycles
before it is allowed to trigger the PMU and have the state machine running. Even after all power rails
are done, switching the system clock from RCX into RC32M (so software stars running) takes 3.5
RCX clock cycles (indicated in state=RUNNING:SWITCH) in the figure above.
If the system wakes up from an internal timer running at the RCX clock, then the WokenUp signal will
be asserted 6 RCX clock cycles after the timer generates the interrupt (i.e ~400usec).
In hibernation, the resistive switch VBAT_HL_RES can be closed to pre-charge VBAT_HIGH to the level
of VBAT_LOW by programming POWER_AON_CTRL_REG[VBAT_HL_CONNECT_RES_CTRL].
Therefore, during the wake-up sequence from the hibernation mode, step "Charge VBAT_HIGH" can be
omitted (Figure 16) via POWER_AON_CTRL_REG[CHARGE_VBAT_DISABLE]. All other steps are
same as in the power-up cold-boot sequence. The total time needed to wake up the system from
hibernation up until booter software starts running is around 180 µs.
In the wake-up sequence from deep or extended sleep using a GPIO toggle, the step Charge
VBAT_HIGH lasts minimum 4 clock cycles (Figure 17). This time is sufficient to quickly re-charge
VBAT_HIGH under the condition that the leakage current and the sleep interval are sufficiently low and
the VBAT_HIGH voltage does not drop below VBAT_LOW . The state Charge VBAT_HIGH can be omitted by
using the resistive paths. The total time which is needed to power up the system up until software
starts running is around 865 µs. If RAM has been retained, running software means application; if not
then the Booter will be started.
A GPIO trigger will have to go through the wake up controller first, which requires 7 RCX clock cycles
before it is allowed to trigger the PMU and have the state machine running. Even after all power rails
are done, switching the system clock from RCX into RC32M (so software stars running) takes 3.5
RCX clock cycles (indicated in state=RUNNING:SWITCH) in the figure above.
If the system wakes up from an internal timer running at the RCX clock, then the WokenUp signal will
be asserted 6 RCX clock cycles after the timer generates the interrupt (i.e ~400usec).
0x7F80000
Interrupt Vectors
(32 words)
CUSTOMER
CODE
(variable but known size)
OTP
0x7F87ED0
Configuration Script
(60 words)
0x7F87FC0
OTP Header
(16 words)
0x7F88000
The OTP memory is a matrix of 8Kx32-bit words. The contents are described below:
● Interrupt Vectors: they are the vectors of the interrupt service routines and always reside at the
address 0x0. This is part of the application (customer) code. The size of this vector list is 32
words
● Customer Code: it contains the applications and the profiles that a customer has developed.
The size is known and fixed before the mass production and the programming of the OTP
● Configuration Script (section 4.4.2): it is used to program registers with values that are defined
during production testing, to store a trim value for the application software, and to define the
UART time-out timer during booting. It is executed by the Booter to prepare and initialize the
system prior to that the CPU starts running the application code. Available size is 60 words
● OTP Header: it contains various information about the configuration of the system and the BLE-
specific data. Size of the header is 16 words.
Programmed during
Words
Address Description Product
(32-bit) Chip Test
Manufacturing
Boot specific configuration:
● Bits[7:0] :
○ 0xAA = Boot from SPI port at a specific
location
○ 0xFF = Normal sequence
● Bits[15:8] = Wake up Command opcode
7F87FC8 1 ● Bits[23:16] = SPI_DIV Yes
● Bits[31:24]:
○ 0x00 = Two-wire UART (P0_0/P0_1)
○ 0x01 = One-wire UART (P0_3)
○ 0x02 = One-wire UART (P0_5)
○ Default (all other values) = Two-wire UART
(P0_0/P0_1)
Boot specific port mapping:
Bits[7:4] = SPI_CLK, Port number
Bits[3:0] = SPI_CLK, Pin number
Bits[15:12] = SPI_EN, Port number
7F87FCC 1 Bits[11:8] = SPI_EN, Pin number Yes
Bits[23:20] = SPI_DO, Port number
Bits[19:16] = SPI_DO, Pin number
Bits[31:28] = SPI_DI, Port number
Bits[27:24] = SPI_DI, Pin number
Device and Package Flag:
● Bits[7:0]:
○ 0xFF = WLCSP with P0_5
○ 0x66 = WLCSP without P0_5
7F87FD0 1 ○ 0xAA = FCGQFN24 Yes
● Bits[15:8]:
○ 0xFF = 531
○ Others = Reserved
● Bits[31:16] = Reserved
Bluetooth Device Address (64-bit word).
7F87FD4 2 Yes
It is handled as a string of bytes.
7F87FDC 1 OTP DMA length (number of 32-bit words). Yes
Position:
Bits[7:0] = X coord
7F87FE0 1 Bits[15:8] = Y coord Yes
Bits[23:16 ]= Wafer #
Bits[31:24] = LOT #
Tester:
Bits[7:0] = Tester_Site
7F87FE4 1 Bits[15:8] = Tester_ID (LSB) Yes
Bits[23:16] = Tester_ID (MSB)
Bits[31:24] = Reserved
Programmed during
Words
Address Description Product
(32-bit) Chip Test
Manufacturing
TimeStamp:
Bits[7:0] = TS_Byte0
7F87FE8 1 Bits[15:8] = TS_Byte1 Yes
Bits[23:16] = TS_Byte2
Bits[31:24] =TS_Byte3
7F87FEC 5 Reserved for Future Needs
The Device and Package Flag reflects what the current device (DA14531) is and which package is
used. Default (unprogrammed) values are 0xFFFFFFFF.
Boot specific mapping value is used to define a specific configuration for the SPI interface when used
for booting from an external device (either an MCU or a FLASH). Byte0 is the flag to instruct the
BootROM to use the specific SPI pin mapping and skip the rest of the serial peripheral interfaces.
The BootROM takes care of waking up an external flash when the flash memory is in deep power-
down state.
Byte1 is used for the Wake-up Command opcode that the flash memory responds to. If Byte0 is left
unprogrammed, the BootROM will send the "0xAB" opcode by default. Furthermore, the BootROM is
able to wake up the external flash by toggling the CS pin.
Two more flags indicate whether the application code has indeed been programmed (burned) into
the OTP. Both flags are read by the BootROM software designating that the system is in the Normal
mode and not in the Development mode (section 4.5).
The Booter stops processing the CS once it encounters an empty OTP value (0xFFFFFFFF). This
way, no more processing time is spent to check the rest and it is possible to add new entries later, for
example, to patch/update previous entries.
An example describing the format of the configuration script is presented in Table 37.
In Development mode, the "Boot from Specific" flag will be evaluated. If the flag is programmed, new
pin locations for booting from an external SPI slave to make DA14531 an SPI Master will be set. The
"Boot from Specific" flag addresses mostly the QFN package allowing for booting from a different pin
configuration than the default one, so that the system can boot from an external FLASH using the
development mode. The details of the configuration are presented in section 4.4.1. If this path is
entered, the system will always try to boot from UART so that the SPI Flash can be updated if
needed. Any of the three UART configurations specified in Table 38 can be selected by writing bits
[31:24] at the "Boot specific config" field in the OTP header. If booting from SPI Flash fails, the Booter
will jump back to the normal scan sequence of the peripheral devices.
If the "Boot from Specific" flag is not programmed, the system should continue with scanning the
different serial interfaces to identify whether a device is connected to it. After OTP is disabled, six
steps as described in Table 38 are performed. Before using the UART, the XTAL32M clock needs to
be enabled. All the boot steps are protected by a timeout.
Default clock is
Boot Start
RC32K
Boost
Yes Enable DCDC
mode?
No
Enable OTP
DCDC in buck
Execute Configuration Script could be enabled
here
Is App Switch to
Yes programmed No XTAL32M OK Yes
XTAL32M
?
Length Register
will be Magic Number
automatically identified
read by the OTP
controller after No
wake up Read and Prog. DMA
length
NORMAL MODE
The one-wire UART boot capability is introduced due to the limited amount of the GPIOs in the
WLCSP package. The one-wire UART boot leaves four GPIOs for the application and one GPIO for
programming/debugging. Since the booting from UART protocol is a half-duplex, a single GPIO is
used in DA14531 for the external UART. The protocol is the same as for a 2-wire UART booting
except that the Booter SW need to change the pin direction before sending or receiving information.
If no bootable devices are found on any of the serial interfaces, the Booter can do two things,
depending on what is stored in the CS. If the "Debugger disable" (0x70000000) command is stored
there, the Booter will start scanning for peripherals again. Otherwise it enters the endless loop with
the debugger (JTAG) being enabled. The debugger can be connected to P0_5 in the WLCSP17
package or P0_10 in the FCGQFN24 package.
After the BootROM sequence has completed, the default system clock is RC32M, regardless of
which boot path has been chosen and all GPIOs are set back to their default reset values.
5 Reset
5.1 Introduction
The DA14531 comprises a reset (RST) pad which is active high. It contains an RC filter with a
resistor of 465 kΩ and a capacitor of 3.5 pF to suppress spikes. It also contains a 25 kΩ pull-down
resistor. This pad should be driven externally by a field-effect transistor (FET) or a single button
connected to VBAT. The typical latency of the RST pad is in the range of 2 µs.
Features
● RC spike filter on RST to suppress external spikes (465 kΩ, 3.5 pF)
● Three different reset lines (SW, HW, and POR)
● Latching the cause of a reset operation (RESET_STAT_REG)
● Configurable POR circuitry
APB16
HW_RESET
DEBUGGER_ENABLE
Debugger
SYS_CTRL_REG[SW_RESET]
NMI WDOG_reset
HW_RESET
HWR_CTRL_REG[DISABLE_HWR]
Low-Pass Filter
5.2 Architecture
The HW reset can also be automatically activated when the system wakes up from the Extended or
Deep Sleep mode by programming the bit PMU_CTRL_REG[RESET_ON_WAKEUP]. The POR and
the HW reset basically run the cold start-up sequence and the BootROM code is executed.
The SW reset is the logical OR of a signal from the Cortex CPU (triggered by writing SCB->AIRCR =
0x05FA0004) and the SYS_CTRL_REG[SW_RESET] bit. It is mainly used to reboot the system after
the base address has been remapped.
The block diagram of the reset block is depicted in Figure 21.
Certain registers are reset by POR only, or by POR and the HW reset signal but not by the SW reset.
These registers are listed in Table 39.
XTAL32M_CTRL0_REG
PMU_SLEEP_REG
POWER_CTRL_REG
POWER_LEVEL_REG
DCDC_CTRL_REG
RAM_LPMX_REG
HIBERN_CTRL_REG
CLK_RTCDIV_REG
RTC_CONTROL_REG
RTC_KEEP_RTC_REG
OTPC_*_REG
QDEC_*_REG
TCLK = 31.25usec
RC32k
HW Reset
Timer value matched Timer value matched
POReset
5.3 Programming
To configure the functionality of triggering a POR by a GPIO pin, follow the steps below:
1. Select a GPIO to be set as the POR source by programming
POR_PIN_REG[POR_PIN_SELECT].
2. Set up the input polarity of the GPIO that causes POR by programming
POR_PIN_REG[POR_PIN_POLARITY].
3. Configure the time for the POR to happen by programming POR_TIMER_REG[POR_TIME]. The
default time is around three seconds.
NOTE
To set up the time when the RST pad produces a POR, just set the POR_TIMER_REG register.
6 Arm Cortex-M0+
6.1 Introduction
The Arm Cortex-M0+ processor is a 32-bit Reduced Instruction Set Computing (RISC) processor with
a von Neumann architecture (single bus interface). It uses an instruction set called Thumb, which
was first supported in the ARM7TDMI processor, but it also uses several newer instructions from the
Armv6 architecture and a few instructions from the Thumb-2 technology. Thumb-2 technology
extends the previous Thumb instruction set to allow all operations to be carried out in one CPU state.
The instruction set in Thumb-2 includes both 16-bit and 32-bit instructions; most instructions
generated by the C compiler use the 16-bit instructions, and the 32-bit instructions are used when the
16-bit version cannot carry out the required operations. This results in high code density and avoids
the overhead of switching between two instruction sets.
In total, the Cortex-M0+ processor supports only 56 base instructions, although some instructions
can have more than one form. Although the instruction set is small, the Cortex-M0+ processor is
highly capable because the Thumb instruction set is highly optimized.
Academically, the Cortex-M0+ processor is classified as load-store architecture, as it has separate
instructions for reading and writing to memory, and instructions for arithmetic or logical operations
that use registers. It has a two-stage pipeline (fetch+predecode and decode+execute) as opposed to
its predecessor (Cortex-M0) that has a three-stage pipeline (fetch, decode, and execute).
A simplified block diagram of the Cortex-M0+ is shown in Figure 23.
Features
● Thumb instruction set: highly efficient, of high code density, and able to execute all Thumb and
Thumb-2 instructions
● High performance: up to 0.9 DMIPS/MHz (Dhrystone 2.1) with fast multiplier
● Built-in Nested Vectored Interrupt Controller (NVIC): this makes interrupt configuration and
coding of exception handlers easy. When an interrupt request is taken, the corresponding
interrupt handler is executed automatically without the need to determine the exception vector in
software
● Interrupts can have four different programmable priority levels and the NVIC automatically
handles nested interrupts
● The design is configured to respond to exceptions (for example, interrupts) as soon as possible
(minimum 15 clock cycles)
● Non maskable interrupt (NMI) input for safety critical systems
● Easy to use and C friendly. There are only two modes, Thread mode and Handler mode. The
whole application, including exception handlers, can be written in C without any assemblers
● Built-in System Tick timer for OS support. A 24-bit timer with a dedicated exception type is
included in the architecture, which the OS can use as a tick timer or as a general timer in other
applications without an OS
● SuperVisor Call (SVC) instruction with a dedicated SVC exception and Pendable SuperVisor
service (PendSV) to support various operations in an embedded OS
● Architecturally defined sleep modes and instructions to enter sleep. The sleep features allow
power consumption to be reduced dramatically. Defining sleep modes as an architectural feature
makes porting of software easier because the sleep modes are entered by specific instructions
rather than implementation defined control registers
● Fault handling exception to catch various sources of errors in the system
● Support for 21 interrupts
● Little endian memory support
● Wake-up Interrupt Controller (WIC) to allow the processor to be powered down during sleep,
while interrupt sources are still allowed to wake up the system
● Halt mode debug allows the processor activity to stop completely so that register values can be
accessed and modified. No overhead in code size and stack memory size
● CoreSight technology allows memories and peripherals to be accessed from the debugger
without halting the processor
● Supports Serial Wire Debug (SWD) connections. The SWD protocol can handle the same debug
features as the JTAG, but it only requires two wires and is already supported by a number of
debug solutions from various tools vendors
● Four (4) hardware breakpoints and two (2) watch points
● Breakpoint instruction support for an unlimited number of software breakpoints
● rogrammer’s model similar to the AR TDMI processor. Most existing Thumb code for the
ARM7TDMI processor can be reused. This also makes it easy for ARM7TDMI users, as there is
no need to learn a new instruction set.
6.2 Architecture
6.2.1 Interrupts
This section lists all 21 interrupt lines, except the NMI interrupt, and describes their sources and
functionality. The overview of the interrupts is illustrated in Table 40.
Interrupt priorities are programmable by the Arm Cortex-M0+. The lower the priority number, the
higher the priority level. The priority level is stored in a byte-wide register, which is set to 0x0 at reset.
Interrupts with the same priority level follow a fixed priority order using the interrupt number listed in
Table 40 (a lower interrupt number has a higher priority level).
To access the Cortex-M0+ NVIC registers, the Cortex Microcontroller Software Interface Standard
(CMSIS) functions can be used. The input parameter IRQn of the CMSIS NVIC access functions is
the IRQ number. This can be the IRQ number or (more conveniently) the corresponding IRQ name
listed in Table 40. For example, the corresponding interrupt handler name in the vector table for
IRQ#15 is SPI_Handler. For more information on the Arm Cortex-M0+ interrupts and the
corresponding CMSIS functions, see section 4.2 Nested Vectored Interrupt Controller in the
Cortex-M0+ Devices Generic User Guide.
The Watchdog interrupt is connected to the NMI input of the processor.
6.3 Programming
For more information on the Arm Cortex-M0+, see the documents listed in Table 41.
7 AMBA Bus
7.1 Introduction
The DA14531 is based on the AMBA 2.0 AHB and APB components. The AHB is an AMBA Lite
version which requires a single master on the system, but there is arbitration between the Arm
Cortex-M0+ CPU and the Direct Memory Access (DMA) engine. There are two APB bridges, one for
APB16 and the other for APB32, implementing three different decoded slaves which are grouped
according to the power domain structure of the chip.
The AMBA bus organization is presented in Figure 24.
RTC
PD_AON
PD_TIM
TIM
Clockless APB32 Timer1
AMBA APB32
Wakeup Bridge
GPIO
PMU/CRG
PD_SLP
Timer0,2
SLEEP
Quad Decoder
GPRG
BLE Timer
WatchDog
Clocked Wakeup
SYSTEM
APB16 Keyboard
ROM Bridge UART
UART2
AMBA AHB Lite
AMBA APB16
Sys Memory
RAMs Controller I2C
SPI
OTP ADC
Access from
AHB master
Controller
BLE Controller
& Memory
PD_RAD
RFCU
Arm
Remap
AHB master
Cortex- BLE Controller
M0+
Access to Memory
DMA Controller
PD_SYS
7.2 Architecture
Since the DA14531 consists of several different power domains that are digitally controlled and can
be shut down completely, various slave resources, especially on the APB bus, are grouped together
to reduce signal isolation requirements. On the AHB Lite bus, the CPU or the DMA can be the
master, while OTP, BLE Core, Memory and ROM controllers are slaves.
The Always On power domain (PD_AON) contains only the clock-less wake-up controller and the
start-up hardware FSM responsible for the activation of the power devices within the system.
The sleep power domain (PD_SLP) contains the clock tree, the BLE Timer, the Clocked Wake-up
Controller, and the Quadrature Decoder. These blocks are supposed to trigger or to capture wake-up
events while the system is in any of the clocked sleep modes.
The timers power domain (PD_TIM) contains special purpose timers that might or might not be
crucial for an application: a full featured Real Time Clock (RTC) engine and Timer1. The registers of
these blocks are 32-bit wide, hence they are connected to the APB32 bus.
The APB16 bus connects to the radio power domain (PD_RAD), which consists of the Radio control
unit and the BLE controller, and to the peripheral blocks which are all part of the same power domain
as the CPU (PD_SYS).
7.3 Programming
Since the AMBA Bus only acknowledges a single master at a time, a programmable arbitration is
implemented to decide whether the Arm Cortex-M0+ or the DMA is the master. The priority can be
configured in the GP_CONTROL_REG[CPU_DMA_BUS_PRIO] with the CPU having the highest
priority by default.
8 Memory Map
Table 42: Memory Map
Address Description Power Domain
0x00000000 Boot/BLE ROM/OTP/RAM
0x04000000 Remapped address space based on
SYS_CTRL_REG[REMAP_ADR0].
0x04000000 RESERVED
0x07F00000
0x07F00000 Boot/BLE ROM
0x07F24000 Contains Boot ROM code and BLE protocol related code.
0x07F24000 RESERVED
0x07F40000
0x07F40000 OTP-Regs PD_SYS
0x07F40100 Contains the control registers of the OTP Subsystem.
0x07F40100 RESERVED
0x07F80000
0x07F80000 OTP
0x07F88000 Contains the OTP cell actual memory space.
0x07F88000 RESERVED
0x07F C0000
0x07FC0000 System RAM
0x07FCC000 48 kB. Contains application code, data for the application, stack, and
heap.
SysRAM1 (16 kB): 0x07FC0000 to 0x07FC3FFF
SysRAM2 (12 kB): 0x07FC4000 to 0x07FC6FFF
SysRAM3 (20 kB): 0x07FC7000 to 0x07FCBFFF
0x07FD8000 RESERVED
0x40000000
0x40000000 AHB/BLE-Regs PD_RAD
0x40001000 Contains the control registers of the BLE Link Layer Processor.
0x40001000 AHB/Radio PD_RAD
0x40004000
0x40004000 RESERVED
0x50000000
0x50000000 APB16/PMU-CRG PD_SLP
0x50000100 Contains the control registers of the Power Management Unit and the
Clock Generator.
0x50000100 APB16/wake-up PD_SLP
0x50000200 Contains the registers of the clocked and clock-less wake up
controllers.
0x50000200 APB16/Quadrature Decoder PD_SLP
0x50000300 Contains Logic that implements a step counter for X and Y axis from a
rotary encoder.
0x50000300 RESERVED
0x50001000
9 Memory Controller
9.1 Introduction
The Memory Controller of DA14531 is responsible for the interface between the memory cells and
the masters of the system that request access. It comprises two arbiters which use a fixed priority
level scheme to allow parallelization between the three main masters of the RAM. The memory
controller also provides the actual physical sequence of the RAM cells in a continuous memory
space to enable the activation of the required amount of SysRAM only in order to save power.
The block diagram is presented in Figure 25.
Features
● Three different capacities for the RAM cells with retention capability (12 kB, 16 kB, and 20 kB)
● Arbitration among the AHB masters (CPU or DMAs), OTP, and the BLE core
● Transparently interfaces the AHB busses to memory signaling
● Fixed arbitration algorithm with time sharing
Memory bus
MUX-DEMUX
Arbiter Arbiter
SysRAM3 20KB
SysRAM1 16KB
SysRAM2 12KB
Memory
Controller
9.2 Architecture
The Memory Controller contains two Arbiters which connect to the following busses via a Mux-
Demux:
● BLE Mem I/F: this is a memory interface directly from the Bluetooth 5.1 Core to the RAM used as
an exchange memory (TX/RX descriptors and others). This interface always operates at 16 MHz
● System Mem I/F: This is a memory interface directly from the OTP memory to the RAM used for
copying data after power-up/wake-up
9.2.1 Arbitration
The arbitration is a mixture of the highest priority and a fair use policy. If more than one master
request access to cells which reside under the same arbiter, time division is employed. This is to
make sure none of the busses can stall the others for a long period. The OTP and BLE accesses are
handled as very critical and therefore they have the highest priority.
10 Clock Generation
LDO_CORE CP (512KHz)
CLK_AMBA_REG[OTP_ENABLE]
otp_clk
CLK_PER_REG[WAKEUPCT_ENABLE]
CLK_CTRL_REG[SYS_CLK_SEL]==0x0
wakeupct_clk
System
XTAL32M DIV Divide by Clocks
1 apb_clk
2 PCLK_DIV
OSC sys_clk
wokenup & !(CLK_CTRL_REG[SYS_CLK_SEL]&0x2) 0 hclk
Divide by
RC32M DIV ble_hclk
1 HCLK_DIV
OSC 2
arb_clk
0 wakeup_clk CLK_PER_REG[SPI_ENABLE]
spi_clk
CLK_PER_REG[I2C_ENABLE]
i2c_clk
CLK_PER_REG[UART1_ENABLE]
uart_clk
CLK_PER_REG[UART2_ENABLE]
uart2_clk
CLK_PER_REG[QUAD_ENABLE]
quad_clk
CLK_PER_REG[TMR_ENABLE] 0
tmr2_clk
Divide by 1
TMR_DIV
TRIPLE_PWM_CTRL_REG[TRIPLE_PWM_CLK_SEL]
Peripheral
0 Clocks
CLK_CTRL_REG[LP_CLK_SEL] tmr0_clk
1
1
TIMER0_CTRL_REG[TIM0_CLK_SEL] tmr0_on_clk
RC OSC Divide by 0
32K/512K 0 10
TIMER0_CTRL_REG[TIM0_CLK_SEL]
RCX
OSC 1 lp_clk 0
tmr1_clk
1
XTAL32K 2
OSC Divide by TIMER1_CTRL_REG[TIM1_CLK_SEL]
rtc_clk
RTC_DIV
3
P0[3] GP_ADC_CTRL_REG[GP_ADC_EN]
gp_adc_clk
DIV=>10,24ms wdog_clk
CLK_RADIO_REG[RFCU_ENABLE]
Divide by
2 rfcu_clk
CLK_RADIO_REG[BLE_ENABLE]
Divide by
BLE_DIV ble_master1_clk
ble_lp_clk
PLL
RC32M 0
spi_fast_clk
XTAL32M 1
CLK_CTRL_REG[SYS_CLK_SEL]=0x0
Figure 26 depicts the possible clock sources as well as all different divisions and multiplexing paths
towards the generation of each block's clock. Furthermore, the required registers that have to be
programmed are also shown in Figure 26.
Internal clock sources of DA14531 are the RC32M, RC32K/512K, and RCX oscillators. External
clock sources of DA14531 are the 32 MHz crystal oscillator (the pins XTAL32Mp and XTAL32Mm),
the 32.768 kHz crystal oscillator (the pins XTAL32kp and XTAL32km mapped on P0_3 and P0_4,
respectively), or an external digital clock (the pin P0_3).
There are two main clock lines which are of interest:
● lp_clk: this is the low power clock used for the sleep modes and can only be either the RCX, the
RC32K, the XTAL32K, or an externally supplied digital clock
● sys_clk: this is the system clock used for the AMBA clock (hclk), which runs the CPU, the
memories, and the bus. This clock source can be one of the oscillators or an externally supplied
digital clock
The clock names depicted in Figure 26 are explained in Table 43.
XTAL 32Km
XTAL 32Mp
XTAL 32Kp
CL = 4pF - 8 pF
clock32MHz clock32KHz
CLK_FREQ_TRIM_REG[XTAL32M_TRIM]
7 6 5 4 3 2 1 0
Decoding
3 -> 7
...
...
LP_CLK
Loads from
XTAL32M_EN XTALRDY_CTRL_REG and
counting down...
XTALRDY_CNT 0 2 1 0
(8 bits)
XTAL32RDY_IRQn is always
asserted when XTALRDY_CNT
reaches 1
XTAL32RDY_IRQn
XTAL32MHz
XTAL32_CLK_CNT
Counting ... 0x11FF
(10 bits)
XTAL32_CLK_CNT= XTAL32_CLK_CNT=
XTAL_CO UNT_N XTAL_SETTLE_N
XTAL32_SETTLE_READY
TRIM VALUE
XTAL_TRIM_SELECT=1 XTAL32M_START_REG CLK_FREQ_TRIM_REG
In both modes mentioned above, trimming is done by HW. In the current mode, upon assertion of
XTAL32M_TRIM_READY, the interrupt counter value is stored in a shadow register
XTALRDY_STAT_REG to enable SW understanding when the start-up section is finished.
The settling section usually takes no more than five to 10 clock cycles. Using the explanation above,
fine tuning and reducing the XTAL32M latency is feasible. One feature of the XTAL32_CLK_CNT is
that it asserts an observable signal (SYS_STAT_REG[XTAL32_SETTLE_READY]) as soon as the
counter reaches a pre-defined threshold programmed at TRIM_CTRL_REG[XTAL_SETTLE_N]. This
allows the SW to have an indication of the status of the clock by adjusting the threshold accordingly.
10.3 RC Oscillators
There are three RC oscillators in the DA14531:
● One providing 32 MHz (RC32M)
● One providing 32 kHz and 512 kHz (RC32K/512K)
● One providing a frequency of 15 kHz (RCX)
The RC32M is powered by VBAT_LOW which is available during Active or Sleep mode. The output clock
is slower than 32 MHz if untrimmed and it is used to clock the CPU and the digital part of the chip
during power-up or wake-up, while the XTAL32M oscillator is settling.
The simple RC oscillator (RC32K/512K) operates on VDD and provides 32 kHz or 512 kHz. The
main usage of the RC32K/512K oscillator is for internal clocking during power-up or start-up. It clocks
the HW FSM which brings up the power management system of the chip. In the power-up or start-up
sequence, the clock dynamically changes from 32 kHz to 512 kHz in order to speed up the
sequence. The enhanced RC oscillator (RCX) provides a stable 15 kHz frequency and operates on
VBAT_LOW which is available during Active or Sleep mode.
The RCX oscillator can be used to replace the 32.768 kHz crystal, since it has a precision of < 500
ppm, while its output frequency needs to be recalibrated over temperature.
Using the RCX requires the following registers to be set:
● Set GP_DATA_REG = 0x20 after the system wakes up
● RCX calibration (the calibration is optional, please see section 10.3.1 for the RCX calibration)
● Go to sleep: set GP_DATA_REG = 0x40 after the sleep procedure is handled
The procedure is also implemented as a part of the SDK.
11 OTP Controller
11.1 Introduction
The OTP controller realizes all functions of the OTP macro cell in an automated and transparent way.
The controller facilitates all data transfers (reading and programming), comprises a DMA engine
which connects to the AHB bus as a master, and has the highest priority to copy code from OTP into
SysRAM in mirrored mode. The block diagram is presented in Figure 30.
Features
● Implements all timing constraints for any access to the physical OTP cell
● Automatic single Error Code Correction (ECC) - 6 bits (implemented in the OTP cell)
● 32-bit read in a single read access from the OTP cell
● Single word buffer for programming. No burst programming supported
● Empty words are 0xFFFFFFFF. Zeros are programmed per 32-bit word
● Embedded DMA engine for fast mirroring of the OTP contents into the SysRAM
● Embedded DMA supports reading in bursts of 4 × 32-bit words
● Transparent random address access to the OTP memory cells via the AHB slave memory
interface
● Hardwired handshaking with the PMU to realize the mirroring procedure
AHB Lite
FIFO
IF Ctrl Controller
OTP Memory
(32+6)bits x 8192
11.2 Architecture
The OTP controller block includes the OTP macro cell and pure digital logic implementing the
controlling functions. The OTP memory communicates with the controller through a proprietary
interface.
The internal organization of the OTP cell is 32-bit data and 6-bit ECC for each of the 8192
addressable positions. The six bits of the ECC are only accessible within the OTP cell. The ECC is
generated by the OTP cell during the programming and is used again by the OTP cell in a
transparent way during reading.
The AHB master interface is controlled by a DMA engine with an internal FIFO of eight 32-bit words.
The DMA engine supports AHB reads and writes. The AHB address where memory access should
begin is programmed into the DMA engine at OTPC_AHBADR_REG[OTPC_AHBADR]. The number
● Automatic Read Mode (AREAD). This mode is used to mirror large parts of the OTP cell into
RAM through the AHB master interface and the integrated DMA controller.
Transitioning from one mode to another automatically steps through the STBY mode.
11.3 Programming
To configure the OTP controller, following the sequence of steps below:
1. Enable clock for OTP controller by setting the CLK_AMBA_REG[OTP_ENABLE] bit.
2. Put the OTP in STBY mode (OTPC_MODE_REG[OTPC_MODE_MODE] = 0x2).
3. Wait for OTP mode to change (OTPC_STAT_REG[OTPC_STAT_MRDY] = 1).
4. Set OTP speed by writing OTPC_TIM1_REG and OTPC_TIM2_REG if system clock speed is to
be reduced. These numbers basically generate asynchronous timing signals towards the OTP
cell that comply to the default internal 16 MHz bus speed.
5. Perform an OTP access:
a. Programming:
i. Set up OTP write mode (OTPC_MODE_REG[OTPC_MODE_MODE] = 0x3).
ii. Wait for OTP mode to change (OTPC_STAT_REG[OTPC_STAT_MRDY] = 1).
iii. Check OTPC_STAT_REG[OTPC_STAT_PBUF_EMPTY] = 1
iv. Write the data to be programmed to OTPC_PWORD_REG.
v. Write the address to which the data to be programed to OTPC_PADDR_REG.
vi. Wait until the programming is finished (OTPC_STAT_REG[OTPC_STAT_PRDY] = 1).
vii. Switch to OTP verify mode (OTPC_MODE_REG[OTPC_MODE_MODE] = 0x4).
viii. Wait for OTP mode to change (OTPC_STAT_REG[OTPC_STAT_MRDY] = 1).
ix. Read back and compare the data written.
x. Put the OTP in STBY mode (OTPC_MODE_REG[OTPC_MODE_MODE] = 0x1).
xi. Wait for OTP mode to change (OTPC_STAT_REG[OTPC_STAT_MRDY] = 1).
b. Reading:
i. Set up OTP read mode (OTPC_MODE_REG[OTPC_MODE_MODE] = 0x2).
ii. Wait for OTP mode to change (OTPC_STAT_REG[OTPC_STAT_MRDY] = 1).
iii. Read OTP word.
iv. Put the OTP in STBY mode (OTPC_MODE_REG[OTPC_MODE_MODE] = 0x1).
v. Wait for OTP mode to change (OTPC_STAT_REG[OTPC_STAT_MRDY] = 1).
12 DMA Controller
12.1 Introduction
The 4-channel direct memory access (DMA) controller transfers data of eight bits, 16 bits, or 32 bits
between the on-chip supported peripherals (SPI, UART, UART2, I2C, and ADC) and the on-chip
RAM and supports regular memory-to-memory transfers. The DMA also supports a programmable
interrupt generation to generate an interrupt after a certain number of transfers in order to off load the
Cortex interrupt rate. The on-chip peripheral requests are multiplexed on the two available channel
pairs to increase the DMA utilization. A block diagram of the controller is depicted on Figure 27.
Features
● Four channels with an optional peripheral trigger
● Full 32-bit source and destination pointers
● Flexible interrupt generation
● Programmable length
● Flexible peripheral request per channel
● Option to initialize memory (DMA_INIT)
● Programmable edge-sensitive request support (recommended when writing to UART/UART2 and
I2C)
AHB Lite
DMA01_REQ_MUX
DMA03_REQ_MUX
DMA IRQ lines
IRQ lines
Block IRQ lines
APB16
Control
12.2 Architecture
31 0
DMAx_A_START_REG
15 0 AINCx AD[31-0]
DMAx_IDX_REG
+1 BINCx
31
+ IRQ_ENABLE
0
DMAx_B_START_REG
15 0
=
DMAx_INT_REG
DMA_IRQ_CHx
STOP/
RELOAD
15 0 =
DMAx_LEN_REG
13 0
DMAx_CTRL_REG Bus request
Bus Grant
DMA_REQ DMA_INT
DMA_ACK
Each DMA channel can generate an interrupt if the index counter DMAx_IDX_REG reaches the
value of the channel's interrupt transfer length register, DMAx_INT_REG. After the transfer and
before DMAx_IDX_REG is incremented, the interrupt is generated.
For example, if DMA_x_INT_REG = 0 and DMA_x_LEN_REG = 0, there will be one transfer and an
interrupt.
NOTE
When DMA_INIT is enabled, AINC must be set to 0 and BINC to 1.
Memory initialization could also be performed by simply setting AINC to 0 and BINC to 1 without enabling the
DMA_INIT, provided that the source address of the memory will not change during the transfer. However, it is
not guaranteed that the DMA transfer will not be interrupted by other channels of a higher priority, when they
request access to the bus at the same time.
12.3 Programming
13 I2C Interface
13.1 Introduction
The I2C Interface is a programmable control bus that provides support for the communications link
between Integrated Circuits in a system. It is a simple two-wire bus with a software-defined protocol
for system control, which is used in temperature sensors and voltage level translators to EEPROMs,
general-purpose I/O, and A/D and D/A converters.
Features
● Two-wire I2C serial interface consisting of a serial data line (SDA) and a serial clock (SCL)
● Two speeds are supported:
○ Standard mode (0 to 100 kbit/s)
○ Fast mode (≤ 400 kbit/s)
● Clock synchronization
● 32 locations deep transmit/receive FIFOs (32× 8-bit Rx and 32× 10-bit Tx)
● Master transmit and Master receive operation
● Slave transmit and Slave receive operation
● 7-bit or 10-bit addressing
● 7-bit or 10-bit combined format transfers
● Bulk transmit mode
● Default slave address of 0x055
● Interrupt or polled-mode operation
● Handles bit and byte waiting at both bus speeds
● Programmable SDA hold time
● DMA support
13.2 Architecture
The I2C Controller block diagram is shown in Figure 33. It contains the following sub-blocks:
● AMBA Bus Interface Unit: it accesses the register file via the APB interface
● Register File: it contains configuration registers and is the interface with SW
● Master State Machine: it generates the I2C protocol for the master transfers
Datasheet Revision 3.1 09-Jul-2020
● Slave State Machine: it generates the I2C protocol for the slave transfers
● Clock Generator: it calculates the required time to do the following:
○ Generate the SCL clock when configured as a master
○ Check for bus idle
○ Generate a START and a STOP
○ Set up the data and hold the data
● Rx Shift: it takes data into the design and extracts it in byte format
● Tx Shift: it presents data supplied by CPU for transfer on the I2C bus
● Rx Filter: it detects the events in the bus, for example, start, stop, and arbitration lost
● Toggle: it generates pulses on both sides and toggles to transfer signals across clock domains
● Synchronizer: it transfers signals from one clock domain to another
● Interrupt Controller: it generates the raw interrupt and interrupt flags, allowing them to be set
and cleared.
● RX FIFO/TX FIFO: it holds the RX FIFO and TX FIFO register banks and controllers along with
their status levels.
● Multi-master means the ability for more than one master to co-exist on the bus at the same time
without collision or data loss
● Arbitration is the predefined procedure that authorizes only one master at a time to take control of
the bus. For more information, refer to section 13.2.4
● Synchronization is the predefined procedure that synchronizes the clock signals provided by two
or more masters. For more information, refer to section 13.2.5
The I2C is a synchronous serial interface. The SDA line is a bidirectional signal and changes only
when the SCL line is low, except for STOP, START, and RESTART conditions. The output drivers
are open-drain or open-collector to perform wire-AND functions on the bus. The maximum number of
devices on the bus is limited only by the maximum capacitance specification of 400 pF. Data is
transmitted in byte packages.
NOTE
The signal transitions for the START/STOP conditions (Figure 36) reflect those observed at the output signals
of the master driving the I2C bus. Be careful with observing the SDA/SCL signals at the input signals of the
slave(s), because unequal line delays may result in an incorrect SDA/SCL timing relationship.
Table 45: I2C Definition of Bits in First Byte in 10-bit Address Format
Slave Address R/W Bits Description
0000 000 0 General Call Address. I2C Controller places the data in the receive buffer
and issues a General Call interrupt.
0000 000 1 START byte. For more details, refer to "START BYTE Transfer Protocol".
0000 001 X CBUS address. I2C Controller ignores these accesses.
0000 010 X Reserved.
0000 011 X Reserved.
0000 1XX X High-speed master code (for more information, refer to section 13.2.4)
1111 1XX X Reserved.
1111 0XX X 10-bit slave addressing.
The I2C Controller does not restrict users from using these reserved addresses. However, if these
reserved addresses are used, incompatibilities with other I2C components may occur.
Arbitration takes place on the SDA line while the SCL line is 1. The master which transmits a 1 while
the other master transmits a 0 loses the arbitration and turns off its data output stage. The master
that has lost the arbitration can continue to generate clocks until the end of the byte transfer. If both
masters are addressing the same slave device, the arbitration could go into the data phase. Figure
42 illustrates the timing of an arbitration between two masters on the bus.
For the high-speed mode, an arbitration cannot go into the data phase because each master is
programmed with a unique high-speed master code. This 8-bit code is defined by the system
designer and is set by writing to I2C_HS_MADDR, the High-Speed Master Mode Code Address
Register. Because the codes are unique, only one master can win an arbitration, which occurs by the
end of the transmission of the high-speed master code.
Control of the bus is determined by the address or master code and data sent by the competing
masters, so there is no central master or any order of priority on the bus.
Arbitration is not allowed between the following conditions:
● A RESTART condition and a data bit
● A STOP condition and a data bit
● A RESTART condition and a STOP condition
Slaves are not involved in the arbitration process.
which is illustrated in Figure 43. Optionally, slaves may hold the SCL line LOW to slow down the
timing on the I2C bus.
13.3 Programming
To configure and use the I2C Controller, follow the simple sequence of steps below:
1. Set up the GPIOs to be used for the I2C interface (P0x_MODE_REG[PID] = 9 or 10).
2. Enable the clock for the I2C Controller (CLK_PER_REG[I2C_ENABLE] = 0x1).
3. Disable the I2C Controller (I2C_ENABLE_REG = 0).
4. Configure the I2C clock frequency:
a. Standard mode (100 kbit/s) : I2C_CON_REG[I2C_SPEED] = 1.
b. Full speed mode (400 kbit/s) : I2C_CON_REG[I2C_SPEED] = 2.
5. Setup the I2C Controller as:
a. Master: I2C_CON_REG[I2C_MASTER_MODE] = 1 and
I2C_CON_REG[I2C_SLAVE_DISABLE] = 1.
b. Slave: I2C_CON_REG[I2C_MASTER_MODE] = 0 and
I2C_CON_REG[I2C_SLAVE_DISABLE] = 0.
6. Choose whether the controller starts its transfers in the 7-bit or 10-bit addressing format when
acting as a master (I2C_CON_REG[I2C_10BITADDR_MASTER]) or whether the controller
responds to the 7-bit or 10-bit addresses when acting as a slave
(I2C_CON_REG[I2C_10BITADDR_SLAVE]).
7. Set target slave address in:
a. Master mode (I2C_TAR_REG[IC_TAR] = 0x55 (default)).
b. Slave mode (I2C_SAR_REG[IC_SAR] = 0x55 (default)).
8. Set the threshold levels on RX and TX FIFO (I2C_RX_TL_REG and I2C_TX_TL_REG).
9. Enable the required interrupts (I2C_INTR_MASK_REG).
10. Enable the I2C Controller (I2C_ENABLE_REG = 0x1).
11. Read a byte:
a. Prepare to transmit the read command byte (I2C_DATA_CMD_REG[I2C_CMD] = 1).
b. Wait until TX FIFO is empty (I2C_STATUS_REG[TFE] = 1).
c. Wait until master has finished reading the byte from slave device
(I2C_STATUS_REG[MST_ACTIVITY] = 0).
12. Write a byte:
a. Prepare to transmit the write command byte (I2C_DATA_CMD_REG[I2C_CMD] = 0 and
I2C_DATA_CMD_REG[I2C_DAT] = command byte).
b. Wait until TX FIFO is empty (I2C_STATUS_REG[TFE] = 1).
c. Wait until master has finished reading the response byte from slave device
(I2C_STATUS_REG[MST_ACTIVITY] = 0).
14 UART
14.1 Introduction
The DA14531 contains two instances of the UART block, that is, UART and UART2.
The UART is compliant to the industry-standard 16550 and is used for serial communication with a
peripheral. Data is written from a master (CPU) over the APB bus to the UART and it is converted to
the serial form and transmitted to the destination device. Serial data is also received by the UART
and stored for the master (CPU) to read back.
There is also DMA support on the UART block, thus the internal FIFOs can be used. Only UART
supports the hardware flow control signals (RTS and CTS) and the 9-bit mode.
UART
pclk UART2
FIFO
Block
APB
APB Bus
Interface
Register uart_int
Block
cts_n
rts_n } UART only
Sync
Block Timeout
Detector
Baud
Clock
uart_clk Generator
Features
● 16-byte transmit and receive FIFOs
● Hardware flow control (CTS/RTS) (UART only)
● Shadow registers to reduce software overhead and a software programmable reset is included
● Transmitter Holding Register Empty (THRE) interrupt mode
14.2 Architecture
Bit Time
ʃʃ ʃʃ
Serial Data Start Data bits 5-8 Parity Stop 1, 1.5, 2
ʃʃ
One Character
Start
An additional parity bit may be added to the serial character. This bit appears after the last data bit
and before the stop bit(s) in the character structure to provide the UART with the ability to perform
simple error checking on the received data.
The UART Line Control Register (UART_LCR_REG) is used to control the serial character
characteristics. The individual bits of the data word are sent after the start bit, starting with the least-
significant bit (LSB). These are followed by the optional parity bit and then by the stop bit(s), which
can be of 1, 1.5, or 2 bits.
All the bits in the transmission (except the half stop bit when the 1.5 stop bits are used) are
transmitted for exactly the same time duration. This is referred to as a Bit Period or Bit Time. One Bit
Time equals to 16 baud clocks. To ensure stability on the line, the receiver samples the serial input
data at approximately the mid-point of the Bit Time, once the start bit has been detected. As the
exact number of baud clocks that each bit has been transmitted for is known, the mid-point for
sampling is every 16 baud clocks after the mid-point sample of the start bit. Figure 46 shows the
sampling points of the first couple of bits in a serial character.
8 16 16
As part of the 16550 standard, an optional baud clock reference output signal (baudout_n) is
supplied to provide timing information to the receiving devices that require it. The baud rate of the
UART is controlled by the serial clock (sclk or pclk in a single clock implementation) and the Divisor
Latch Register (DLH and DLL) in the following equation:
where the divisor is a 16-bit integer value plus 4-bit fractional value. The divisor range is 0 to
65535,9375 with steps of 1/16. Divisor High 8-bit integer part is in the DLH register. Divisor Low 8-bit
integer part is in the DLL register. Divisor 4-bit fractional port is in the DLF register.
The registers settings for the common baud rate values are presented in Table 46.
14.2.3 Interrupts
The assertion of the UART interrupt (UART_INT) occurs whenever one of the several prioritized
interrupt types are enabled and active. The following interrupt types can be enabled with the IER
register:
● Receiver Error
● Receiver Data Available
● Character Timeout (in FIFO mode only)
● Transmitter Holding Register Empty at/below threshold (in Programmable THRE interrupt mode)
When an interrupt occurs, the master accesses the UART_IIR_REG to determine the source of the
interrupt before dealing with it accordingly. These interrupt types are described in more detail in
Table 47.
Even if everything else is selected and enabled, if the FIFOs are disabled via FCR[0], the
Programmable THRE Interrupt mode is also disabled. When not selected or disabled, THRE
interrupts and LSR[5] function normally (both reflecting an empty THR or FIFO). The flowchart of
THRE interrupt generation when not in programmable THRE interrupt mode is shown in Figure 48.
N
N
THRE Interrupt
Enabled?
Y
N
SET INTR
Figure 47: Flowchart of Interrupt Generation for Programmable THRE Interrupt Mode
Y
N
THRE Interrupt
Enabled?
Y
Under the condition that N
there are no other pending SET INTR
interrupts, the interrupt
signal (intr) is asserted
Figure 48: Flowchart of Interrupt Generation When Not in Programmable THRE Interrupt Mode
14.3 Programming
To configure and use the UART controllers, follow the simple sequence of steps below:
1. Set up the GPIOs to be used for the UART interface (P0x_MODE_REG[PID] = 1 to 4 and/or 19-
20).
2. Enable the selected UART by setting the CLK_PER_REG[UARTx_ENABLE] bit.
Datasheet Revision 3.1 09-Jul-2020
3. Enable access to Divisor Latch Registers (DLL and DLH) by setting the
UARTx_LCR_REG[UART_DLAB] bit.
4. Set the desired baud rate. To calculate the registers values for the desired baud rate, use the
following equation:
15 SPI Interface
15.1 Introduction
This controller implements the Serial Peripheral Interface (SPI™)1 for master and slave modes. The
serial interface can transmit and receive from four bits to up to 32 bits in master/slave mode. The
controller comprises separate TX and RX FIFOs and DMA handshake support. Slave mode clock
speed is independent from the system clock speed. Moreover, master's clock speed can be as fast
as the system's clock speed. The controller can generate an interrupt upon data threshold reached in
the TX or RX FIFOs.
Features
● Slave and master mode
● From 4-bit to up to 32-bit operation
● SPI Master clock line speed up to 32 MHz, SPI Slave clock line speed up to 16 MHz
● SPI mode 0, 1, 2, and 3 support (clock edge and phase)
● Built-in separate 8-bit wide and 4-byte deep RX/TX FIFOs for continuous SPI bursts
● Maskable interrupt generation based on TX or RX FIFO thresholds
● DMA support
APB
INTERRUPT
DMA_TX_REQ
DMA_RX_REQ TX fifo RX fifo Configuration
8bits width 8bits width registers
DMA_TX_ACK X depth Y depth
DMA_RX_ACK
TX buffer RX buffer
Spi core
TX shift RX shift
register register
DO enable
CS0
DO
CS1
DI
15.2 Architecture
The SPI controller is an APB peripheral operating on the apb_clk clock. It contains a front end which
is clocked by the spi_clk clock and is responsible for the serialization/deserialization of the data in the
RX and TX streams.
Two separate FIFOs, each of eight bits wide and four bytes deep, are used to store data for RX and
TX streams. Since a SPI word can be configured to be from four bits to up to 32 bits, one to four
FIFO positions can be written/read at the same time. FIFOs contain logic implementing
programmable thresholds comparison.
The SPI controller supports DMA requests and interrupt generation based on the FIFO thresholds. If
enabled, a DMA request and/or interrupt will be asserted with whether TX_FIFO level is low or
RX_FIFO level is high.
The SPI interface supports all four modes of operation and the corresponding polarity (CPOL) and
phase (CPHA) of the SPI clock (SPI_CLK) are defined in Table 48.
To read from or to write to an external single byte FLASH device in the SPI master mode, a byte
swap mechanism is implemented to allow for a proper placement of the bytes in a 16-bit word for the
DMA to write to/read from the internal RAM. More specifically, when the SPI controller is configured
as a master with DMA support and a 16-bit word width so that the bus utilization is increased
compared to reading from an 8-bit device, the byte swap mechanism brings the least significant byte
read and place it in the most significant byte in the 16-bit word. The controller automatically swaps
the bytes to allow for placing the first byte read in the least significant byte of the 16-bit word. This
feature is programmable via SPI_CTRL_REG[SPI_SWAP_BYTES].
The SPI controller can operate at the highest speed (32 MHz on the SPI_CLK line) in a special
master mode. The clock of the controller is then either the XTAL32M or the RC32M and can be used
for fast booting from external FLASH devices that support this frequency.
15.3 Programming
16 Quadrature Decoder
16.1 Introduction
The DA14531 has an integrated Quadrature decoder that can automatically decode the signals for
the X, Y, and Z axes of a HID input device, reporting step count and direction. It can also be
programmed to simply count rising/falling edges on any of the channel pairs. This block can be used
to wake up the chip as soon as there is a movement from the connected external device. The block
diagram of the quadrature decoder is presented in Figure 51.
Features
● Three 16-bit signed counters that provide the step count and direction on each of the axes (X, Y,
and Z) and one 8-bit counter counting the overall edges from all the three counters
● Programmable system clock sampling at a maximum of 16 MHz
● APB interface for control and programming
● Programmable source from the GPIOs
● Digital filter on the channel inputs to avoid spikes
APB Interface
Register File
QD_CHA_X
Digital
16-bit Counter
Filter
QD_CHB_X (X Axis)
QD_CHA_Y
Digital
16-bit Counter
Filter
QD_CHB_Y (Y Axis)
QD_CHA_Z
Digital
16-bit Counter
Filter
QD_CHB_Z (Z Axis)
Quad_Dec_IRQn
Interrupt Generator
16.2 Architecture
Channels are expected to provide a pulse train with 90 degrees rotation as displayed in Figure 52
and Figure 53.
QD_CHA_X
QD_CHB_X
QD_CHA_X
QD_CHB_X
Depending on whether channel A or channel B is leading in phase, the quadrature decoding block
calculates the direction on the related axis. Furthermore, the signed counter value represents the
number of steps moved.
Users can choose which GPIOs to use for the channels by programming the QDEC_CTRL2_REG
register. The block supports two modes of operation: quadrature counting and edges counting. The
quadrature counting mode reads the patterns of successive pulses as in Figure 52 and Figure 53,
while the edges counting mode simply counts all positive and negative edges on any of the two
channels of a pair.
NOTE
If two edges happen at the same time, the counter will only count one.
The digital filter eliminates the spikes shorter than three clock periods. It is followed by an edge
detection circuitry and they are shown in Figure 54.
QDEC_CHx_EVENT_MODE
J Q
D Q
Cnt_dir 16bit Counter
K
ChA_x D Q D Q D Q D Q X-Axis
J Q
D Q
Cnt_en
K 8bit Counter
ChB_x D Q D Q D Q D Q QDEC_EVENT_CNT
QDEC_CHy_EVENT_MODE
J Q
D Q
Cnt_dir
K 16bit Counter
ChA_y D Q D Q D Q D Q
Y-Axis
J Q
D Q
Cnt_en
K
ChB_y D Q D Q D Q D Q
A counter for its dedicated axis holds the movement events of the channels. When a channel is
disabled, the counter is reset. The counters are accessible via the APB bus.
The QDEC_EVENT_CNT gathers all edges on all channels regardless of the mode of operation. If
two edges happen at the same time, this counter will only be increased by one.
The quadrature decoder operates on the system clock. The QDEC_CLOCKDIV register defines the
number of clock cycles during which the decoding logic samples the data on the channel inputs. The
division is automatically disabled when the lp_clk is used as the system clock.
16.3 Programming
To program the quadrature decoder for actual quadrature counting or edge counting, follow the
simple sequence of steps below:
1. Configure the clock frequency by configuring the QDEC_CLOCKDIV register. The value in this
register will be dividing the sys_clk. However, if sys_clk = lp_clk, this divider is completely
bypassed.
2. Define which pin pairs represent the different channels for the X, Y, and Z axes or the GPIOs
from which the edges are counted. Configure such information at QDEC_CHX_PORT_SEL,
QDEC_CHY_PORT_SEL, and QDEC_CHZ_PORT_SEL registers.
3. Configure the interrupt threshold upon which an interrupt will be generated at
QDEC_CTRL_REG[QDEC_IRQ_THRES]. Note that the interrupt threshold is based on the value
of QDEC_EVENT_CNT_REG which keeps on counting after the interrupt is generated.
4. Define the mode of operation by configuring the respective QDEC_CHx_EVENT_MODE field in
the QDEC_CTRL2_REG.
5. Enable the clock of the block by writing at CLK_PER_REG[QUAD_ENABLE].
6. Wait for the interrupt and then read X, Y, and Z values at QDEC_XCNT_REG,
QDEC_YCNT_REG, and QDEC_ZCNT_REG (in the quadrature counting case) or the
QDEC_EVENT_CNT_REG (in the edges counting case).
7. Clear the interrupt (by writing at QDEC_CTRL_REG[QDEC_IRQ_STATUS]) and the edge
counter (by writing at QDEC_CTRL_REG[QDEC_EVENT_CNT_CLR) if needed.
17.1 Introduction
The Clockless Wakeup Controller implements a circuit that enables the RC32K clock which in turn
triggers the HW Startup FSM to allow the system to be woken up by an external event (a GPIO
toggle). This controller is only used when the system is in hibernation mode, that is, when all clocks
are stopped.
Features
● Wake up the system from specific GPIOs (P0_1, P0_2, P0_3, P0_4, and P0_5)
● Configurable polarity of the GPIO signals (single configuration for all GPIOs)
● Special RC filtered inputs feeding the wakeup control circuit (Type B pads)
● Always powered
RC Filtered Non-Filtered
Outputs Outputs => to PPA
P0_1
P0_2
Enable clock
P0_3 FF RC32KHz
Fast_mode
P0_4
Start Up
HIBERN_WKUP_POLARITY FSM
P0_5
HIBERN_WKUP_MASK
17.2 Architecture
The Clockless Wakeup Controller automatically enables the RC32K oscillator when a toggle is
identified in one of the five specific GPIOs (P0_1, P0_2, P0_3, P0_4, and P0_5). These GPIO
signals are connected to the Type B pads, which provide two outputs to the digital domain. One
output goes through a Schmitt trigger and the other one goes through an RC filter with a cutoff
frequency of 100 kHz and a Schmitt trigger. The output going through the RC filter and a Schmitt
trigger feeds the clockless wakeup controller circuitry. Hence, any spikes larger than 100 kHz will be
filtered out without waking up the system.
The triggering GPIO can be defined by means of a masking register. If no GPIO is masked out, any
toggle in any of these GPIOs will create an edge which serves as a clock for a Flip-Flop to lock and
enable the oscillator. The polarity of the edge is also programmable, but it is common for the GPIOs
and not a dedicated bit per GPIO.
Note that, if two opposite edges occur exactly at the same time on two GPIOs that are allowed to
wake up the system, the XOR output will not change its value and no wake up occurs. However,
even if the GPIO signal events have a couple of ns difference, the circuit will still understand it and
the clock will be started.
17.3 Programming
To program the clockless wakeup controller before setting the system into hibernation mode, follow
the simple sequence of steps below:
1. Define which pins are allowed to wake up the system from hibernation by configuring the
HIBERN_CTRL_REG[HIBERN_WKUP_MASK].
2. Define the polarity of the waking up events at
HIBERN_CTRL_REG[HIBERN_WKUP_POLARITY]. This should be done by reading the value of
the unmasked G I s and programming the polarity register with their R’ed state.
3. Enable the hibernation mode by programming the
HIBERN_CTRL_REG[HIBERNATION_ENABLE] bit field. Note that this action stops all clocks
when the system drops to sleep.
4. Allow RAM to be retained by programming the RAM_PWR_CTRL_REG accordingly.
5. Define where address 0 is to be mapped at SYS_CTRL_REG[REMAP_ADR0] so that the CPU
can execute code right after waking up. If RAM is retained, REMAP_ADR0 should point to 0x2 or
0x3.
6. Clear RESET_STAT_REG. Clear this register means that the system wakes up from the
hibernation mode.
7. Put the system to sleep by executing the WFI command with the SCR bit set.
18.1 Introduction
The Clocked Wakeup Controller can be programmed to wake up the DA14531 from deep sleep
mode and extended sleep mode upon a pre-programmed number of GPIO events on a maximum of
two pins in parallel. This wakeup controller resides in the PD_SLP power domain and operates on
the LP_CLK.
The block diagram illustrating the wakeup function is shown in Figure 56.
Features
● Monitors GPIO state changes
● Implements debouncing time from 0 ms up to 63 ms on two GPIOs in parallel
● Accumulates external events and compares the number to a programmed value
● Generates an interrupt to the CPU's WIC
P0_0 WKUP_COMPARE_REG
wkup_pol_gpio_reg[0]
wkup_select_gpio_reg[0] Key_hit
.
. D Q D Q
Debounce Events
. Counter Counter
P0_x
WKUP_ENABLE_IRQ
wkup_pol_gpio_reg[x]
wkup_select_gpio_reg[x]
WKUPCT_IRQ
P0_0
wkup2_pol_gpio_reg[0]
WKUP2_ENABLE_IRQ
wkup2_select_gpio_reg[0]
. Key_hit
. D Q D Q
Debounce Events
. Counter Counter
P0_x
wkup2_pol_gpio_reg[x]
wkup2_select_gpio_reg[x] WKUP_COMPARE_REG
18.2 Architecture
The controller comprises two identical circuits that implement the edge detection, debouncing, and
event counting before generating a wakeup interrupt towards the CPU.
A LOW to HIGH level transition on the selected input port sets internal signal "key_hit" to 1, while
WKUP_POL_GPIO_REG[y] = 0. This signal triggers the event counter state machine as shown in
Figure 57. The debounce counter is loaded with the value of
WKUP_CTRL_REG[WKUP_DEB_VALUE]. The timer counts down every 1 ms. The signal state is
constantly monitored. If the debounce counter reaches 0, it means that the key_hit signal state has
been stable over the amount of clock cycles counted by the debounce counter.
RST
IDLE
key_hit = 1
timer = DEBOUNCE
key_hit = 0 key_hit = 0
timer not 0
KEY_PRESSED
key_hit = 1
KEY_RELEASE key_hit = 1 and
timer = 0
event_count = event_count + 1
Figure 57: Event Counter State Machine for the Wakeup Interrupt Generator
The event counter is edge sensitive. After an active edge is detected, a reverse edge must be
detected first before the event counter goes back to the IDLE state and from there starts waiting for a
new active edge.
If the event counter is equal to the value set in the WKUP_COMPARE_REG register, the counter will
be reset and an interrupt will be generated, if the interrupt generation has been enabled by
WKUP_ENABLE_IRQ and WKUP2_ENABLE_IRQ in the WKUP_CTRL_REG.
NOTE
There is only one register for both circuits that contains the number of events before an interrupt is issued.
The interrupt can be cleared by writing a value to the register WKUP_RESET_IRQ_REG. The event
counter can be reset by writing a value to the register WKUP_RESET_CNTR_REG. The value of the
event counter can be read at any time by reading register WKUP_COUNTER_REG.
Any of the GPIO inputs can be selected to generate an event by programming the corresponding
WKUP/WKUP2_SELECT_GPIO_REG register. When both WKUP/WKUP2_SELECT_GPIO_REG
registers are configured to generate a wakeup interrupt, a toggle on any GPIO will wake up the
system.
The input signal edge can be selected by programming the WKUP/WKUP2_POL_GPIO_REG
registers.
NOTE
A minimum of 2 low power clocks pulse is required on a GPIO in order to be correctly identified as a wake up
edge trigger
18.3 Programming
To configure the clocked wakeup controller, follow the simple sequence of steps below:
1. Define the polarity of the triggering GPIOs at WKUP/WKUP2_POL_GPIO_REG.
2. Configure the debouncing counters by programming WKUP_CTRL_REG[WKUP_DEB_VALUE]
with the amount of time (ms) during which the signal should be re-sampled before its state is
decided. Note that there is a single bit field for both debouncing counters.
3. Define the number of events that are needed to trigger the wakeup interrupt by programming the
WKUP_COMPARE_REG. Note there is only one register for both circuits.
4. Allow the interrupt generation by configuring the WKUP_ENABLE_IRQ and
WKUP2_ENABLE_IRQ bit fields, respectively, in the WKUP_CTRL_REG.
5. Define which GPIOs are allowed to trigger a wakeup event at
WKUP/WKUP2_SELECT_GPIO_REG.
Datasheet Revision 3.1 09-Jul-2020
6. Set the system to deep sleep mode or extended sleep mode by executing the WFI command with
the SCR bit set.
19 Timer 0
19.1 Introduction
Timer 0 is a 16-bit general purpose software programmable timer, which has the ability of generating
Pulse Width Modulated (PWM) signals PWM0 and PWM1. It also generates the SWTIM_IRQ
interrupt to the Arm Cortex-M0+. It can be configured in various modes regarding output frequency,
duty cycle, and the modulation of the PWM signals. Figure 58 shows the block diagram of Timer 0.
Features
● 16-bit general purpose timer
● Ability to generate two PWM signals (PWM0 and PWM1)
● Programmable output frequency (f) with N = 0 to (216-1) and M = 0 to (216-1)
f = (------------------------------------------------------------------
16, 8, 4, 2 MHz or 32 kHz)
------
( M + 1 ) + (N + 1)
T = (----------------------------------------------------------------
16, 8, 4, 2 MHz or 32 kHz)
--------
( ON + 1 )
19.2 Architecture
The 16-bit Timer 0 consists of two counters, that is, T0-counter and ON-counter, and three registers,
that is, TIMER0_RELOAD_M_REG, TIMER0_RELOAD_N_REG, and TIMER0_ON_REG. Upon
Datasheet Revision 3.1 09-Jul-2020
reset, the counter and register values are 0x0000. Timer 0 generates a PWM signal PWM0, of which
the frequency and duty cycle are determined by the contents of the TIMER0_RELOAD_N_REG and
the TIMER0_RELOAD_M_REG registers. The PWM1 signal is the inverted version of PWM0.
Timer 0 can run at five different clocks: 16 MHz, 8 MHz, 4 MHz, 2 MHz, or 32 kHz. The 32 kHz clock
is selected by default with bit TIM0_CLK_SEL in the TIMER0_CTRL_REG register. This slow clock
has no enabling bit. The other four options can be selected by setting the TIM0_CLK_SEL bit and the
TMR_ENABLE bit in the CLK_PER_REG (by default the TMR_ENABLE bit is disabled). This register
also controls the four higher clock frequency on which Timer 0 runs via the TMR_DIV bits. An extra
clock divider is available and can be activated via bit TIM0_CLK_DIV of the timer control register
TIMER0_CTRL_REG. This clock divider is only used for the ON-counter and always divides the
clock for the ON-counter by 10.
NOTE
If the LP clock is selected as system clock, the CLK_AMBA_REG[HCLK] bit field should always be 0 to
ensure the proper operation of the timer.
Timer 0 operates in PWM mode. The signals PWM0 and PWM1 can be mapped to any GPIOs.
Timer 0 PWM Mode
If bit TIM0_CTRL in the TIMER0_CTRL_REG is set, Timer 0 will start running. SWTIM_IRQ will be
generated and the T0-counter will load its start value from the TIMER0_RELOAD_M_REG register
and will decrement on each clock cycle. The ON-counter also loads its start value from the
TIMER0_ON_REG register and decrements with the selected clock.
When the T0-counter reaches zero, the internal signal T0-toggle will be toggled to select the
TIMER0_RELOAD_N_REG whose value will be loaded in the T0-counter. Each time the T0-counter
reaches zero, it will alternately be reloaded with the values of the M0- and N0-shadow registers.
PWM0 will be high when the M0-value decrements and low when the N0-value decrements. For
PWM1 the opposite is applicable since it is inverted. If bit PWM_MODE in the TIMER0_CTRL_REG
register is set, the PWM signals are not HIGH during the "high time" but output a clock in that stage.
The frequency is based on the clock settings defined in the CLK_PER_REG register (also when the
32-kHz clock is used), but the selected clock frequency is divided by two to get a 50 % duty cycle.
If the ON-counter reaches zero, it will remain zero until the T0-counter also reaches zero, while
decrementing the value loaded from the TIMER0_RELOAD_N_REG register (PWM0 is low). The
counter will then generate an interrupt (SWTIM_IRQ). The ON-counter will be reloaded with the value
of the TIMER0_ON_REG register. The T0-counter as well as the M0-shadow register will be loaded
with the value of the TIMER0_RELOAD_M_REG register. At the same time, the N0-shadow register
will be loaded with the value of TIMER0_RELOAD_N_REG register. Both counters will be
decremented on the next clock again and the sequence will be repeated.
NOTE
It is possible to generate interrupts at a high rate by selecting a high clock frequency and low counter values.
This could result in missed interrupt events.
During the time when the ON-counter is non-zero, new values for the ON-register, M0-register, and
N0-register can be written, but they are not used by the T0-counter until a full cycle is finished. More
specifically, the newly written values in the TIMER0_RELOAD_M_REG and
TIMER0_RELOAD_N_REG registers are only stored into the shadow registers when the ON-counter
and the T0-counter have both reached zero and the T0-counter is decrementing the value loaded
from the TIMER0_RELOAD_N_REG register (Figure 59).
clk
TIM0_CTRL
M N M N M N
T0-counter 0 1 0 1 0 1 0 1 0 1 0 1
ON-counter 0 4 3 2 1 0 4 3 2
PWM0 pin
PWM1 pin
SWTIM_IRQ
M0=1 N0=1 ON=4
TIM0580-01
At start-up both counters and the PWM0 signal are LOW, so at start-up an interrupt is also
generated. If Timer 0 is disabled, all flip-flops, counters, and outputs are in reset state except the ON-
register, the TIMER0_RELOAD_N_REG register, and the TIMER0_RELOAD_M_REG register.
The timer input registers, that is, ON-register, TIMER0_RELOAD_N_REG, and
TIMER0_RELOAD_M_REG can be written, and the counter registers ON-counter and T0-counter
can be read. When reading from the address of the ON-register, the value of the ON-counter is
returned. Reading from the address of either the TIMER0_RELOAD_N_REG or the
TIMER0_RELOAD_M_REG register returns the value of the T0-counter.
It is possible to freeze Timer 0 with bit FRZ_SWTIM of the register SET_FREEZE_REG. When the
timer is frozen, the timer counters are not decremented. This will freeze all the timer registers at their
last value. The timer will continue its operation again when bit FRZ_SWTIM is cleared via register
RESET_FREEZE_REG.
19.3 Programming
When LP clock is selected as system clock, CLK_AMBA_REG[HCLK_DIV] should be set to 0.
When LP clock is selected as Timer clock, CLK_PER_REG[TMR_DIV] should be set to 0
20 Timer 1
20.1 Introduction
Timer 1 is an 11-bit timer that can count up or down. It supports a free-running mode with an interrupt
generated when zero is reached (also by wrapping around). It can be configured to use the system
clock (sys_clk) or the LP clock (lp_clk) as the clock source. It supports capturing events on two GPIO
channels when the number of clock cycles between these events is known. It can also generate an
interrupt after a programmable number of clock cycles after an event. Figure 60 shows the block
diagram of Timer 1.
Features
● 11-bit up/down counter with free running mode
● Selectable system or LP clock as source
● Two channels for capture input triggered by GPIOs
● Capture capability from two GPIO events with programmable polarity
● Programmable number of events between the two GPIOs for capturing
● Timer 1 or RTC snapshot on capture events
● Interrupt generation
RTC_Timer_Value
22
sys_clk
COUNTER (Up/Down)
Lp_clk
CAPCNT1_VALUE
TIMER_VALUE TIM_RELOAD GPIO_IN1
TIMER_CTRL
Capture Event
TIMER1_STATUS_REG CAPCNT2_VALUE
CLEAR_GPIO_EVENT IN2_PERIOD_MAX
TIM1_IRQn
IRQ
CLEAR_IRQ IN1_OVRFLW IN2_OVRFLW
Generator
20.2 Architecture
Timer 1 is placed in the PD_TIM power domain which can be kept powered even when the system
power domain (containing the CPU) is shut down.
The main operation of Timer 1 is to count up or down, generating an interrupt when it reaches the
maximum/minimum value or the threshold that has been programed as the reload value.
Moreover, Timer 1 comes with a sense block that allows for sensing positive or negative edges on
two GPIOs (configurable). The sense block operates in two modes:
● Counting mode: Timer1 will generate an interrupt upon a configurable amount of edges on a
GPIO has been detected. The number of clock cycles was counted between timer start and
captured the N - events is stored to CAPCNTx_VALUE register. When timer detects the first N-
events, automatically starts to detect the next N-events until timer is disabled
● Capture mode: Timer 1 saves a snapshot of either its own counter (11 bits) or the RTC port (22
bits) after an edge on a GPIO has been detected. If there is a pending interrupt, a new snapshot
is not saved and the TIMER1_STATUS_REG[TIMER1_INx_OVRFLW] bit is set. This bit is
cleared together with the TIMER1_STATUS_REG[TIMER1_Inx_EVENT] bit
The same GPIO can be used for both modes.
If Timer 1 is used in the counting mode, it can measure the frequency applied to a GPIO port (see
section 20.3.3).
20.3 Programming
When LP clock is selected as system clock, CLK_AMBA_REG[HCLK_DIV] should be set to 0.
5. Set the number of periods plus one, in which Timer 1 counts, by setting
TIMER1_CAPTURE_REG[TIMER1_IN1_PERIOD_MAX] or
TIMER1_CAPTURE_REG[TIMER1_IN2_PERIOD_MAX], depending on the channel that is used.
6. Set the GPIO that will be used to trigger the capture by setting
TIMER1_CAPTURE_REG[TIMER1_GPIO1_CONF] or
TIMER1_CAPTURE_REG[TIMER1_GPIO1_CONF], depending on the channel that is used.
Note that the values from 1 to 12 define the P0 pins from 0 to 11.
7. After the interrupt is triggered, read the value in
TIMER1_CAPCNT1_VALUE_REG[TIMER1_CAPCNT1_VALUE] or
TIMER1_CAPCNT2_VALUE_REG[TIMER1_CAPCNT2_VALUE], depending on the channel that
is used. This value indicates the number of cycles that has passed during the period defined in
step 5.
8. To calculate the frequency applied to the GPIO, divide the number of periods (step 5) by the
cycles (step 7) and multiply the result with the frequency of Timer 1 clock.
9. Write 1 to TIMER1_CLR_EVENT_REG[TIMER_CLR_Inx_EVENT] to clear the event.
21 Timer 2
21.1 Introduction
Timer 2 is basically a PWM generator. It has six PWM outputs. The block diagram is shown in Figure
61.
13 0 13 0
13 0
PWM2_START_CYCLE ... PWM7_START_CYCLE
TRIPLE_PWM_FREQ PWM2_END_CYCLE PWM7_END_CYCLE
6 x 14 bits T2_PWM1
Comparators
14 bits
sys_clk DIV
...
1/2/4/8 DUTY_CNTR
reset T2_PWM6
Hold
+1
/Reset block
TRIPLE_PWM_ENABLE
TRIPLE_PWM_CTRL_REG
SW_PAUSE_EN
RX_EN HW_PAUSE_EN
TRIPLE_PWM_CTRL_REG
TX_EN
Features
fIN = sys_clk
-------------------
N
f IN fIN
fOUT = ------ to -----------------
-
2 2 14 – 1
21.2 Architecture
Timer 2 is clocked with the system clock divided by TMR_DIV (1, 2, 4, or 8) and can be enabled with
TRIPLE_PWM_CTRL_REG[TRIPLE_PWM_ENABLE].
TRIPLE_PWM_FREQUENCY determines the output frequency of the PWM outputs.
NOTE
There is a single frequency register for all six PWM outputs.
TMR2_CLK
TRIPLE_PWN_ENABLED
DUTY_CNTR 0 0 1 2 3 8 9 ... 0 1 2 3
T2_PWMn
21.3 Programming
When LP clock is selected as system clock, CLK_AMBA_REG[HCLK_DIV] should be set to 0.
When LP clock is selected as Timer clock, CLK_PER_REG[TMR_DIV] should be set to 0
Timer2_clk_freq_Hz/Required_freq_Hz − 1 (4)
NOTE
There is a single frequency register for all six PWM outputs.
4. Define the duty cycle of each PWM signal. Program the start and end cycle of the pulse at
PWMx_START_CYCLE and PWMx_END_CYCLE, respectively. The available amount of cycles
is depicted in the contents of TRIPLE_PWM_FREQUENCY register. For example, if the
TRIPLE_PWM_FREQUENCY has a value of 0x8 and the START/END_CYCLE bit fields have a
value of 3 and 5, respectively, the PWM signals will rise after three Timer 2 clock cycles and fall
after five clock cycles. Every PWM signal has its own register to configure its duty cycle.
5. Enable the PWM signals by programming TRIPLE_PWM_CTRL_REG[TRIPLE_PWM_ENABLE]
= 1.
22 Watchdog Timer
22.1 Introduction
The Watchdog Timer is an 8-bit timer with a sign bit that can be used to detect an unexpected
execution sequence caused by a software run-away and can generate a full system reset (WDOG
reset) or a Non-Maskable Interrupt (NMI). Figure 63 shows the block diagram of the Watchdog
Timer.
Features
● 8-bit down counter with a sign bit, clocked with a 10.24 ms clock for a maximum 2.6 s time-out
● Non-Maskable Interrupt (NMI) or WDOG reset
● Optional automatic WDOG reset if NMI handler fails to update the Watchdog register
● Non-maskable Watchdog freeze of the Cortex-M0+ Debug module when the Cortex-M0+ is
halted in Debug state. Maskable Watchdog freeze by user program
22.2 Architecture
The 8-bit watchdog timer is decremented by 1 every 10.24 ms. The timer value can be accessed
through the WATCHDOG_REG register which is set to 255 (FF16) at reset. This results in a
maximum watchdog time-out of ~2.6 s. During write access, the WATCHDOG_REG[WDOG_WEN]
bit must be 0. This provides extra filtering for a software run-away by writing ones to all the bits in the
WATCHDOG_REG. If the watchdog timer reaches 0, its value will get a negative value by setting bit
8. The counter sequence becomes 1, 0, 1FF16 (-1), 1FE16(-2), till 1F016 (-16).
If WATCHDOG_CTRL_REG[NMI_RST] = 0, the watchdog timer will generate an NMI when it
reaches 0 and a WDOG reset when it becomes less or equal to -16 (1F016). The NMI handler must
write a value that is larger than -16 to the WATCHDOG_REG to prevent the generation of a WDOG
reset when the watchdog timer reaches the value -16 after 16 × 10.24 = 163.8 ms.
If WATCHDOG_CTRL_REG[NMI_RST] = 1, the watchdog timer generates a WDOG reset when it
becomes less than or equal to 0.
The WDOG reset is one of the system (SYS) reset sources and resets almost the whole device,
including resetting the WATCHDOG_REG register to 255. Refer to the POR, HW, and SW Reset
section for an overview of the complete reset circuit and conditions.
For debugging purposes, the Cortex-M0+ Debug module can always freeze the watchdog by setting
the DHCSR[DBGKEY | C_HALT | C_DEBUGEN] control bits (reflected by the status bit S_HALT, see
Datasheet Revision 3.1 09-Jul-2020
Table 42). This is automatically done by the debugging tool, for example, during step-by-step
debugging. Note that this bit also freezes the Wake-up Timer, the Software Timer, and the BLE
master clock. For additional information see the DEBUG_REG[DEBUGS_FREEZE_EN] mask
register. The C_DEBUGEN bit cannot be accessed by the user software so that freezing the
watchdog is prevented.
In addition to the S_HALT bit, the watchdog timer can also be frozen if NMI_RST = 0 and
SET_FREEZE_REG[FRZ_WDOG] is set to 1. The watchdog timer resumes counting when
RESET_FREEZE_REG[FRZ_WDOG] is set to 1. The WATCHDOG_CTRL_REG[NMI_RST] bit can
only be set by software and will only be reset on a SYS reset. Note that if the system is not
remapped, that is, the SysRAM is at address 0x07FC0000, a watchdog fire will trigger the BootROM
code to be executed again.
22.3 Programming
To program the Watchdog Timer, follow the simple sequence of steps below:
1. Freeze watchdog by setting the SET_FREEZE_REG[FRZ_WDOG] bit (optional).
2. Select NMI and reset events (WATCHDOG_CTRL_REG[NMI_RST]).
3. Enable writing of the watchdog timer (WATCHDOG_REG[WDOG_WEN] = 0]).
4. Write the reload value of the watchdog timer (WATCHDOG_REG[WDOG_VAL], see the register
description).
5. Resume watchdog (RESET_FREEZE_REG[FRZ _WDOG] = 1), if frozen.
23 Temperature Sensor
23.1 Introduction
The DA14531 features a built-in temperature sensor.
Features
● Temperature range -40°C to 105°C
● Absolute accuracy after one-point calibration +/- 4°C (assuming 25°C reference temperature)
● 25°C single point calibration reference value provided in T memory
23.2 Architecture
The temperature sensor can be read out via the GP_ADC.
Figure 64 illustrates the relationship between the actual ambient temperature and the calculated
temperature from the GP_ADC readout, including possible inaccuracies in T SENSE_ACC_OTP (offset) and
TCSENSE (angle).
The recommended formula for single point calibrated temperature reading is as follows:
Tx = 25 + (ADCx - ADCOTP_CAL_25C)/(TCSENSE × 64)
Where:
● Tx = calculated single point calibrated die temperature in [°C]
● ADCx = 16-bit GP_ADC_VAL readout (converted to decimal) at temperature Tx
● ADCOTP_CAL_25C = 25°C T calibration value recorded during production testing (based on the
16-bit readout)
● TCSENSE = temperature coefficient in [LSB °C], typical value is 1.45 LSB °C
● 25 = reference base value in [°C]
● 64 = correction for 16-bit to 10-bit ADC values
For uncalibrated temperature sensor measurements, ADCOTP_CAL25C can be replaced by the default
value using the formula below:
Tx = 25 + (ADCx - 30272)/(TCSENSE × 64)
Note that this is not recommended since it can result in large offsets.
NOTE
While measuring and/or calibration, the system's power dissipation should be kept the same, otherwise the
measurement is affected by the internal thermal gradient.
23.2.1 Programming
There is a certain programming sequence required to read the temperature sensor. There are two
reading options available:
absolute temperature (single-point calibration)
relative temperature
○ GP_ADC_CTRL_REG[DIE_TEMP_EN] = 1
● Wait 25 µs for the temperature sensor to start up
● To set the advised ADC settings:
○ GP_ADC_TRIM_REG[GP_ADC_LDO_LEVEL] = 4
○ GP_ADC_CTRL_REG[GP_ADC_CHOP] = 1
○ GP_ADC_CTRL_REG[GP_ADC_SE] = 1
○ GP_ADC_CTRL_REG[GP_ADC_EN] = 1
○ GP_ADC_CTRL2_REG[GP_ADC_I20U] = 1
○ GP_ADC_SEL_REG[GP_ADC_SEL_P] = 4
○ GP_ADC_CTRL2_REG[GP_ADC_STORE_DEL] = 0
● To set sample time and averaging of the ADC sampling
○ GP_ADC_CTRL2_REG[GP_ADC_SMPL_TIME] = F
○ GP_ADC_CTRL2_REG[GP_ADC_CONV_NRS] = 6
● To perform ADC conversion:
○ GP_ADC_CTRL_REG[GP_ADC_START] = 1
● To wait for the conversion to finish, read the register
○ GP_ADC_RESULT_REG[GP_ADC_VAL]
● To write back the original offset values
○ GP_ADC_OFFP_REG[GP_ADC_OFFP] = Offp
○ GP_ADC_OFFN_REG[GP_ADC_OFFN] = Offn
(Restore the original data if need by the application)
24 Keyboard Controller
24.1 Introduction
The Keyboard controller can be used for debouncing the incoming GPIO signals when implementing
a keyboard scanning engine. It generates an interrupt to the CPU (KEYBR_IRQ).
In parallel, five extra interrupt lines can be triggered by a state change on up to 12 selectable GPIOs
(GPIO_IRQx).
Features
● Monitors the 12 available GPIOs (6 in the WLCSP17 package and 12 in the FCGQFN24
package)
● Generates a keyboard interrupt on key press or key release
● Implements debouncing time from 0 up to 63 ms.
● Supports five separate interrupt generation lines from GPIO toggling
The block diagram of the Keyboard Controller is presented in the Figure 65.
24.2 Architecture
RST KEYBR_IRQ = 0
key_hit = 1
IDLE debounce = 0
key _hit = 1
key_hit = 0 and timer = DEBOUNCE
KEYBR_IRQ = 1 timer = 0
KEY_RELEASED KEY_PRESSED timer not 0
key _hit = 1 and
timer = 0 key_hit = 0 and key_hit = 1 and
key_hit = 0 and K EY_ REL = 0 timer = 0
timer = 0
key_hit = 0 KEYB_INT = 0
and KEY_REL = 1
KEY_RELEASING KEY_VALID KEYBR_IRQ
key_hit = 0 and
timer not 0 t im er = DE B OUNCE
KEY_REL = 0 KEYBR_IRQ = 1
key_hit = 0 and key_hit = 1 and
KEY_REPEAT != 0 key_hit = 1 and
KEY_REL = 1 and timer = 0
debounce > 0
key_hit = 0 and KEY_REPEAT timer = KEY_REPEAT
KEY_REL = 1 and
debounce = 0 timer not 0
RST GPIOx_IRQ = 0
GPIOx _IRQ = 1
Figure 67: GPIO Interrupt Generator State Machine
24.3 Programming
To configure and use the Keyboard controller, follow the steps under each subsection.
25 Input/Output Ports
25.1 Introduction
The DA14531 has an I/O pin assignment that can be configured by the SW and is organized into the
Port 0. Pins from P0_0 to P0_5 are available for input/output on the WLCSP17 package, whereas the
full Port 0 (P0_0 to P0_11) is available on the FCGQFN24 package. Figure 68 shows the block
diagram of the IO and its programmability options.
Features
● Six GPIOs on WLCSP17 and 12 GPIOs on FCGQFN24 (including RST, SW_CLK, SWDIO,
XTAL32Km, and XTAL32Kp)
● Fully programmable pin assignment
● Selectable 25 kΩ pull-up and pull-down resistors per pin
● Programmable driving strength outputs
● Fixed assignment for analog pin ADC[3:0]
● Pins can retain their last state when system enters a Sleep mode
Px[y]
Peripheral X input
Px_DATA_REG (input)
VBAT_HIGH
PUPD
25 kΩ Px_MODE_REG
PID
Peripheral X output
Px[y] Peripheral Y output
Px_RESET_OUTPUT_DATA_REG
Px_DATA_REG (output)
Px_SET_OUTPUT_DATA_REG
25 kΩ
PAD_LOW_DRVx
Figure 68: Port P0 with Programmable Pin Assignment and driving strength
25.2 Architecture
25.2.1.1 Priority
The firmware can assign the same peripheral output to more than one pin. It is the users'
responsibility to make a unique assignment.
If more than one input signal is assigned to a peripheral input, the left most pin in the lowest port pin
number has priority.
VDD Px_MODE_REG
VBAT_HIGH
Input
Enable* 25k
VSS
VDD VBAT_HIGH
Pullup
Data* Enable*
Output Enable*
PIN
Pulldown
Low Drive* Enable*
VSS
GND
Figure 69: Type A GPIO Pad - GPIO with Schmitt Trigger on Input
VDD Px_MODE_REG
filtered
100kHz
VSS
VDD
VBAT_HIGH
Input
Enable* 25k
VSS
VDD VBAT_HIGH
Pullup
Data* Enable*
Output Enable*
PIN
Pulldown
Low Drive* Enable*
VSS
GND
Figure 70: Type B GPIO Pad - GPIO with Schmitt Trigger and RC Filter on Input
Red signals are latched when the system enters a Sleep mode.
26.1 Introduction
The DA14531 is equipped with a high-speed ultra-low-power 10-bit general purpose Analog-to-Digital
Converter (GPADC). It can operate in unipolar (single ended) mode as well as in bipolar (differential)
mode. The ADC has its own voltage regulator (LDO) of 0.9 V, which represents the full-scale
reference voltage. Figure 71 shows the block diagram of the GPADC.
Features
● 10-bit dynamic ADC with 125 ns typical conversion time
● Maximum sampling rate 1 Msample/s
● 128× averaging; conversion time 1 ms, up to 11b ENOB
● Ultra-low power (20 µA typical supply current at 100 ksample/s)
● Four single-ended or two differential external input channels (GPIOs)
● Battery, DCDC outputs, and the internal VDD monitoring channels
● Chopper function
● Offset adjust
● Common-mode input level adjust
● Configurable attenuator: 1×, 2×, 3× and 4×
● Input shifter
GP_ADC_OFFS_SH_EN
GP_ADC_SEL_P
GP_ADC_OFFS_SH_EN
P0 _1 0
P0 _2 1 Shifter
P0 _6 2 (1.8-0.9V -> 0.9-0V) VBAT _L OW
GP_ADC_ATTN
P0 _7 3
Temp Sens or 4
VBAT _H IG H 5
VBAT _L OW 6 120 kOhm 0.9V GP_ADC_EN
VDD 7 GP_ADC_I20U
1 LDO
40 kOhm GP_ADC_MINT
0 Vref=0.9V
20 kOhm ADC_IRQ
GP_ADC_INT
60 kOhm ADC_DMA_REQ
ADC
GP_ADC_SE
GP_ADC_RESULT_REG
16bit
60 kOhm
GP_ADC_SIGN
GP_ADC_START
GP_ADC_EN
GP_ADC_SMPL_TIME
GP_ADC_CHOP
GP_ADC_MUTE
GP_ADC_CONV_NRS
GP_ADC_OFFx
GP_ADC_SEL_N 20 kOhm
40 kOhm
0
GP_ADC_ATTN
P0 _1 120 kOhm
P0 _2 1
P0 _6 2
P0 _7 3
26.2 Architecture
The ADC architecture shown in Figure 71 has the following sub-blocks:
● Analog to Digital converter (ADC)
○ ADC analog part internally clocked with 100 MHz
○ ADC logic part clocked with the ADC_CLK which is the 16 MHz system clock (sys_clk)
● 0.9 V LDO for the ADC supply with a high PSRR enabled with
GP_ADC_CTRL_REG[GP_ADC_EN]
● Configurable attenuator with 1×, 2×, 3×, and 4× attenuation controlled by
GP_ADC_CTRL2_REG[GP_ADC_ATTN]
● Input shifter which shifts the battery voltage range from 0.85 V to 1.75 V (with a common mode
adjustment) to the ADC input range from 0 V to 0.9 V controlled by
GP_ADC_CTRL2_REG[GP_ADC_OFFS_SH_EN] and
GP_ADC_CTRL2_REG[GP_ADC_OFFS_CM]
● APB Bus interface clocked with the APB clock. Control and status registers are available through
registers GP_ADC_*
● Maskable Interrupt (ADC_IRQ) and DMA request (ADC_DMA_REQ)
● ADC input channel selector. Up to four GPIO ports, the battery and DCDC output (VBAT_HIGH and
VBAT_LOW ), the internal VDD, and the analog ground level (AVS) can be measured.
Table 52 summarizes the voltage ranges which can be handled with the single-ended or differential
operation for different attenuation values. The single-ended/differential mode is controlled by the bit
GP_ADC_CTRL_REG[GP_ADC_SE], and the attenuation is handled by the bit
GP_ADC_CTRL2_REG[GP_ADC_ATTN].
START
GP_ADC_EN=1
cntr = 4*GP_ADC_EN_DEL
Yes
No cntr--
cntr ==0
ADC_LDO_0V9
start-up
No
GP_ADC_START==1
cntr = 8*GP_ADC_SMPL_TIME
Yes
ADC
No Sample time
cntr ==0 cntr--
ADC Conversion
ADC
Conversion
cntr = GP_ADC_STORE_DEL
Yes No
cntr ==0
No No ADC
ADC_READY cntr ==0 cntr--
Store delay
Oversampling
No Mode
conv_nr-- conv_nr==0
Delay = Yes
GP_ADC_INTERVAL*1.024 ms GP_ADC_RESULT=
average(tmp_result)
No
ADC_IRQ_EN=1
Yes DMA Request =1
GP_ADC_INTERVAL==0
Continuous
Mode
No
GP_ADC_CONT==0
Yes
GP_ADC_START=0
STOP
Formula:
G ADC E DEL = τADC_EN_DEL × fADC_CLK / 4
This value must be rounded up to the nearest integer.
The GPADC is a dynamic ADC and consumes no static power, except for the ADC_LDO which
consumes approximately 20 µA. Therefore, GP_ADC_EN must be set to 0 if the ADC is not used.
NOTE
Before making any changes to the ADC settings, users must disable the continuous mode by setting bit
GP_ADC_CONT to 0 and waiting until bit GP_ADC_START = 0.
At full speed the ADC consumes approximately 50 to 60 µA. If the data rate is less than 100
ksample/s, the current consumption will be in the order of 25 µA.
The time interval between two successive AD conversions is programmable with
GP_ADC_CTRL3_REG[GP_ADC_INTERVAL] in steps of 1.024 ms. If GP_ADC_INTERVAL = 0, the
conversion will restart immediately. If GP_ADC_INTERVAL is not zero, the ADC first synchronizes to
the delay clock before starting the conversion. This can take up to 1 ms.
26.2.3.1 AD Conversion
Each AD conversion has three phases:
● Sampling
● Conversion
● Storage
The AD conversion starts with the sampling phase. This phase ends after the time set in
GP_ADC_CTRL2_REG[GP_ADC_SMPL_TIME] and triggers the conversion phase. If
GP_ADC_CTRL2_REG[GP_ADC_STORE_DEL] = 0, handshaking is used, that is, the ADC result is
stored when a conversion is finished. Otherwise, a fixed (programmable) delay is used, and the
result is stored regardless of whether the conversion is finished or not.
The total conversion time of an AD conversion depends on various settings. In short, it is as follows.
𝑁𝐶𝑂𝑁𝑉 ∙ (𝑁𝐶𝑌𝐶𝐿_𝑆𝑀𝑃𝐿 + 𝑁𝐶𝑌𝐿𝐶_𝑆𝑇𝑂𝑅𝐸 )
𝑇𝐴𝐷𝐶 = (5)
𝑓𝐴𝐷𝐶_𝐶𝐿𝐾
Where
● NCONV = the number of conversions. This is related to the value programmed in
GP_ADC_CTRL2_REG[GP_ADC_CONV_NRS], following 2GP_ADC_CONV_NRS. When
GP_ADC_CTRL_REG[GP_ADC_CHOP] is set, the minimum value for NCONV is always 2.
● NCYLC_SMPL = the number of ADC_CLK cycles used for sampling, which is 8 ×
GP_ADC_CTRL2_REG[GP_ADC_SMPL_TIME].
● NCYCL_STORE = the number of ADC_CLK cycles until the result is stored. When
GP_ADC_CTRL2_REG[GP_ADC_STORE_DEL] = 0, handshaking is used. With handshaking,
the number of ADC_CLK cycles is typically three. This value may spread from sample to sample
and over temperature, otherwise the number of ADC_CLK cycles is
GP_ADC_CTRL2_REG[GP_ADC_STORE_DEL] + 1.
Sampling Phase
The sampling time can be programmed via GP_ADC_CTRL2_REG[GP_ADC_SMPL_TIME] and
depends on the sampling time constant in combination with the desired sampling accuracy. This
sampling time constant, τADC_SMPL (Table 54), then depends on the output impedance of the source,
the internal resistive dividers, and the internal sampling capacitor. And the number of required time
constants is given by the natural logarithm of the desired accuracy, that is, ln(2^NBIT). For NBIT =
10-bit accuracy, 7 time constants are required.
Formula:
GP_ADC_SMPL_TIME = ln(2^NBIT) × τADC_SMPL × fADC_CLK / 8
This value must be rounded up to the nearest integer.
delay is too short (that is, the conversion is not finished in the allocated time), the old (previous) ADC
result is stored.
26.2.3.2 Averaging
In order to reduce noise and improve performance, multiple samples can be averaged out (assuming
the time average of noise equals zero). This is handled by HW and can be controlled by setting
GP_ADC_CTRL2_REG[GP_ADC_CONV_NRS] to a non-zero value. The actual number of the
consecutive samples taken is by 2GP_ADC_CONV_NRS.
Because the internal noise also acts as a form of dither, the actual accuracy can be improved.
Therefore, the ADC result is not truncated to 10-bit but stored as 16-bit left aligned, and truncation is
left for the user. The expected Effective Number of Bits (ENOB) is shown in Table 55.
Table 56: GPADC Calibration Procedure for Single-Ended and Differential Modes
Step Single-Ended Mode (GP_ADC_SE = 1) Differential Mode (GP_ADC_SE = 0)
1 Set GP_ADC_OFFP = GP_ADC_OFFN = 0x200; Set GP_ADC_OFFP = GP_ADC_OFFN = 0x200;
GP_ADC_MUTE = 0x1; GP_ADC_SIGN = 0x0. GP_ADC_MUTE = 0x1; GP_ADC_SIGN = 0x0.
2 Start conversion. Start conversion.
3 adc_off_p = GP_ADC_RESULT - 0x200 adc_off_p = GP_ADC_RESULT - 0x200
4 Set GP_ADC_SIGN = 0x1. Set GP_ADC_SIGN = 0x1.
5 Start conversion. Start conversion.
6 adc_off_n = GP_ADC_RESULT - 0x200 adc_off_n = GP_ADC_RESULT - 0x200
7 GP_ADC_OFFP = 0x200 - 2 × adc off p GP_ADC_OFFP = 0x200 - adc_off_p
GP_ADC_OFFN = 0x200 - 2 × adc off n GP_ADC_OFFN = 0x200 - adc_off_n
Any other common mode levels between 0.0 V and 0.9 V can be calculated from Table 57. Offset
calibration can be combined with common mode adjustment by replacing the 0x200 value in the
offset calibration routine with the value required to get the appropriate common mode level.
26.3 Programming
To program and use the GPADC, follow the simple sequence of steps below:
1. Enable the GPADC by setting the GP_ADC_CTRL_REG[GP_ADC_EN] bit.
2. Set up the GPIO input (P0_x_MODE_REG[PID] = 15).
3. Select the input channel (GP_ADC_SEL_REG).
4. Select the sampling mode (differential or single ended) by writing the
GP_ADC_CTRL_REG[GP_ADC_SE] bit.
5. Select between the manual mode and the continuous mode of sampling
(GP_ADC_CTRL_REG[GP_ADC_CONT].
6. Set up extra options (see GP_ADC_CTRLx_REG description)
7. Start the conversion by setting GP_ADC_CTRL_REG[GP_ADC_START] bit.
8. Wait for GP_ADC_CTRL_REG[GP_ADC_START] to become 0 or interrupt being triggered (when
used).
9. Clear the ADC interrupt by writing any value to GP_ADC_CLEAR_INT_REG.
10. Get the ADC result from the GP_ADC_RESULT_REG.
27.1 Introduction
The DA14531 is equipped with a Real Time Clock (RTC) which provides the complete clock and
calendar information with automatic time units adjustment and easy configuration.
Features
● Complete time of day clock: 12/24 hour, hours, minutes, seconds, and hundredths of a second
● Calendar function: day of week, date of month, month, year, century, leap year compensation,
and year 2000 compliant
● Alarm function: month, date, hour, minute, second, and hundredths of a second
● Event interrupt on any calendar or time unit
● Available during sleep if the power domain PD_TIM is kept alive
● Granularity of 10 ms (RTC_CLK)
● Provides 22 LSB to Timer 1 upon a capture trigger
Counters
APB32 Bus
1/100th
Register File
Timer 1
second 22
time_o
minute
Synchronizer
hour
date day
month
RTC_CLK (10ms)
AON_PCLK
year
RTC_IRQn
century
27.2 Architecture
The architecture of the RTC is depicted in Figure 73.
The RTC supports a year range from 1900 to 2999 as well as full month, date, minute, second, and
hundredth of second ranges. It also supports hour ranges of 0 to 23 (24-hour format) or 1 to 12 with
a.m./p.m. flag (12-hour format).
Alarms can be generated in two ways, as a one-time alarm or as a recurring alarm. In addition to
alarms, the RTC can detect when a particular event occurs. Each field of the calendar and time
counter can generate an event when it rolls over. For example, an event can be generated every new
month, new week, new day, new half day (12-hour mode), new minute, or new second. Both alarms
and events can generate an interrupt. All the interrupts can be set, enabled, disabled, or masked at
any time.
The LSB (22) of the port showing a full of 32-bit information on the current time is latched by Timer 1
(TIMER1_CAPCNT1/2_VALUE_REG) if instructed by Timer 1 configuration. This allows for storing
an RTC based snapshot upon an event on a GPIO.
27.3 Programming
To configure the RTC, follow the simple sequence of steps below:
1. Configure the 100 Hz RTC granularity if needed:
a. Based on the selected LP clock (for example, 32768 kHz), set the
CLK_RTCDIV_REG[RTC_DIV_INT] = 327 (= 0x147).
This values should be equal to the integer divisor part of the formula
FLP_CLK/100 = 327.680.
b. Based on the selected LP clock (for example, 32768 kHz), set the
CLK_RTCDIV_REG[RTC_DIV_FRAC] = 680 (= 0x2A8).
This values should be equal to the fractional divisor part of the formula
FLP_CLK/100 = 327.680.
c. To achieve a better accuracy of the divisor, configure the denominator for the fractional
division accordingly (CLK_RTCDIV_REG[RTC_DIV_DENOM]).
d. Enable the 100 Hz RTC granularity by setting the CLK_RTCDIV_REG [RTC_DIV_ENABLE]
bit.
2. Enable the time functionality by clearing the RTC_CONTROL_REG[RTC_TIME_DISABLE].
3. Enable the calendar functionality by clearing the RTC_CONTROL_REG[RTC_CAL_DISABLE].
4. Choose between 12-hour or 24-hour mode (RTC_HOUR_MODE_REG[RTC_HMS]).
5. Configure the time (RTC_TIME_REG).
6. Configure the date (RTC_CALENDAR_REG).
7. Set up a time alarm if needed (RTC_ALARM_ENABLE_REG).
8. Set up a calendar alarm if needed (RTC_CALENDAR_ALARM_REG).
9. Enable the configured alarms (RTC_ALARM_ENABLE_REG[RTC_ALARM_xxxx_EN]).
10. Configure the interrupt generation when an alarm happens (RTC_INTERRUPT_ENABLE_REG).
Disable the interrupt generation with RTC_INTERRUPT_DISABLE_REG.
11. Configure the event flag generation when an alarm happens (RTC_EVENT_FLAGS_REG).
12. Define whether a SW reset resets the RTC (RTC_KEEP_RTC_REG[RTC_KEEP]).
28 Power
As discussed in section 4.2, the integrated power management unit (PMU) comprises the DCDC
converter and various LDOs, the VDD Clamp, and the POR circuitry. The details of these blocks are
discussed in the following sections.
VBAT_HIGH
Battery
CBAT
FSM Controller
LEXT
LX VBAT_LOW
VREF
CEXT
VSSA_DCDC
VBAT_HIGH
CEXT
FSM Controller
LEXT
LX VBAT_LOW
Battery VREF
CBAT
VSSA_DCDC
● In buck configuration the battery is connected to VBAT_HIGH, and DCDC supplies power to VBAT_LOW
rail
● In boost configuration the battery is connected to VBAT_LOW , and DCDC supplies power to
VBAT_HIGH rail
● In DCDC bypass configuration VBAT_HIGH is connected to VBAT_LOW and the battery is connected to
both rails.
Datasheet Revision 3.1 09-Jul-2020
For Boost configuration, a typical DCDC efficiency at 25°C as a function of the load current for
different battery voltages (VBAT = VBAT_LOW ) is shown in Figure 77.
28.2 LDOs
Several LDOs are used in the DA14531 to provide a stable power supply to the rails and the building
blocks.
● VDD_Clamp generates a trimmable ~0.75 V VDD supply voltage for the AON (always on) DCORE
power domain from VBAT_HIGH or VBAT_LOW when the system is in the hibernation mode
● LDO_LOW provides power to the VBAT_LOW rail in the buck configuration with a typical output
voltage of 1.1 V. This LDO is used during start-up and can also be used after start-up.
Alternatively, it can be disabled and the VBAT_LOW rail can be supplied by the DCDC converter.
The LDO has a low power setting which is used to maintain the VBAT_LOW rail during sleep mode.
See section 4.2.3 for more details.
● LDO_CORE supplies the internal VDD from VBAT_LOW . In the active mode it generates 0.9 V and in
the sleep mode 0.75 V
● LDOs for the RF and the analog building blocks generate 0.9 V when the particular blocks are
active. When the blocks are switched off, the LDOs are disabled.
29 BLE Core
The Bluetooth Low Energy (BLE) core used in the DA14531 is a qualified Bluetooth 5.1 baseband
controller compatible with the BLE specification and it is in charge of packet encoding/decoding and
frame scheduling.
The block diagram of BLE core is presented in Figure 78.
Features
● Compliant with Bluetooth Core Specification, v5.1, Bluetooth SIG
○ Dual topology
○ Low duty cycle advertising
○ L2CAP connection-oriented channels
● All device classes support (Broadcaster, Central, Observer, and Peripheral)
● All packet types (Advertising, Data, and Control)
● Dedicated Encryption (AES/CCM)
● Bit stream processing (CRC and Whitening)
● FDMA/TDMA/events formatting and synchronization
● Frequency hopping calculation
● Operating clock 16 MHz or 8 MHz
● Low power modes supporting 32.0 kHz, 32.768 kHz, or 15 kHz
● Supports powerdown of the baseband during the protocol’s idle periods
Control
BLE_EM
Radio Frequency Interrupt AES
Memory Controller _BASE_
Controller Selection Generator CCM
REG
Data
Packet Event White List Event
Whitening CRC
Controller Controller Search Scheduler
29.1 Architecture
29.2 Programming
29.2.2 Switch from BLE Active Mode to BLE Deep Sleep Mode
Software can set the BLE core into the "BLE Deep Sleep mode" by first programming the timing of
BLE_WAKEUP_LP_IRQ generation, then programming the desired sleep duration at
BLE_DEEPSLWKUP_REG, and finally set the register bit
BLE_DEEPSLCNTL_REG[DEEP_SLEEP_ON].
During the "BLE Deep Sleep mode", the BLE Core will switch to the "ble_lp_clk" (15kHz, 32.0 kHz, or
32. 68 k ) in order to maintain its internal 625 μs timing reference. SW must poll the state of
BLE_CNTL2_REG[RADIO_PWRDN_ALLOW] to detect the completion of this mode transition. Once
the "ble_lp_clk" is used for base time reference, SW must disable the BLE clocks ("ble_master1_clk",
"ble_master2_clk", and "ble_crypt_clk") by setting the CLK_RADIO_REG[BLE_ENABLE] register bit
to "0".
Finally, SW can optionally power down the Radio Subsystem by using the
PMU_CTRL_REG[RADIO_SLEEP] and the Peripheral and System power domains as well.
Figure 79 presents the waveforms when the BLE Deep Sleep mode is entered. In this case, as soon
as the SW detects that RADIO_PWRDOWN_ALLOW is "1", it sets the
PMU_CTRL_REG[RADIO_SLEEP] to power down the Radio Subsystem. In Figure 79, Figure 80,
Figure 81, Figure 82, and Figure 83, the corresponding BLE Core signals are marked with red while
Radio Subsystem is in power-down state and they remain red-marked during the period when
RADIO_SLEEP is set.
29.2.3 Switch from BLE Deep Sleep Mode to BLE Active Mode
There are two possibilities for the BLE Core to terminate the BLE Deep Sleep mode:
● Termination at the end of a predetermined time
● Termination on SW wake-up request due to an external event
Figure 80: Exit BLE Deep Sleep Mode at Predetermined Time (Zoom In)
Figure 81: Exit BLE Deep Sleep Mode after Predetermined Time (Zoom In)
Figure 82: Exit BLE Deep Sleep Mode at Predetermined Time (Zoom Out)
Figure 83: Exit BLE Deep Sleep Mode Due to External Event
30 Radio
30.1 Introduction
The Radio Transceiver implements the RF part of the BLE protocol. Together with the Bluetooth 5.1
PHY layer, it provides up to 93 dB RF link budget for a reliable wireless communication. All RF
blocks are supplied by on-chip low-drop out-regulators (LDOs). The bias scheme is programmable
per block and optimized for minimum power consumption. The radio block diagram is given in Figure
84. It comprises the Receiver, Transmitter, Synthesizer, Rx/Tx combiner block, and Biasing LDOs.
Features
● Single ended RFIO interface, 50 Ω matched
● Alignment free operation
● -90 dBm receiver sensitivity
● Configurable transmit output power from -19.5 dBm up to +2.5 dBm
● Ultra-low power consumption
● Fast frequency tuning minimizes overhead
I-ADC
LNA
IF
DEM
Filter
Q-ADC
RFIO LLH
SYNTH
32 MHz
PA MOD
XO
30.2 Architecture
30.2.1 Receiver
The RX frontend consists of a selective matching network, a low noise amplifier (LNA), and an image
rejection down conversion mixer. The intermediate frequency (IF) part of the receiver comprises a
filter with a programmable gain. The LNA and IF Filter gains are controlled by the Automatic Gain
Control (AGC). This provides the necessary signal conditioning prior to digitalization. The digital
demodulator block (DEM) provides a synchronous bit stream.
30.2.2 Synthesizer
The RF Synthesizer generates the quadrature LO signal for the mixer, but also generates the
modulated TX output signal. The Digitally Controlled Oscillator (DCO) runs at twice the required
frequency and a dedicated divide-by-2 circuit generates the 2.4 GHz signals in the required phase
relations. The reference frequency is the 32 MHz crystal clock. The modulation of the TX frequency
is performed by 2-point modulation.
30.2.3 Transmitter
The RF power amplifier (RFPA) is an extremely efficient Class-D structure, providing typically the
power ranging from -1 .5 dBm to +2.5 dBm to the antenna. It is fed by the DC ’s divide-by-2 circuit
and delivers its TX power to the antenna pin through the combined RX/TX matching circuit.
30.2.4 RFIO
The RX/TX combiner block is a unique feature of the DA14531. It makes sure that the received
power is applied to the LNA with minimum losses towards the RFPA. In TX mode, the LNA poses a
minimal load for the RFPA and its input pins are protected from the RFPA. In both modes, the single
ended RFIO port is matched to a resistor of 50 Ω in order to provide the simplest possible interfacing
to the antenna on the printed circuit board.
30.2.5 Biasing
All RF blocks are supplied by on-chip LDOs. The bias scheme is programmable and optimized for
minimum power consumption.
30.2.6 RF Monitoring
The Radio is equipped with a monitoring block whose responsibility is to acquire the data provided by
the RF Unit and other analog resources, to combine them in words of 32 bits (when necessary), and
to store them in system’s memory. Data can be the output of the Demodulator (I and Q) or be
provided by the GPADC. With the monitoring block, production tests of the corresponding block can
be achieved.
31 Registers
This section contains a detailed view of the DA14531 registers. It is organized as follows: an
overview table is presented initially, which depicts all register names, addresses, and descriptions. A
detailed bit level description of each register follows.
The register file of the Arm Cortex-M0+ can be found in the following documents available on the
website:
Devices Generic User Guide:
https://developer.arm.com/docs/238818831/10/getting-started-with-cortex-m0-cortex-m0-cortex-m3-
and-cortex-m4-full-licensee-bundles
Technical Reference Manual:
https://developer.arm.com/docs/ddi0484/c/preface
These documents contain the register descriptions for the Nested Vectored Interrupt Controller
(NVIC), the System Control Block (SCB), and the System Timer (SysTick).
6:5 R/W LDO_LOW_CTRL_ 00: High-current mode in active, LDO_LOW OFF 0x0
REG in sleep
01: LDO_LOW OFF
10: Low-current mode in active, Low-current mode
in sleep
11: High-current mode in active, Low-current
mode in sleep
4 R/W LDO_CORE_DISAB Disables LDO_CORE 0x0
LE
3 R/W LDO_CORE_RET_ LDO_CORE_RETENTION 0x0
ENABLE 0: Disabled
1: Enabled
2 R/W VBAT_HL_CONNE Switch between VBAT_HIGH and VBAT_LOW 0x0
CT 0: Open
1: Closed
1 R/W CMP_VBAT_HIGH_ Enable cmp_vbat_high_ok 0x0
OK_ENABLE
5 R/W FORCE_RCX_VRE 0: RCX bias supply connected to clamp and VDD 0x0
F via 400k resistor (old situation)
1: RCX bias supply connected to vref_0v75_0
(use for calibration)
4 - - 0x0
3:0 R/W SW_GP_DATA 0x0
32 Ordering Information
Table 448: Ordering Information (Samples)
Part Number Package Size (mm) Shipment Form Pack Quantity
DA14531-00000FX2 FCGQFN24 2.2 × 3.0 Reel 100/1000
DA14531-00000OG2 WLCSP17 1.6 4 × 2.032 Reel 100/1000
33 Package Information
Revision History
Revision Date Description
3.1 09-Jul-2020 Datasheet status: Final. Product status: Production
Changelog:
● WLCSP17 and FCGQFN24 Package Outline Diagram updated
● VBAT_X, GPADC, Temperature Sensor and XTAL32K specification parameters updated
● SPI Chapter: Features updated
● Buck, Boost and Bypass PMU figures updated
3.0 12-Mar-2020 Datasheet status: Final.
Changelog:
● Various updates in figures and text
● Electrical characteristics updates
2.1 17-Oct-2019 Datasheet status: Preliminary.
Changelog:
● Product status update and Datasheet status update
● VDD_Clamp recommended setting across temperature added
2.0 13-Oct-2019 Datasheet status: Preliminary.
Changelog:
● Specifications
1.5 03-Jun-2019 Datasheet status: Target
Changelog:
● Ordering Information (Production): Pack Quantity
● Complies with BLE 5.1
1.4 03-Jun-2019 Datasheet status: Target
Changelog:
● BooterROM Sequence
● PMU Programming
● Temperature Sensor: routine for TS reading
● PMU: Buck, Boost, By-pass block diagram updated: SWs added, LDO_LOW_RET renamed to LDO_LOW
● RCX programming
● CLC filter at RFIOp
1.3 25-Jan-2019 Datasheet status: Target
Changelog:
● Various Updates
1.2 02-Oct-2018 Datasheet status: Target
Changelog:
● FCGQFN24 Package Outline updated
1.1 30-Aug-2018 Datasheet status: Target
1.0 29-Jun-2018 Datasheet status: Target
Status Definitions
1.<n> Target Development This datasheet contains the design specifications for product development.
Specifications may be changed in any manner without notice.
2.<n> Preliminary Qualification This datasheet contains the specifications and preliminary characterization
data for products in pre-production. Specifications may be changed at any
time without notice in order to improve the design.
3.<n> Final Production This datasheet contains the final specifications for products in volume
production. The specifications may be changed at any time in order to
improve the design, manufacturing and supply. Major specification changes
are communicated via Customer Product Notifications. Datasheet changes
are communicated via www.dialog-semiconductor.com.
4.<n> Obsolete Archived This datasheet contains the specifications for discontinued products. The
information is provided for reference only.
Disclaimer
Unless otherwise agreed in writing, the Dialog Semiconductor products (and any associated software) referred to in this document are not
designed, authorized or warranted to be suitable for use in life support, life-critical or safety-critical systems or equipment, nor in applications
where failure or malfunction of a Dialog Semiconductor product (or associated software) can reasonably be expected to result in personal injury,
death or severe property or environmental damage. Dialog Semiconductor and its suppliers accept no liability for inclusion and/or use of Dialog
Semiconductor products (and any associated software) in such equipment or applications and therefore such inclusion and/or use is at the
customer’s own risk.
Information in this document is believed to be accurate and reliable. However, Dialog Semiconductor does not give any representations or
warranties, express or implied, as to the accuracy or completeness of such information. Dialog Semiconductor furthermore takes no
responsibility whatsoever for the content in this document if provided by any information source outside of Dialog Semiconductor.
Dialog Semiconductor reserves the right to change without notice the information published in this document, including, without limitation, the
specification and the design of the related semiconductor products, software and applications. Notwithstanding the foregoing, for any automotive
grade version of the device, Dialog Semiconductor reserves the right to change the information published in this document, including, without
limitation, the specification and the design of the related semiconductor products, software and applications, in accordance with its standard
automotive change notification process.
Applications, software, and semiconductor products described in this document are for illustrative purposes only. Dialog Semiconductor makes
no representation or warranty that such applications, software and semiconductor products will be suitable for the specified use without further
testing or modification. Unless otherwise agreed in writing, such testing or modification is the sole responsibility of the customer and Dialog
Semiconductor excludes all liability in this respect.
Nothing in this document may be construed as a license for customer to use the Dialog Semiconductor products, software and applications
referred to in this document. Such license must be separately sought by customer with Dialog Semiconductor.
All use of Dialog Semiconductor products, software and applications referred to in this document is subject to Dialog Semiconductor’s Standard
Terms and Conditions of Sale, available on the company website (www.dialog-semiconductor.com) unless otherwise stated.
Dialog, Dialog Semiconductor and the Dialog logo are trademarks of Dialog Semiconductor Plc or its subsidiaries. All other product or service
names and marks are the property of their respective owners.
RoHS Compliance
Dialog Semiconductor’s suppliers certify that its products are in compliance with the requirements of Directive 2011 65 EU of the European
Parliament on the restriction of the use of certain hazardous substances in electrical and electronic equipment. RoHS certificates from our
suppliers are available on request.