#interrupt #risc-v #wch #processor #ch32v

no-std qingke

Low level access to WCH's QingKe RISC-V processors

17 releases (4 breaking)

0.5.0 Nov 3, 2024
0.3.0 Oct 10, 2024
0.2.0 May 11, 2024
0.1.9 Mar 27, 2024
0.1.0 Feb 19, 2023

#1980 in Embedded development

Download history 112/week @ 2024-12-24 108/week @ 2024-12-31 66/week @ 2025-01-07 75/week @ 2025-01-14 80/week @ 2025-01-21 117/week @ 2025-01-28 161/week @ 2025-02-04 112/week @ 2025-02-11 51/week @ 2025-02-18 98/week @ 2025-02-25 56/week @ 2025-03-04 83/week @ 2025-03-11 48/week @ 2025-03-18 68/week @ 2025-03-25 26/week @ 2025-04-01 33/week @ 2025-04-08

213 downloads per month
Used in 2 crates

MIT/Apache

33KB
527 lines

qingke & qingke-rt

Crates.io Crates.io docs.rs

Low level access to WCH's QingKe RISC-V processors.

qingke-rt

This crate provides the runtime support for QingKe RISC-V processors.

This provides riscv/riscv-rt like functionality, with the following differences:

  • Use vector table for interrupt handling
  • Handle 1KB address alignment for the entry point(Qingke V2)
  • In-SRAM code executing, highcode handling
  • PFIC support
  • Conflicts with riscv-rt crate

Usage

#[qingke_rt::entry]
fn main() -> ! {
    loop {}
}

// Or if you are using the embassy framework
#[embassy_executor::main(entry = "qingke_rt::entry")]
async fn main(spawner: Spawner) -> ! { ... }

#[qingke_rt::interrupt]
fn UART0() {
    // ...
}

#[qingke_rt::highcode]
fn some_highcode_fn() {
    // ...
    // This fn will be loaded into the highcode(SRAM) section.
    // This is required for BLE, recommended for interrupt handles.
}

Dependencies

~0.5–1MB
~22K SLoC