Following this video, I wrote a simple LED blink program on the Arduino IDE to test if my STM32 is fine.
void setup() {
// put your setup code here, to run once:
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
Serial.print("Start");
}
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
This is how I configured the settings in the tools
menu:
But once I clicked on upload
, I got this error:
I used an FTDI breakout board to program the STM32 by following this video.
The LEDs on the FTDI breakout board didn't flash and the Tx and Rx lines are fixed at 3.1V. I'm not sure why I got the error. How can I fix this?
And when I clicked on Board info
, I got this:
And if I upload the code without opening the serial monitor, I get this error: Using Parser : Raw BINARY
-
1\$\begingroup\$ Did you put the arduino bootloader on the device? \$\endgroup\$mmmm– mmmm2021年07月27日 14:04:44 +00:00Commented Jul 27, 2021 at 14:04
-
\$\begingroup\$ No. No such thing was mentioned in the video. Since the lights on the FTDI aren't flashing, I think that my laptop is unable to communicate with the FTDI @mmmm Edit: The LEDs on the FTDI briefly flash when I connect it to my PC, but it does nothing when I upload the sketch. \$\endgroup\$Prathik Prashanth– Prathik Prashanth2021年07月27日 14:18:17 +00:00Commented Jul 27, 2021 at 14:18
-
\$\begingroup\$ That's not a programming problem, but something else. You have COM3 but the Arduino can't open COM3 for some reason it does not tell. Do you have any idea what in your PC might open COM ports and have you rebooted your PC? \$\endgroup\$Justme– Justme2021年07月27日 16:02:37 +00:00Commented Jul 27, 2021 at 16:02
-
\$\begingroup\$ Yes, I rebooted my PC. What does "Do you have any idea what in your PC might open COM ports " mean? @Justme \$\endgroup\$Prathik Prashanth– Prathik Prashanth2021年07月27日 16:29:19 +00:00Commented Jul 27, 2021 at 16:29
-
\$\begingroup\$ Does youtube.com/watch?v=e0CP2IpIBg4 help?? \$\endgroup\$Scott Seidman– Scott Seidman2021年07月27日 19:11:52 +00:00Commented Jul 27, 2021 at 19:11
1 Answer 1
My STM32 is now working. I changed the COM port in the device driver menu and set its baud rate to 115200. I think that made it work.