ch32-hal
ch32-hal copied to clipboard
feat: add basic device code
This is a work in progress and am opening for visibility and help.
This PR aims to add a example for the nrf24 via SPI and essentially is a port of https://github.com/rtxm/rust-nrf24l01 that avoids std
and uses the ch32-hal
types.
WARNING: I really don't know what I'm doing so please excuse any silly mistakes***
Status
Currently I can build and flash the device but do not get the expected functionality.
When emitting I often get the following error NrfError::MaxRetries
and when listening the values do not seem to be realistic.
At the moment I am not sure how to best proceed and determine where the issue is, any insight from other CH32/embedded devs would be super helpful!
Please let me know if I can provide any more information.
commands to build/flash
cargo build --release --bin spi-nrf24 && wlink -v flash --enable-sdi-print --watch-serial target/riscv32ec-unknown-none-elf/release/spi-nrf24
Refs
- https://components101.com/wireless/nrf24l01-pinout-features-datasheet
- https://github.com/rtxm/rust-nrf24l01/tree/master