1.. _nucleo_wba52cg_board: 2 3ST Nucleo WBA52CG 4################# 5 6Overview 7******** 8 9NUCLEO-WBA52CG is a Bluetooth® Low Energy wireless and ultra-low-power board 10embedding a powerful and ultra-low-power radio compliant with the Bluetooth® 11Low Energy SIG specification v5.3. 12 13The ARDUINO® Uno V3 connectivity support and the ST morpho headers allow the 14easy expansion of the functionality of the STM32 Nucleo open development 15platform with a wide choice of specialized shields. 16 17- Ultra-low-power wireless STM32WBA52CG microcontroller based on the Arm® 18 Cortex®‑M33 core, featuring 1 Mbyte of flash memory and 128 Kbytes of SRAM in 19 a UFQFPN48 package 20 21- MCU RF board (MB1863): 22 23 - 2.4 GHz RF transceiver supporting Bluetooth® specification v5.3 24 - Arm® Cortex® M33 CPU with TrustZone®, MPU, DSP, and FPU 25 - Integrated PCB antenna 26 27- Three user LEDs 28- Three user and one reset push-buttons 29 30- Board connectors: 31 32 - USB Micro-B 33 - ARDUINO® Uno V3 expansion connector 34 - ST morpho headers for full access to all STM32 I/Os 35 36- Flexible power-supply options: ST-LINK USB VBUS or external sources 37- On-board STLINK-V3MODS debugger/programmer with USB re-enumeration capability: 38 mass storage, Virtual COM port, and debug port 39 40.. image:: img/nucleowba52cg.jpg 41 :align: center 42 :alt: Nucleo WBA52CG 43 44More information about the board can be found at the `Nucleo WBA52CG website`_. 45 46Hardware 47******** 48 49The STM32WBA52xx multiprotocol wireless and ultralow power devices embed a 50powerful and ultralow power radio compliant with the Bluetooth® SIG Low Energy 51specification 5.3. They contain a high-performance Arm Cortex-M33 32-bit RISC 52core. They operate at a frequency of up to 100 MHz. 53 54- Includes ST state-of-the-art patented technology 55 56- Ultra low power radio: 57 58 - 2.4 GHz radio 59 - RF transceiver supporting Bluetooth® Low Energy 5.3 specification 60 - Proprietary protocols 61 - RX sensitivity: -96 dBm (Bluetooth® Low Energy at 1 Mbps) 62 - Programmable output power, up to +10 dBm with 1 dB steps 63 - Integrated balun to reduce BOM 64 - Suitable for systems requiring compliance with radio frequency regulations 65 ETSI EN 300 328, EN 300 440, FCC CFR47 Part 15 and ARIB STD-T66 66 67- Ultra low power platform with FlexPowerControl: 68 69 - 1.71 to 3.6 V power supply 70 - - 40 °C to 85 °C temperature range 71 - Autonomous peripherals with DMA, functional down to Stop 1 mode 72 - 140 nA Standby mode (16 wake-up pins) 73 - 200 nA Standby mode with RTC 74 - 2.4 µA Standby mode with 64 KB SRAM 75 - 16.3 µA Stop mode with 64 KB SRAM 76 - 45 µA/MHz Run mode at 3.3 V 77 - Radio: Rx 7.4 mA / Tx at 0 dBm 10.6 mA 78 79- Core: Arm® 32-bit Cortex®-M33 CPU with TrustZone®, MPU, DSP, and FPU 80- ART Accelerator™: 8-Kbyte instruction cache allowing 0-wait-state execution 81 from flash memory (frequency up to 100 MHz, 150 DMIPS) 82- Power management: embedded regulator LDO supporting voltage scaling 83 84- Benchmarks: 85 86 - 1.5 DMIPS/MHz (Drystone 2.1) 87 - 407 CoreMark® (4.07 CoreMark/MHz) 88 89- Clock sources: 90 91 - 32 MHz crystal oscillator 92 - 32 kHz crystal oscillator (LSE) 93 - Internal low-power 32 kHz (±5%) RC 94 - Internal 16 MHz factory trimmed RC (±1%) 95 - PLL for system clock and ADC 96 97- Memories: 98 99 - 1 MB flash memory with ECC, including 256 Kbytes with 100 cycles 100 - 128 KB SRAM, including 64 KB with parity check 101 - 512-byte (32 rows) OTP 102 103- Rich analog peripherals (independent supply): 104 105 - 12-bit ADC 2.5 Msps with hardware oversampling 106 107- Communication peripherals: 108 109 - Three UARTs (ISO 7816, IrDA, modem) 110 - Two SPIs 111 - Two I2C Fm+ (1 Mbit/s), SMBus/PMBus® 112 113- System peripherals: 114 115 - Touch sensing controller, up to 20 sensors, supporting touch key, linear, 116 rotary touch sensors 117 - One 16-bit, advanced motor control timer 118 - Three 16-bit timers 119 - One 32-bit timer 120 - Two low-power 16-bit timers (available in Stop mode) 121 - Two Systick timers 122 - Two watchdogs 123 - 8-channel DMA controller, functional in Stop mode 124 125- Security and cryptography: 126 127 - Arm® TrustZone® and securable I/Os, memories, and peripherals 128 - Flexible life cycle scheme with RDP and password protected debug 129 - Root of trust thanks to unique boot entry and secure hide protection area (HDP) 130 - SFI (secure firmware installation) thanks to embedded RSS (root secure services) 131 - Secure data storage with root hardware unique key (RHUK) 132 - Secure firmware upgrade support with TF-M 133 - Two AES co-processors, including one with DPA resistance 134 - Public key accelerator, DPA resistant 135 - HASH hardware accelerator 136 - True random number generator, NIST SP800-90B compliant 137 - 96-bit unique ID 138 - Active tampers 139 - CRC calculation unit 140 141- Up to 35 I/Os (most of them 5 V-tolerant) with interrupt capability 142 143- Development support: 144 145 - Serial wire debug (SWD), JTAG 146 147- ECOPACK2 compliant package 148 149More information about STM32WB55RG can be found here: 150 151- `STM32WBA52CG on www.st.com`_ 152- `STM32WBA52CG datasheet`_ 153- `STM32WBA52CG reference manual`_ 154 155Supported Features 156================== 157 158The Zephyr nucleo_wba52cg board configuration supports the following hardware features: 159 160+-----------+------------+-------------------------------------+ 161| Interface | Controller | Driver/Component | 162+===========+============+=====================================+ 163| NVIC | on-chip | nested vector interrupt controller | 164+-----------+------------+-------------------------------------+ 165| UART | on-chip | serial port-polling; | 166| | | serial port-interrupt | 167+-----------+------------+-------------------------------------+ 168| PINMUX | on-chip | pinmux | 169+-----------+------------+-------------------------------------+ 170| GPIO | on-chip | gpio | 171+-----------+------------+-------------------------------------+ 172| I2C | on-chip | i2c | 173+-----------+------------+-------------------------------------+ 174| SPI | on-chip | spi | 175+-----------+------------+-------------------------------------+ 176| ADC | on-chip | adc | 177+-----------+------------+-------------------------------------+ 178| WATCHDOG | on-chip | independent watchdog | 179+-----------+------------+-------------------------------------+ 180| RNG | on-chip | True Random number generator | 181+-----------+------------+-------------------------------------+ 182 183Other hardware features are not yet supported on this Zephyr port. 184 185The default configuration can be found in the defconfig file: 186:zephyr_file:`boards/st/nucleo_wba52cg/nucleo_wba52cg_defconfig` 187 188Connections and IOs 189=================== 190 191Nucleo WBA52CG Board has 4 GPIO controllers. These controllers are responsible for pin muxing, 192input/output, pull-up, etc. 193 194Default Zephyr Peripheral Mapping: 195---------------------------------- 196 197.. rst-class:: rst-columns 198 199- USART_1 TX/RX : PB12/PA8 200- I2C_1_SCL : PB2 201- I2C_1_SDA : PB1 202- USER_PB : PC13 203- LD1 : PB4 204- SPI_1_NSS : PA12 (arduino_spi) 205- SPI_1_SCK : PB4 (arduino_spi) 206- SPI_1_MISO : PB3 (arduino_spi) 207- SPI_1_MOSI : PA15 (arduino_spi) 208 209System Clock 210------------ 211 212Nucleo WBA52CG System Clock could be driven by internal or external oscillator, 213as well as main PLL clock. By default System clock is driven by HSE+PLL clock at 100MHz. 214 215Serial Port 216----------- 217 218Nucleo WBA52CG board has 1 U(S)ARTs. The Zephyr console output is assigned to USART1. 219Default settings are 115200 8N1. 220 221 222Programming and Debugging 223************************* 224 225Nucleo WBA52CG board includes an ST-LINK/V3 embedded debug tool interface. 226It could be used for flash and debug using either OpenOCD or STM32Cube ecosystem tools. 227 228Flashing 229======== 230 231STM32CubeProgrammer is configured as flashing tool by default. 232If available, OpenOCD could be used. Same process applies with both tools. 233 234Flashing an application to Nucleo WBA52CG 235----------------------------------------- 236 237Here is an example for the :zephyr:code-sample:`blinky` application. 238 239.. zephyr-app-commands:: 240 :zephyr-app: samples/basic/blinky 241 :board: nucleo_wba52cg 242 :goals: build flash 243 244You will see the LED blinking every second. 245 246Debugging 247========= 248 249Debugging using OpenOCD 250----------------------- 251 252You can debug an application in the usual way using OpenOCD. Here is an example for the 253:zephyr:code-sample:`blinky` application. 254 255.. zephyr-app-commands:: 256 :zephyr-app: samples/basic/blinky 257 :board: nucleo_wba52cg 258 :maybe-skip-config: 259 :goals: debug 260 261Debugging using STM32CubeIDE 262---------------------------- 263 264You can debug an application using a STM32WBA compatible version of STM32CubeIDE. 265 266For that: 267 268- Create an empty STM32WBA project by going to File > New > STM32 project 269- Select your MCU, click Next, and select an Empty project. 270- Right click on your project name, select Debug as > Debug configurations 271- In the new window, create a new target in STM32 Cortex-M C/C++ Application 272- Select the new target and enter the path to zephyr.elf file in the C/C++ Application field 273- Check Disable auto build 274- Run debug 275 276.. _Nucleo WBA52CG website: 277 https://www.st.com/en/evaluation-tools/nucleo-wba52cg.html 278 279.. _STM32WBA52CG on www.st.com: 280 https://www.st.com/en/microcontrollers-microprocessors/stm32wba52cg.html 281 282.. _STM32WBA52CG datasheet: 283 https://www.st.com/resource/en/datasheet/stm32wba52cg.pdf 284 285.. _STM32WBA52CG reference manual: 286 https://www.st.com/resource/en/reference_manual/rm0493-multiprotocol-wireless-bluetooth-lowenergy-armbased-32bit-mcu-stmicroelectronics.pdf 287 288.. _OpenOCD official Github mirror: 289 https://github.com/openocd-org/openocd/commit/870769b0ba9f4dae6ada9d8b1a40d75bd83aaa06 290