cancel
Showing results for 
Search instead for 
Did you mean: 

STM32C071 impossible to flash through UART

alnicko_artem
Associate III

I have custom board with STM32C071 micro controller (I used stm32c031 before) and I can't flash it via UART (cant connect in STM32CubeProgrammer).

UART Used - USART1 (PA9/PA10) with auto baud rate (57600)

STM32CubeProgrammer - v2.20.0

Jump to boot loader mode from FW and can confirm it with st-link debug(with empty flash - dont work too).

Flashing via ST-Link works well, but it will not be available when the device is in the case, so i need UART flashing.

When i connect directly to the device and send 0x7f it doesn't respond as it should.

The only suspicion is that the device does not reassign pins from PA11 PA12 to PA9 PA10, since it uses USB on these pins, because STM32C031 on the same board flashing well, it have no USB and doesn't have this problem

STM32CubeProgrammer log:

12:52:33:798 : RTS low
12:52:33:799 : DTR Low
12:52:33:799 : Serial Port ttyUSB2 is successfully opened.
12:52:33:799 : Port configuration: parity = even, baudrate = 57600, data-bit = 8,                     stop-bit = 1,0, flow-control = off
12:52:33:799 : No Init bits value is : 0 
12:52:33:799 : Sending init command: 
12:52:33:799 : #byte 0x7F sent successfully to target
12:52:33:799 : Wait ends after 1 loop, dataready = 0, delay = 2002
12:52:33:799 : Timeout error occured while waiting for acknowledgement.
12:52:33:799 : No response from target received
12:52:33:799 : Retrying UART init connection...
12:52:33:799 : #byte 0x7F sent successfully to target
12:52:33:799 : Wait ends after 1 loop, dataready = 0, delay = 100
12:52:33:799 : Timeout error occured while waiting for acknowledgement.
12:52:33:799 : No response from target received
12:52:33:800 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again... 
12:52:33:813 :  UART PORT CLOSE 



11 REPLIES 11
mƎALLEm
ST Employee

Hello,

Need to check internally for that information. I will get back to you as soon as I have a feedback.

Internal ticket 214190.

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.
mƎALLEm
ST Employee

Hello @alnicko_artem ,

I got a feedback about this topic.

Indeed, UART1 is not available on STM32C071/ UFQFPN28 package. 

For C031 device a remapping was applied in the bootloader, see this note in the AN2606:

mALLEm_0-1752744069001.png

That's why the USART is available on C031 for the UFQFPN28 package.

For C071, USB/DFU has been added versus C031 and you should use USB instead of USART1 for C071.

Hope that answers your question.

PS: we plan to clarify that in the AN2606

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.