I am trying to get the mentioned board working with just a basic program to turn on an LED. I have FTDI pins Tx, Rx, VCC, and GND connected to A9, A10, 3.3, and GND of the board respectively. I am able to successfully upload the program to the board from Arduino IDE over Serial successfully (see below).
Using Parser : Raw BINARY
Interface serial_w32: 115200 8E1
Version : 0x22
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0412 (Low-density)
- RAM : 10KiB (512b reserved by bootloader)
- Flash : 32KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
...
Wrote address 0x08002b98 (100.00%) Done.
Starting execution at address 0x08000000... done.
The PWR LED on the board is red while it's connected to the FTDI, however when I run the basic "Blink" program, the onboard LED (PC13) does not blink, I have also tried changing the pin in the code to digital output pins like PB12-PB15 with an LED and 220 ohm resistor connected between the output pin and GND but nothing happens.
Blink example code (2 = PC13)
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin PB1 as an output.
pinMode(2, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(2, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
The main reason I can think of this happening is because I initially had the FTDI in 5V mode connected to the 5V pin of the board. That shouldn't be an issue though because then what would be the point of the 5V pin? If anyone has any ideas please let me know.
The Arduino IDE board library by stm32duino that was recommended in the tutorial was outdated. Using the library by ST Microelectronics to select my board in Arduino was the solution. The library index can be found here and should be added to the board manager. This allowed me to select the board STM32F1 Series. Now flashing my program onto the board works.