My problem: I can't program a STM32F411CEU6 with Arduino IDE and using UART.
So, I have designed a customized board with an STM32F411CEU6. I'm new in the field and so to prevent any big surprises I just used the design of a Black Pill as a reference (it turns out I had a big surprise

I'm able to program the Black Pill with Arduino IDE in three different ways:
1. Via SWD using the official ST-link v2
2. Via SWD using a Chinese made USB pen ST-link like one: https://www.amazon.com/HiLetgo-Emulator ... a?dchild=1.
3. Via UART using an FTDI UART to USB converter
Also, I'm able to program my customized board:
1. Via SWD using the official ST-link v2
2. Via SWD using the ST-link USB pen
But can't program it using UART.

I'm using pins PA9 and PA10 that are the UART1 pins in STM32F411CEU6 chip. I have tested a UART communication in these pins on my custom board and everything ok (I uploaded a sketch with a "Hello World" message using SWD).
The error:
When I try to connect STM32CubeProgramer using UART (I'm able to connect it using SWD) I get the error:
Code: Select all
12:58:46 : Serial Port cu.usbserial-A50285BI is successfully opened.
12:58:46 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
12:58:48 : Timeout error occured while waiting for acknowledgement.
12:58:48 : Timeout error occured while waiting for acknowledgement.
12:58:48 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...
Btw. Not sure if it is related but the first time I tried the chip, I got the following error:
Code: Select all
RUNNING Program ...
Address: : 0x8000000
Warning: The core is locked up
Start operation achieved successfully
the selected serial port Start operation achieved successfully
does not exist or your board is not connected
1. Open STM32CubeProgramer and click connect
2. Click Option Bytes (OB) located in the left bar
3. Select Read Out Protection and choose AA option
4. Then select PCROP and uncheck the box
4. Click apply
So, any ideas one why I can't program it using UART?