Skip to content

Add support for CH32H417 #1023

Open
Open

Description

@So1aric

CH32H417 is a heterogeneous dual-core RISC-V MCU from WCH (Nanjing Qinheng Microelectronics), featuring one QingKe V3F core and one QingKe V5F core. I'm opening a separate issue rather than commenting on the tracking issue because this heterogeneity raises questions beyond a typical single-core port.
MicroZig already supports the CH32V family, but the official MountRiver Studio workflow for the CH32H417 is quite different: you write two separate firmware binaries, one for each core, and then merge them into a single .bin file that can be flashed to the chip. I'm not sure how MicroZig should organize this kind of multi-core project — that is, how the two cores' firmware should be structured.
I recently bought a nanoCH32H417 board and would be happy to contribute the port.

Activity

  1. mattnite commented on Sep 2, 2026

    @mattnite
    Contributor

    I feel like the right way to do this is to expose it in the port some way. There are already different ways that ports will customize artifact generation. IIRC LPC needs to patch ELF with a checksum, and I think there are some image generation scripts for ESP.

    This could work largely the same. I'm not sure though if the method is specific to their bootloader, or it's lower level. Regardless, this is quite possible and can be done in a way to make tooling reusable.

  2. So1aric commented on Sep 23, 2026

    @So1aric
    ContributorAuthor

    Basic support is now in place — the firmware builds successfully and GPIO works.

    The HAL, however, is still bare-bones. I've gotten Systick, Usart, and DMA working (I'll open a PR once #1027 is merged), and I'm currently working on SPI since the nanoCH32H417 has an SPI LCD. UHSIF is next on my list.

    The biggest challenge is the USB peripherals. I'm not familiar with USB, and TBH I struggle to make sense of the registers even after going through the manual — this is more a limitation on my side than anything wrong with the documentation. So this part will probably need someone more experienced with USB to take on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportAdding support for new hardware

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions