Skip to content

Commit 224f6b3

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

File tree

3 files changed

+340
-0
lines changed

3 files changed

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