diff --git a/CH32V003.pdf b/CH32V003.pdf deleted file mode 100644 index 859c326..0000000 Binary files a/CH32V003.pdf and /dev/null differ diff --git a/CH32V003RM.PDF b/CH32V003RM.PDF deleted file mode 100644 index 2e8ea68..0000000 Binary files a/CH32V003RM.PDF and /dev/null differ diff --git a/README.md b/README.md index 804aabf..2102266 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,10 @@ The `i2c_driver.h` is copied wholesale from ch32fun i2c_slave examples folder. I RPM readings are getting unstable at ~310-320 RPM but that's probably okay. +## Resources +- Datasheet [CH32V003DS0.PDF](https://www.wch-ic.com/download/file?id=359) +- Reference manual [CH32V003RM.PDF](https://www.wch-ic.com/download/file?id=358) + ## How compile? There's a Makefile shithead @@ -16,14 +20,14 @@ We compile on Debian/ubuntu. Other than the usual `build-essential` stuff you ne ```bash sudo apt install gcc-riscv64-unknown-elf libnewlib-dev libudev-dev libusb-1.0-0-dev ``` -There is a distrobox.ini provided. +There is a `distrobox.ini` provided. -You will also need to clone the [`ch32fun repo`](https://github.com/cnlohr/ch32fun) somewhere and modify the `Makefile`. +You will also need to clone the [`ch32fun` repo](https://github.com/cnlohr/ch32fun) somewhere and modify the `Makefile`. To flash you will also need to compile `minichlink`. Included in the `ch32fun` repo. ### ???.. -Or just use PlatformIO idc. It has debugging. +Or just use PlatformIO idc. We have the file for that too. It has debugging. ## Pins @@ -42,7 +46,7 @@ For the TSSOP20 package, CH32V003FxPx ## Register index -Registers are 8 bit each, but most of them hold 16-bit values. +Registers are 8 bit each, but most of them hold 16-bit values. Library limitation, can't be fucked to rewrite it. Bytes in even registers are high, bytes in odd registers are low. | Register address | Function | R/W |