cancel
Showing results for 
Search instead for 
Did you mean: 

UART DFU mode does not work after the board has been programmed

teddyw
Visitor

Dear Sir,

My board is equipped with STM32G431 MCU. 

I found that the UART DFU mode of my board does not work after the flash of the MCU has been programmed. The UART DFU mode can only work with a blank MCU that have not been programmed before. I have only used the default setting in the CubeProgrammer.

I appreciate if you can give me any suggestion.

10 REPLIES 10
mƎALLEm
ST Employee

Hello @teddyw and welcome to the ST community,

There is no UART DFU mode. They are separated things: DFU: bootloader over USB and bootloader over UART.

So you mean the bootloader over UART?

You need to provide the exact steps you followed to program the MCU with the ST bootloader.

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.
FBL
ST Employee

Hi @teddyw 

Do you have the same issue with reference board?

 

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.


I have no idea it is DFU or Bootloader UART. I am just using CubeProgrammer UART to communicate with the board. ST has doc mentioning about DFU and bootstrap. Please clarify.  

Hi,

I have set the BOOT0 pin to high during power up then what mode should the MCU go into ?

Is it bootstrap or DFU ?

As I requested previously,

You need to provide more information about your environment:

- The board you are using. If custom board, share the schematics, if ST board provide the board name.

- The steps you followed to program the chips and the sequences of reset, Boot pin etc ..

 

 

 

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.

The board is built by myself. I am using STM32G431.

The following is the bootup sequence.

1. boot0 pin = high

2. plug the uart cable

3. powerup 

4. Use CubeProgrammer (115200bps 8-bit even-parity, no flow control)

I found that the CubeProgrammer can only work with the blank new MCU. Once the MCU has been programmed, the CubeProgrammer cannot work with the MCU even the full chip erase has been done on the MCU. 

Our firmware can execrise the UART with the terminal program, teraterm. I can still using the STLINK to program the MCU. The only issue occurred for the CubeProgrammer with UART.

 

What do you mean by "cannot work with the MCU"?

Show screenshot(s) of the error you are facing with CubeProgrammer. You can also play with the verbosity level to show more messages: 

mALLEm_0-1763389294266.png

What pins are you using to access the UART bootloader?

Please review How to write your question to maximize your chances to find a solution

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.

I have captured the log as follows.

teddyw_0-1763389879661.png

14:29:31 : STM32CubeProgrammer API v2.20.0 | Windows-64Bits
14:29:41:895 : RTS low
14:29:41:895 : DTR Low
14:29:41:913 : Serial Port COM3 is successfully opened.
14:29:41:913 : Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
14:29:41:913 : No Init bits value is : 0
14:29:41:913 : Sending init command:
14:29:41:919 : #byte 0x7F sent successfully to target
14:29:43:915 : Wait ends after 1 loop, dataready = 0, delay = 2000
14:29:43:916 : Timeout error occured while waiting for acknowledgement.
14:29:43:916 : No response from target received
14:29:43:917 : Retrying UART init connection...
14:29:43:918 : #byte 0x7F sent successfully to target
14:29:44:116 : Wait ends after 2 loop, dataready = 0, delay = 200
14:29:44:117 : Timeout error occured while waiting for acknowledgement.
14:29:44:118 : No response from target received
14:29:44:118 : Error: Activating device: KO. Please, verify the boot mode configuration and check the serial port configuration. Reset your device then try again...
14:29:44:222 : UART PORT CLOSE

Did you assert the Reset after setting the boot pin to High in the second trial?

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.