examples/stm32wle5-lp/README.md
Examples in this repo should work with LoRa-E5 Dev Board board.
cargo install defmt-print so you can print log messahes from LPUart1All examples will set all pins to analog mode before configuring pins for the example, if any. This saves about 500uA!!!!
adc example will sleep in STOP1 betwen samples and the chip will only draw about 13uA while sleepingblinky example will sleep in STOP2 and the chip will only draw 1uA or less while sleepingbutton_exti example will sleep in STOP2 and the chip will only draw 1uA or less while sleepingi2c examples will sleep in STOP1 between reads and the chip only draw about 10uA while sleepingFor each example you will need to start defmt-print with the example binary and the correct serial port in a seperate terminal. Example:
defmt-print -w -v -e target/thumbv7em-none-eabi/debug/<module-name> serial --path /dev/cu.usbserial-00000000 --baud 115200
Run individual examples with
cargo flash --chip STM32WLE5JCIx --connect-under-reset --bin <module-name>
for example
cargo flash --chip STM32WLE5JCIx --connect-under-reset --bin blinky
You can also run them with with run. However in this case expect probe-rs to be disconnected as soon as flashing is done as all IO pins are set to analog input!
cargo run --bin blinky
You might need to adjust .cargo/config.toml, Cargo.toml and possibly update pin numbers or peripherals to match the specific MCU or board you are using.
probe-rs run --chip STM32L432KCUx. (use probe-rs chip list to find your chip)embassy-stm32 feature. For example for L432KCU6 it should be stm32l432kc. Look in the Cargo.toml file of the embassy-stm32 project to find the correct feature flag for your chip.If you are unsure, please drop by the Embassy Matrix chat for support, and let us know:
Embassy Chat: https://matrix.to/#/#embassy-rs:matrix.org