Skip to content

albertskog/ch32v003-blinky-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CH32V003 Blinky in Rust

I could not find a small and simple blinky example for CH32V003 and probe-rs, so here it is!

Hardware

I used CH32V003F4P6-EVT-R0 and WCH-LinkE. The project is set up for CH32V003F4P6 but should work with any other CH32V chip as well, just change it in Cargo.toml and .cargo/config.toml. The WCH-Link is detected automatically by probe-rs.

Connections

On CH32V003F4P6-EVT-R0, connect PD6 to LED1.

Between CH32V003F4P6-EVT-R0 and WCH-LinkE, connect:

VCC to 3V3
GND to GND
PD1 to SWDIO/TMS

Running

  1. Install Rust and probe-rs.

  2. Set up project to use Rust Nightly

cd ch32v003-blinky-rust
rustup install nightly
rustup override set nightly
  1. Install std sources
rustup component add rust-src
  1. Connect board and run with
cargo run

Acknowledgements

This was based on the examples project in ch32-hal. You can find the original code here:

https://github.com/ch32-rs/ch32-hal/tree/main/examples/ch32v003

About

Rust blinky example for WCH CH32V003

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages