|
| 1 | +.. zephyr:board:: wbz451_curiosity |
| 2 | +
|
| 3 | +Overview |
| 4 | +********* |
| 5 | + |
| 6 | +The **WBZ451 Curiosity Board** is a development platform designed for evaluating and prototyping with the WBZ451 Bluetooth® Low Energy and Zigbee RF Module. |
| 7 | + |
| 8 | +Based on the PIC32CX-BZ2 family of MCUs, it offers a modular, efficient, and feature-rich environment for rapid development and demonstration of wireless applications. The board supports BLE 5.2 and Zigbee, and includes: |
| 9 | + |
| 10 | +* On-board debugger/programmer (PKOB4) |
| 11 | +* mikroBUS™ socket for Click board™ expansion |
| 12 | +* Multiple connectivity and power options |
| 13 | + |
| 14 | +WBZ451 supports the following drivers: |
| 15 | + |
| 16 | +* UART |
| 17 | +* Flash |
| 18 | +* GPIO |
| 19 | +* Pin Control |
| 20 | +* Entropy |
| 21 | +* DMA |
| 22 | +* RTC |
| 23 | +* I2C |
| 24 | +* SPI |
| 25 | +* PWM |
| 26 | +* Clock Control |
| 27 | +* Reset |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | +Hardware |
| 32 | +******** |
| 33 | + |
| 34 | +* **WBZ451PE Module**: Integrated on the board, supporting BLE 5.2 and Zigbee. |
| 35 | +* **On-board Debugger/Programmer**: MPLAB PICkit On-Board 4 (PKOB4) for programming and debugging. |
| 36 | +* **mikroBUS Socket** (J4): For Click board™ expansion. |
| 37 | +* **Power Supply**: Can be powered via USB or external supply. |
| 38 | +* **Switches and LEDs**: User switches and status LEDs for interaction and debugging. |
| 39 | +* **USB Connectivity**: Micro-B USB connector (J7) for programming, debugging, and UART console. |
| 40 | +* **Other Peripherals**: Temperature sensor, QSPI serial flash, 32.768 kHz secondary oscillator. |
| 41 | + |
| 42 | +**Design Files:** |
| 43 | +`WBZ451 Curiosity Board Hardware Design Documentation <https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/BoardDesignFiles/WBZ451+Curiosity+Board+Hardware+Design+Documentation+R7.zip>`_ |
| 44 | + |
| 45 | + |
| 46 | +Supported Features |
| 47 | +================== |
| 48 | + |
| 49 | +.. zephyr:board-supported-hw:: |
| 50 | +
|
| 51 | +For complete list of see `WBZ451 Curiosity Board User’s Guide <https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/UserGuides/WBZ451-Curiosity-Board-User-Guide-DS50003367.pdf>`_ |
| 52 | + |
| 53 | + |
| 54 | +Connections and IOs |
| 55 | +=================== |
| 56 | + |
| 57 | +User LED (D5) |
| 58 | +------------- |
| 59 | + |
| 60 | +- Blue indicator LED available on the WBZ451 Curiosity Board. |
| 61 | + |
| 62 | + - Connected to GPIO pin **PB7**. |
| 63 | + - Drive **PB7 LOW** → LED turns **ON**. |
| 64 | + - Drive **PB7 HIGH** → LED turns **OFF**. |
| 65 | + |
| 66 | + |
| 67 | +Push Buttons |
| 68 | +------------ |
| 69 | + |
| 70 | +The WBZ451 Curiosity Board includes two switches: |
| 71 | + |
| 72 | +- **Reset Switch (SW1)**: Connected to **MCLR** pin. Pulls high in idle; pressing drives low and resets the module. |
| 73 | +- **User Configurable Switch (SW2)**: Connected to **PB4**. Pulls high in idle; pressing drives low. |
| 74 | + |
| 75 | +**Switches Description** |
| 76 | + |
| 77 | +.. list-table:: |
| 78 | + :header-rows: 1 |
| 79 | + :widths: 25 25 50 |
| 80 | + |
| 81 | + * - Switch Name |
| 82 | + - Pin on WBZ451 Curiosity Board |
| 83 | + - Description |
| 84 | + * - Reset (SW1) |
| 85 | + - MCLR |
| 86 | + - Reset switch (SW1) connected to MCLR pin |
| 87 | + * - USB-BTN (SW2) |
| 88 | + - PB4 |
| 89 | + - User configurable switch (SW2) |
| 90 | + |
| 91 | +mikroBUS Socket (J4) |
| 92 | +-------------------- |
| 93 | + |
| 94 | +The mikroBUS™ socket (J4) supports Click board™ expansion and includes: |
| 95 | + |
| 96 | +- **Communication Interfaces**: SPI, UART, I²C |
| 97 | +- **Power Lines**: 3.3V/GND and 5V/GND |
| 98 | +- **Additional Signals**: PWM, RST, INT, AN |
| 99 | + |
| 100 | +**mikroBUS Socket Pinout** |
| 101 | + |
| 102 | +.. list-table:: |
| 103 | + :header-rows: 1 |
| 104 | + :widths: 10 15 30 45 |
| 105 | + |
| 106 | + * - Pin # |
| 107 | + - Pin Name |
| 108 | + - Pin on WBZ451 Curiosity Board |
| 109 | + - Description |
| 110 | + * - 1 |
| 111 | + - AN |
| 112 | + - PB6_AN |
| 113 | + - ADC analog input |
| 114 | + * - 2 |
| 115 | + - RST |
| 116 | + - PB2 |
| 117 | + - General purpose I/O pin |
| 118 | + * - 3 |
| 119 | + - CS |
| 120 | + - PB13_SERCOM0_PAD3 |
| 121 | + - Client select pin for SPI or general purpose I/O |
| 122 | + * - 4 |
| 123 | + - SCK |
| 124 | + - PB11_SERCOM0_PAD1 |
| 125 | + - SPI clock |
| 126 | + * - 5 |
| 127 | + - MISO |
| 128 | + - PB10_SERCOM0_PAD2 |
| 129 | + - SPI host input client output |
| 130 | + * - 6 |
| 131 | + - MOSI |
| 132 | + - PB12_SERCOM0_PAD0 |
| 133 | + - SPI host output client input |
| 134 | + * - 7 |
| 135 | + - +3.3V |
| 136 | + - +3.3V |
| 137 | + - +3.3V power supply |
| 138 | + * - 8 |
| 139 | + - GND |
| 140 | + - GND |
| 141 | + - Ground |
| 142 | + * - 9 |
| 143 | + - PWM |
| 144 | + - PB0 |
| 145 | + - General purpose I/O pin |
| 146 | + * - 10 |
| 147 | + - INT |
| 148 | + - PB1 |
| 149 | + - General purpose I/O pin |
| 150 | + * - 11 |
| 151 | + - TX |
| 152 | + - PA1_SERCOM1_PAD0 |
| 153 | + - UART TX |
| 154 | + * - 12 |
| 155 | + - RX |
| 156 | + - PA0_SERCOM1_PAD1 |
| 157 | + - UART RX |
| 158 | + * - 13 |
| 159 | + - SCL |
| 160 | + - PA3_SERCOM1_PAD1 |
| 161 | + - I²C clock |
| 162 | + * - 14 |
| 163 | + - SDA |
| 164 | + - PA2_SERCOM1_PAD0 |
| 165 | + - I²C data |
| 166 | + * - 15 |
| 167 | + - +5V |
| 168 | + - +5V |
| 169 | + - +5V power supply |
| 170 | + * - 16 |
| 171 | + - GND |
| 172 | + - GND |
| 173 | + - Ground |
| 174 | + |
| 175 | +For detailed schematics, pin assignments, and signal descriptions, see the |
| 176 | +`WBZ451 Curiosity Board User’s Guide <https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/UserGuides/WBZ451-Curiosity-Board-User-Guide-DS50003367.pdf>`_ |
| 177 | + |
| 178 | +Programming and Debugging |
| 179 | +************************* |
| 180 | + |
| 181 | +This section describes how to flash and debug applications on the Microchip Wireless WBZ451 Curiosity board using Zephyr. |
| 182 | + |
| 183 | +**Supported Debuggers** |
| 184 | + |
| 185 | +.. list-table:: |
| 186 | + :header-rows: 1 |
| 187 | + :widths: 20 20 20 20 20 |
| 188 | + |
| 189 | + * - |
| 190 | + - Flash |
| 191 | + - Debug |
| 192 | + - Debug Server |
| 193 | + - Debug Tool |
| 194 | + * - Segger |
| 195 | + - ✓ |
| 196 | + - ✓ |
| 197 | + - ✓ |
| 198 | + - J-Link |
| 199 | + * - OpenOCD |
| 200 | + - ✓ |
| 201 | + - ✓ |
| 202 | + - ✓ |
| 203 | + - PKOB4, PICkit Basic |
| 204 | + |
| 205 | +Flashing |
| 206 | +======== |
| 207 | + |
| 208 | +Follow the steps below to build and flash your application: |
| 209 | + |
| 210 | +1. Open a terminal and change to the Zephyr workspace directory: |
| 211 | + |
| 212 | + .. code-block:: console |
| 213 | +
|
| 214 | + cd zephyr |
| 215 | +
|
| 216 | +2. Build the application using the following command: |
| 217 | + |
| 218 | + .. code-block:: console |
| 219 | +
|
| 220 | + west build -p always -b wbz451_curiosity .\samples\basic\blinky\ |
| 221 | +
|
| 222 | +3. After a successful build, connect the WBZ451 device to your machine. |
| 223 | + |
| 224 | +4. Flash the device using the `west flash` command: |
| 225 | + |
| 226 | + .. code-block:: console |
| 227 | +
|
| 228 | + west flash |
| 229 | +
|
| 230 | +5. Ensure the flash process completes successfully. You should see confirmation messages in the terminal. |
| 231 | + |
| 232 | +Debugging |
| 233 | +========= |
| 234 | + |
| 235 | +To debug the WBZ451 application using Visual Studio Code: |
| 236 | + |
| 237 | +1. Ensure the application is built for the WBZ451 board. |
| 238 | +2. Install the `cortex-debug` extension in Visual Studio Code. |
| 239 | +3. Open the workspace and click the **Run and Debug** icon on the left sidebar. |
| 240 | +4. If `launch.json` and `tasks.json` files are already present, VS Code will automatically start the debug session. |
| 241 | +5. If prompted to create a new `launch.json`, select the **Cortex Debug** debugger option. |
| 242 | +6. Replace the contents of `launch.json` with: |
| 243 | + |
| 244 | + .. code-block:: json |
| 245 | +
|
| 246 | + { |
| 247 | + "version": "2.0.0", |
| 248 | + "configurations": [ |
| 249 | + { |
| 250 | + "name": "Debug WBZ451", |
| 251 | + "type": "cortex-debug", |
| 252 | + "request": "attach", |
| 253 | + "servertype": "openocd", |
| 254 | + "cwd": "C:\\developers\\zephyr\\", |
| 255 | + "executable": "<path to zephyr project>/build/zephyr/zephyr.elf", |
| 256 | + "device": "WBZ451", |
| 257 | + "configFiles": [ |
| 258 | + "interface/cmsis-dap.cfg", |
| 259 | + "target/wbz451.cfg" |
| 260 | + ], |
| 261 | + "gdbPath": "<path to zephyr sdk>/arm-zephyr-eabi/bin/arm-zephyr-eabigdb.exe", |
| 262 | + "preLaunchTask": "flash_wbz451_hex", |
| 263 | + "postRestartCommands": [ |
| 264 | + "symbol-file <path to zephyr project>/build/zephyr/zephyr.elf", |
| 265 | + "monitor reset halt", |
| 266 | + "break main" |
| 267 | + ], |
| 268 | + "showDevDebugOutput": "none" |
| 269 | + } |
| 270 | + ] |
| 271 | + } |
| 272 | +
|
| 273 | +7. Create `tasks.json` inside `.vscode` with: |
| 274 | + |
| 275 | + .. code-block:: json |
| 276 | +
|
| 277 | + { |
| 278 | + "version": "2.0.0", |
| 279 | + "tasks": [ |
| 280 | + { |
| 281 | + "label": "flash_wbz451_hex", |
| 282 | + "type": "shell", |
| 283 | + "command": "openocd", |
| 284 | + "args": [ |
| 285 | + "-f", "interface/cmsis-dap.cfg", |
| 286 | + "-f", "target/wbz451.cfg", |
| 287 | + "-c", "init", |
| 288 | + "-c", "reset halt", |
| 289 | + "-c", "program <path to zephyr project>/build/zephyr/zephyr.hex reset exit" |
| 290 | + ], |
| 291 | + "problemMatcher": [], |
| 292 | + "group": { |
| 293 | + "kind": "build", |
| 294 | + "isDefault": true |
| 295 | + } |
| 296 | + } |
| 297 | + ] |
| 298 | + } |
| 299 | +
|
| 300 | +8. Connect the WBZ451 Curiosity board. |
| 301 | +9. Click the **Run and Debug** icon again and select the WBZ451 debug option. |
| 302 | +10. Confirm that the debugger hits the breakpoint in `main.c`. Press **Continue** to proceed. |
| 303 | + |
| 304 | +References |
| 305 | +========== |
| 306 | + |
| 307 | +- `WBZ451 Curiosity Board Product Page <https://www.microchip.com/en-us/development-tool/EV96B94A>`_ |
| 308 | +- `WBZ451 Curiosity Board User Guide <https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/UserGuides/WBZ451-Curiosity-Board-User-Guide-DS50003367.pdf>`_ |
| 309 | +- `Hardware Design Files <https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/BoardDesignFiles/WBZ451+Curiosity+Board+Hardware+Design+Documentation+R7.zip>`_ |
| 310 | +- `PIC32CX-BZ2 and WBZ45 Family Data Sheet <https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/DataSheets/PIC32CX-BZ2-and-WBZ45-Family-Data-Sheet-DS70005504.pdf>`_ |
| 311 | +- `mikroBUS Click Boards <https://www.mikroe.com/click>`_ |
| 312 | +- `Microchip Support Portal <http://support.microchip.com/>`_ |
| 313 | +- `Microchip Direct <https://www.microchipdirect.com/?srsltid=AfmBOop0KWt1byQZUafcD8wwzrgQX_iuCJLi6AmzTIzhI6Ez-D2IZr_M>`_ |
0 commit comments