Close

Getting Started and Blinky

A project log for WeAct Duino - Cheap and Powerful!

The purpose of this project is to show how to use the WeAct STM32G431 board as an ARM-based Arduino.

doctekdoctek 09/05/2023 at 01:050 Comments

Blinky, 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 pinWeAct Duino pinwire color
3v33v3Red
GndGndGreen
SWCLKCLKYellow
SWDIODIOBlack
NRSTNRSTWhite

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.

Discussions