-
Notifications
You must be signed in to change notification settings - Fork 8k
Add basic support for Microchip PIC32CM JH family devices #95480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nashif
merged 6 commits into
zephyrproject-rtos:main
from
Zephyr4Microchip:pic32cm_jh_minimal_support
Sep 13, 2025
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a94df13
modules: microchip: update west.yml and modules
ArunMCHP f30ce87
dts: arm: microchip: add dtsi files for Microchip PIC32CM JH SoC series
ArunMCHP ced9da7
soc: microchip: add support for PIC32CM JH SoC series
ArunMCHP ee8d9b2
dts: gpio: microchip: add gpio dts node and bindings for Port g1 IPs
mchp-asif 6550628
drivers: gpio: microchip: add gpio driver for Port G1 IP
AzharMCHP 2037153
boards: microchip: add PIC32CM JH01 Curiosity Pro Evaluation Kit support
ArunMCHP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
boards/microchip/pic32c/pic32cm_jh01_cpro/Kconfig.pic32cm_jh01_cpro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Binary file added
BIN
+38 KB
boards/microchip/pic32c/pic32cm_jh01_cpro/doc/img/pic32cm_jh01_cpro.webp
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
104
boards/microchip/pic32c/pic32cm_jh01_cpro/doc/index.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
60
boards/microchip/pic32c/pic32cm_jh01_cpro/pic32cm_jh01_cpro.dts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | ||
nordicjm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
14
boards/microchip/pic32c/pic32cm_jh01_cpro/pic32cm_jh01_cpro.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
5 changes: 5 additions & 0 deletions
5
boards/microchip/pic32c/pic32cm_jh01_cpro/pic32cm_jh01_cpro_defconfig
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.