Skip to content

Commit b818b14

Browse files
boards: wbz450_curiosity: add docs and openocd support
Added the index.rst and openocd.cfg file support for wbz450_curiosity Signed-off-by: Dinesh Arasu <[email protected]>
1 parent 224f6b3 commit b818b14

File tree

3 files changed

+334
-0
lines changed

3 files changed

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

0 commit comments

Comments
 (0)