-
Getting Started and Blinky
09/05/2023 at 01:05 • 0 commentsBlinky, of course! But this really explains how to download a program use the ST-Link.
Connect your ST-Link as follows. If you're using the WeAct ST-Link version of their Mini Debugger, these wire colors apply. Be sure to note that the black wire is NOT ground (as much as we all want it to be). Ground is green! The WeAct ST-Link also supplies 3.3V; no separate supply is needed.
ST-Link pin WeAct Duino pin wire color 3v3 3v3 Red Gnd Gnd Green SWCLK CLK Yellow SWDIO DIO Black NRST NRST White Connection of an ST-Link from a Nucleo board is described in tDuino. That description should all still be correct. Note that SWC is the same as SWCLK is the same as CLK.
Time to navigate the menu items on the Tools Menu!
Be sure you have selected the weArmDuinoG431 as described above.
Then for U(S)ART support:, you can choose "Disabled (No serial support)". We'll get to that in the next Project Log.
Next, Optimize: "Smallest (-Os default)". More details to follow. I haven't played with this much.
Now, C Runtime Library: "Newlib Nano (default)". Again, I haven't messed with this.
Finally, Upload method: "STM32CubeProgrammer (SWD)".
The program we will use will be File -> Examples -> 02 Digital -> BlinkWithoutDelay. No changes are necessary. Verify the sketch. If all goes well, upload. The blue led on the WeAct Duino should be blinking.You want to Run stand-alone? Easy! Disconnect the ST-Link and hook up a battery or power supply providing 3.3 to 20 Volts to either Vcc pin - NOT to 3v3. Hook Ground to any ground pin. The led should blink.