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