Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

config BOARD_PIC32CM_JH01_CPRO
select SOC_PIC32CM5164JH01100
6 changes: 6 additions & 0 deletions boards/microchip/pic32c/pic32cm_jh01_cpro/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

board_runner_args(jlink "--device=PIC32CM5164JH" "--speed=4000")

include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
9 changes: 9 additions & 0 deletions boards/microchip/pic32c/pic32cm_jh01_cpro/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

board:
name: pic32cm_jh01_cpro
full_name: PIC32CM JH01 Curiosity Pro
vendor: microchip
socs:
- name: pic32cm5164jh01100
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
104 changes: 104 additions & 0 deletions boards/microchip/pic32c/pic32cm_jh01_cpro/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
.. zephyr:board:: pic32cm_jh01_cpro

Overview
********

The PIC32CM JH01 Curiosity Pro evaluation kit is a hardware platform
to evaluate the Microchip PIC32CM JH01 microcontroller, and the
evaluation kit part number is EV81X90A. The evaluation kit offers a
set of features that enables the PIC32CM JH01 users to get started with
the PIC32CM JH01 peripherals, and to obtain an understanding of how to
integrate the device in their own design.

Hardware
********

- 100-pin TQFP PIC32CM5164 JH01 microcontroller
- 32.768 kHz crystal oscillator
- 32 MHz crystal oscillator
- 512 KiB flash memory and 64 KiB of RAM
- One yellow user LED
- One green board power LED
- One mechanical user push button
- One reset button
- One driven shield Touch button
- Trust Anchor (TA100) Secure Element
- Virtual COM port (CDC)
- Programming and debugging of on-board PIC32CM JH01 through Serial Wire Debug (SWD)
- Arduino uno connector

Supported Features
==================

.. zephyr:board-supported-hw::

Connections and IOs
===================

The `PIC32CM JH01 Curiosity Pro User Guide`_ has detailed information about board connections.

Programming & Debugging
***********************

.. zephyr:board-supported-runners::

Flash Using J-Link
==================

To flash the board using the J-Link debugger, follow the steps below:

1. Install J-Link Software

- Download and install the `J-Link software`_ tools from Segger.
- Make sure the installed J-Link executables (e.g., ``JLink``, ``JLinkGDBServer``)
are available in your system's PATH.

2. Connect the Board

- Connect the `J32 Debug Probe`_ to the board's **CORTEX DEBUG** header.
- Connect the other end of the J32 Debug Probe to your **host machine (PC)** via USB.
- Connect the DEBUG USB port on the board to your host machine to **power up the board**.

3. Build the Application

You can build a sample Zephyr application, such as **Blinky**, using the ``west`` tool.
Run the following commands from your Zephyr workspace:

.. code-block:: console

west build -b pic32cm_jh01_cpro -p -s samples/basic/blinky

This will build the Blinky application for the ``pic32cm_jh01_cpro`` board.

4. Flash the Device

Once the build completes, flash the firmware using:

.. code-block:: console

west flash

This uses the default ``jlink`` runner to flash the application to the board.

5. Observe the Result

After flashing, **LED0** on the board should start **blinking**, indicating that the
application is running successfully.

References
**********

PIC32CM JH01 Product Page:
https://www.microchip.com/en-us/product/PIC32CM5164JH01100

PIC32CM JH01 Curiosity Pro evaluation kit Page:
https://www.microchip.com/en-us/development-tool/ev81x90a

.. _PIC32CM JH01 Curiosity Pro User Guide:
https://ww1.microchip.com/downloads/aemDocuments/documents/MCU32/ProductDocuments/UserGuides/PIC32CM-JH01-Curiosity-Pro-Evaluation-Kit-User-Guide-DS70005482.pdf

.. _J-Link software:
https://www.segger.com/downloads/jlink

.. _J32 Debug Probe:
https://www.microchip.com/en-us/development-tool/dv164232
60 changes: 60 additions & 0 deletions boards/microchip/pic32c/pic32cm_jh01_cpro/pic32cm_jh01_cpro.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2025 Microchip Technology Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <microchip/pic32c/pic32cm_jh/pic32cm_jh01/pic32cm5164jh01100.dtsi>
#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
model = "PIC32CM JH01 Curiosity Pro";
compatible = "pic32cmjh01,cpro", "microchip,pic32cm5164jh01100", "microchip,pic32cm";

chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};

aliases {
led0 = &led0;
sw0 = &button0;
};

leds {
compatible = "gpio-leds";

led0: led_0 {
gpios = <&portc 5 GPIO_ACTIVE_HIGH>;
label = "Yellow LED";
};
};

buttons {
compatible = "gpio-keys";

button0: button_0 {
gpios = <&portb 19 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "SW0";
zephyr,code = <INPUT_KEY_0>;
};
};
};

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

storage_partition: partition@7c000 {
label = "storage";
reg = <0x0007c000 0x4000>;
};
};
};

&cpu0 {
clock-frequency = <4000000>;
};
14 changes: 14 additions & 0 deletions boards/microchip/pic32c/pic32cm_jh01_cpro/pic32cm_jh01_cpro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

identifier: pic32cm_jh01_cpro
name: PIC32CM JH01 Curiosity Pro
type: mcu
arch: arm
toolchain:
- zephyr
flash: 512
ram: 64
supported:
- gpio
vendor: microchip
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_ARM_MPU=y
1 change: 1 addition & 0 deletions drivers/gpio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ zephyr_library_sources_ifdef(CONFIG_GPIO_MAX2219X gpio_max2219x.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MAX32 gpio_max32.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCHP_MEC5 gpio_mchp_mec5.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCHP_MSS gpio_mchp_mss.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCHP_PORT_G1 gpio_mchp_port_g1.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCP230XX gpio_mcp230xx.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCP23SXX gpio_mcp23sxx.c)
zephyr_library_sources_ifdef(CONFIG_GPIO_MCP23XXX gpio_mcp23xxx.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ source "drivers/gpio/Kconfig.max14917"
source "drivers/gpio/Kconfig.max22017"
source "drivers/gpio/Kconfig.max2219x"
source "drivers/gpio/Kconfig.max32"
source "drivers/gpio/Kconfig.mchp"
source "drivers/gpio/Kconfig.mchp_mss"
source "drivers/gpio/Kconfig.mcp23xxx"
source "drivers/gpio/Kconfig.mcux"
Expand Down
9 changes: 9 additions & 0 deletions drivers/gpio/Kconfig.mchp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

config GPIO_MCHP_PORT_G1
bool "Microchip PORT G1 GPIO driver"
default y
depends on DT_HAS_MICROCHIP_PORT_G1_GPIO_ENABLED
help
This option enables GPIO driver for group (g1) of PORT peripherals.
Loading