Get to know your hardware

Connect it all together

Connections schematic

This Schematic is for the 3rd version of PCB

STM32f411CEU6 Pinout

Flashing

STM32f411CEU6 microcontroller doesn't come with a programmer/debugger on board. Thus, external ST-Link is required to flash the software.

  1. Take off the jumpers from ST-Link's CN2 connector

  1. Connect the first 4 pins of the CN4 connector to microcontroller:
    • VDD <-> 3V3
    • SWCLK <-> SWCLT
    • GND <-> GND
    • SWDIO <-> SWDIO

Connect the ST-Link and the MCU to your PC using USB cables. Then in the cansat directory run the following command from command-line

cargo xtask embed
  1. Connect the wires according to the diagram below:

  1. Connect the ST-Link and the MCU to your PC using USB cables. Then in the cansat directory run the following command from command-line
cargo xtask embed

Using DFU

This should work right away on Linux. On windows you have to download LibusbK (you can pick it in Zadig program).

Info: libusb-win32 did not work when testing

Run:

cargo install cargo-dfu

Connect your board to USB, hold BOOT0 button, press NRST button and release BOOT0 button. This should run the MCU in bootloader mode.

The blue LED will not flash in this mode. The red LED will be on constantly

Change directory to the project you want to flash, e.g

cd crates/cansat-stm32f4

and run

cargo dfu

Troubleshooting

If your device is not recognized correctly by your system, try disconnecting all serial peripherals and repeat the steps above.