STM32W108HB STM32W108CB
STM32W108CC STM32W108CZ
High-performance, IEEE 802.15.4 wireless system-on-chip with up
to 256 Kbyte of embedded Flash memory
Datasheet
-
not recommended for new design
Features
•
Complete system-on-chip
– 32-bit ARM
®
Cortex
®
-M3 processor
– 2.4 GHz IEEE 802.15.4 transceiver and
lower MAC
– 128/192/256-Kbyte Flash, 8/12/16-Kbyte
RAM memory
– AES128 encryption accelerator
– Flexible ADC, SPI/UART/I
2
C serial
communications, and general-purpose
timers
– 24 highly configurable GPIOs with Schmitt
trigger inputs
•
Industry-leading ARM
®
Cortex
®
-M3 processor
– Leading 32-bit processing performance
– Highly efficient Thumb
®
-2 instruction set
– Operation at 6, 12 or 24 MHz
– Flexible nested vectored interrupt controller
•
Low power consumption, advanced
management
– Receive current (w/ CPU): 27 mA
– Transmit current (w/ CPU, +3 dBm TX):
31 mA
– Low deep sleep current, with retained RAM
and GPIO: 400 nA/800 nA with/without
sleep timer
– Low-frequency internal RC oscillator for
low-power sleep timing
– High-frequency internal RC oscillator for
fast (100 µs) processor start-up from sleep
•
Exceptional RF performance
– Normal mode link budget up to 102 dB;
configurable up to 107 dB
– -99 dBm normal RX sensitivity;
configurable to -100 dBm (1% PER,
20 byte packet)
– +3 dB normal mode output power;
configurable up to +8 dBm
VFQFPN48 (7 x 7 mm)
UFQFPN48 (7 x 7 mm)
VFQFPN46 (6 x 6 mm)
– Robust WiFi and Bluetooth coexistence
•
Innovative network and processor debug
– Non-intrusive hardware packet trace
– Serial wire/JTAG interface
– Standard ARM debug capabilities: Flash
patch and breakpoint; data watchpoint and
trace; instrumentation trace macrocell
•
Application flexibility
– Single voltage operation: 2.1-3.6 V with
internal 1.8 V and 1.25 V regulators
– Optional 32.768 kHz crystal for higher timer
accuracy
– Low external component count with single
24 MHz crystal
– Support for external power amplifier
– Small 7x7 mm 48-pin VFQFPN and
UFQFPN packages or 6x6 mm 40-pin
VFQFPN package
Applications
•
Smart energy
•
Building automation and control
•
Home automation and control
•
Security and monitoring
•
ZigBee
®
Pro wireless sensor networking
•
RF4CE products and remote controls
March 2015
DocID16252 Rev 16
1/289
www.st.com
This is information on a product still in production but not recommended for new designs.
Contents
STM32W108HB STM32W108CB STM32W108CC STM32W108CZ
Contents
1
Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.1
1.2
Development tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.2.1
1.2.2
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
ARM
®
Cortex
®
-M3 core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2
3
4
Documentation conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Pinout and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Embedded memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.1
4.2
4.3
Memory organization and memory map . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Flash memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Random-access memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.3.1
4.3.2
4.3.3
4.3.4
Direct memory access (DMA) to RAM . . . . . . . . . . . . . . . . . . . . . . . . . . 36
RAM memory protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Memory controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Memory controller registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.4
Memory protection unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5
Radio frequency module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.1
Receive (Rx) path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.1.1
5.1.2
Rx baseband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
RSSI and CCA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Tx baseband . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
TX_ACTIVE and nTX_ACTIVE signals . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.2
Transmit (Tx) path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.2.1
5.2.2
5.3
5.4
5.5
5.6
Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Integrated MAC module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Packet trace interface (PTI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Random number generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6
System modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
2/289
DocID16252 Rev 16
STM32W108HB STM32W108CB STM32W108CC STM32W108CZ
Contents
6.1
Power domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.1.1
6.1.2
Internally regulated power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Externally regulated power . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Reset sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Reset recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Reset generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Reset register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
High-frequency internal RC oscillator (HSI) . . . . . . . . . . . . . . . . . . . . . . 55
High-frequency crystal oscillator (HSE OSC) . . . . . . . . . . . . . . . . . . . . 55
Low-frequency internal RC oscillator (LSI10K) . . . . . . . . . . . . . . . . . . . 55
Low-frequency crystal oscillator (LSE OSC) . . . . . . . . . . . . . . . . . . . . . 55
Clock switching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Clock switching registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
MAC timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Watchdog timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Sleep timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Event timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Slow timer (MAC timer, Watchdog, and Sleeptimer) control and status
registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Wake sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Basic sleep modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Further options for deep sleep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Use of debugger with sleep modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Power management registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
6.2
Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
6.2.1
6.2.2
6.2.3
6.2.4
6.3
Clocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6.3.1
6.3.2
6.3.3
6.3.4
6.3.5
6.3.6
6.4
System timers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
6.4.1
6.4.2
6.4.3
6.4.4
6.4.5
6.5
Power management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.5.1
6.5.2
6.5.3
6.5.4
6.5.5
6.6
Security accelerator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
7
8
Integrated voltage regulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
General-purpose input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
8.1
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.1.1
8.1.2
8.1.3
GPIO ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
Forced functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
DocID16252 Rev 16
3/289
9
Contents
8.1.4
8.1.5
8.1.6
8.1.7
STM32W108HB STM32W108CB STM32W108CC STM32W108CZ
Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
nBOOTMODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
GPIO modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Wake monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8.2
8.3
8.4
8.5
External interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Debug control and status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
GPIO alternate functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
General-purpose input/output (GPIO) registers . . . . . . . . . . . . . . . . . . . 101
8.5.1
8.5.2
8.5.3
8.5.4
8.5.5
8.5.6
8.5.7
8.5.8
8.5.9
8.5.10
8.5.11
8.5.12
8.5.13
Port x configuration register (Low) (GPIOx_CRL) . . . . . . . . . . . . . . . . 101
Port x configuration register (High) (GPIOx_CRH) . . . . . . . . . . . . . . . 102
Port x input data register (GPIOx_IDR) . . . . . . . . . . . . . . . . . . . . . . . . 103
Port x output data register (GPIOx_ODR) . . . . . . . . . . . . . . . . . . . . . . 103
Port x output set register (GPIOx_BSR) . . . . . . . . . . . . . . . . . . . . . . . 104
Port x output clear register (GPIOx_BRR) . . . . . . . . . . . . . . . . . . . . . . 104
External interrupt pending register (EXTI_PR) . . . . . . . . . . . . . . . . . . 105
External interrupt x trigger selection register (EXTIx_TSR) . . . . . . . . . 105
External interrupt x configuration register (EXTIx_CR) . . . . . . . . . . . . 106
PC TRACE or debug select register (GPIO_PCTRACECR) . . . . . . . . 106
GPIO debug configuration register (GPIO_DBGCR) . . . . . . . . . . . . . . 107
GPIO debug status register (GPIO_DBGSR) . . . . . . . . . . . . . . . . . . . 107
General-purpose input/output (GPIO) register map . . . . . . . . . . . . . . . 108
9
Serial interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
9.1
9.2
9.3
Functional description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
SPI master mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112
9.3.1
9.3.2
9.3.3
Setup and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Setup and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
DMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Setup and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
9.4
SPI slave mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116
9.4.1
9.4.2
9.4.3
9.4.4
9.5
Inter-integrated circuit interfaces (I2C) . . . . . . . . . . . . . . . . . . . . . . . . . . .119
9.5.1
4/289
DocID16252 Rev 16
STM32W108HB STM32W108CB STM32W108CC STM32W108CZ
9.5.2
9.5.3
Contents
Constructing frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Setup and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
FIFOs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
RTS/CTS flow control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
DMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
9.6
Universal asynchronous receiver/transmitter (UART) . . . . . . . . . . . . . . 123
9.6.1
9.6.2
9.6.3
9.6.4
9.6.5
9.7
9.8
Direct memory access (DMA) channels . . . . . . . . . . . . . . . . . . . . . . . . . 127
Serial controller common registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
9.8.1
9.8.2
9.8.3
9.8.4
9.8.5
9.8.6
9.8.7
Serial controller interrupt status register (SCx_ISR) . . . . . . . . . . . . . . 129
Serial controller interrupt enable register (SCx_IER) . . . . . . . . . . . . . . 131
Serial controller interrupt control register 1 (SCx_ICR) . . . . . . . . . . . . 133
Serial controller data register (SCx_DR) . . . . . . . . . . . . . . . . . . . . . . . 134
Serial controller control register 2 (SCx_CR) . . . . . . . . . . . . . . . . . . . . 134
Serial controller clock rate register 1 (SCx_CRR1) . . . . . . . . . . . . . . . 135
Serial controller clock rate register 2 (SCx_CRR2) . . . . . . . . . . . . . . . 135
Serial controller SPI status register (SCx_SPISR) . . . . . . . . . . . . . . . . 136
Serial controller SPI control register (SCx_SPICR) . . . . . . . . . . . . . . . 137
Serial controller I2C status register (SCx_I2CSR) . . . . . . . . . . . . . . . . 138
Serial controller I2C control register 1 (SCx_I2CCR1) . . . . . . . . . . . . 139
Serial controller I2C control register 2 (SCx_I2CCR2) . . . . . . . . . . . . 140
9.9
Serial controller: Serial peripheral interface (SPI) registers . . . . . . . . . . 136
9.9.1
9.9.2
9.10
Serial controller: Inter-integrated circuit (I2C) registers . . . . . . . . . . . . . 138
9.10.1
9.10.2
9.10.3
9.11
Serial controller: Universal asynchronous receiver/
transmitter (UART) registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
9.11.1
9.11.2
9.11.3
9.11.4
Serial controller UART status register (SC1_UARTSR) . . . . . . . . . . . 141
Serial controller UART control register (SC1_UARTCR) . . . . . . . . . . . 142
Serial controller UART baud rate register 1 (SC1_UARTBRR1) . . . . . 143
Serial controller UART baud rate register 2 (SC1_UARTBRR2) . . . . . 144
Serial controller receive DMA begin address channel A register
(SCx_DMARXBEGADDAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Serial controller receive DMA end address channel A register
(SCx_DMARXENDADDAR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Serial controller receive DMA begin address channel B register
(SCx_ DMARXBEGADDBR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
9.12
Serial controller: Direct memory access (DMA) registers . . . . . . . . . . . . 145
9.12.1
9.12.2
9.12.3
DocID16252 Rev 16
5/289
9