2023-09-07 10:01 PM
I created a custom board with the STM32 (F103C8T6), and I am trying to program it using a FTDI USB to Serial module. However, nothing is happening, it doesn't seem to be sending anything and when I try using STM32CubeProgrammer it says:
Timeout error occured while waiting for acknowledgement.
Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...
Relevant schematics:
Note that BTEN is unconnected and the BT0 header pin is connected to VCC (which should put it into boot mode).
I have tried reversing RXD and TXD and both 9600 and 115200 baud rate. How can I debug this?
2023-09-07 10:51 PM
2023-09-07 11:12 PM
Check part orientation
Check level on NRST
Check RX/TX sense. The STM32 TX should go to the FTFI RX.
Use 8E1 with 0x7F data pattern.
Check connectivity with SWD/JTAG.
Check BOOT0 and BOOT1 levels.
2023-09-08 01:38 AM
Is it a genuine STM32F103, or a blue pill?
JW
2023-09-08 02:39 AM - edited 2023-09-08 02:41 AM
Hello @Nv7
I think what is missing in your design is a header connector for the Serial Wire Debugger on the dedicated IO's:
PA13 SWDIO
PA14 SWDCLK
You could establish a connection with a STLink and the STM32CubeProgrammer in SWD mode to validate that your MCU is programmable/Option Bytes readable and therefore "debug" possible.
This step will allow you to validate the power supply integrity of your PCB (all VDD/VSS and VDDA/VSSA are properly connected and your MCU is correctly powered)
After that, testing the STM32 in bootloader will be your next step.
You can refer to AN2586 Getting started with STM32F10xxx hardware development in section 4 Boot configuration.
Getting started with STM32F10xxx hardware development - undefined
BR
romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-09-08 07:03 AM
- NRST is LOW when button pressed, HIGH when button isn't pressed
- I tried both directions but I did what you said first
- What is 8E1 with 0x7F?
- I didn't get a SWD programmer because I was hoping to program via serial
- BOOT0 is HIGH, BOOT1 is floating
2023-09-08 07:03 AM
It is a STM32F103C8T6 I got assembled from JLCPCB. I am pretty sure it is genuine, but it is on a custom design of mine
2023-09-08 07:04 AM
Unfortunately this board doesn't have SWD debugging since we were expecting to program it via serial. Can we do anything through serial?
2023-09-08 07:26 AM - edited 2023-09-08 07:27 AM
In your design BOOT1 is floating, internal bootloader cannot works.
Again, you should review your design and refer in AN2586 Chapter 4 Boot Configuration.
To enter in Bootloader (System memory in the Table 2 below) you must apply on pins BOOT0 = 1 (VCC) and BOOT1 = 0 (GND).
BR
Romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-09-08 09:17 PM
Shouldn't it still work right now because the flash memory is empty?