/stm32f1xx-sleep-example

Putting your STM32 to sleep with Rust

Primary LanguageRust

Sending SMT32F1 to sleep with Rust

This is the code accompanying this blog post. Head there for some more details on what is going on here.

Requirements

Requires arm toolchain and stlink.

Then connect your st-link to computer and run:

sh build.sh

This will attempt to compile and flash your firmware.

Then, you can try debugging with GDB and OpenOCD

First, start openocd with:

openocd -f openocd.cfg

Then start gdb with:

arm-none-eabi-gdb -q -x openocd.gdb target/thumbv7m-none-eabi/release/stm32f103c8t6-rust-starter

In gdb type continue to start the program.

If your debugger supports SWO, you can read it with:

itmdump --follow -f itm.fifo