Get to know your hardware
- Microcontroller: STM32F411CEU6
- Temperature and pressure sensor: Bosch BME280
- MicroSD card reader: WaveShare 3947 Changed to Mini Micro SD Card Reader
- LoRa: seeed studio WIo-E5 mini
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.
Using Nucleo ST-Link
- Take off the jumpers from ST-Link's CN2 connector
- 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
Using standalone ST-LINK
- Connect the wires according to the diagram below:
- 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.