cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to flash STM32L071 board using USART even after entering bootlaoder mode.

Manoj_Guha_49
Associate II

Hi,

I am using STM32L071 micro controller for my product. We planned to flash the code using USART communication. The USART1 from MCU is connected to embedded system ( Nvidia Xavier NX ) using USB to UART converter. Then the MCU is put into boot mode by setting BOOT0 pin HIGH.

I confirmed that the MCU entered bootloader mode by connecting ST-Link V2 with the MCU and ensured that the PC pointed to the bootloader address(0X1FF00B38) of the STM32L071 series as shown in the image below0693W00000WJ0XVQA1.pngAfter entering system memory mode, if I try to flash the code through UART using STflash tool from Source Forge , I was not able to flash the code. Error shown by the program: Timed out.

Can someone please guide me what I am missing here?

1 ACCEPTED SOLUTION

Accepted Solutions

Make sure to use a USB to Serial using CMOS levels, not RS232

Use a common ground

Ensure no other devices are signalling the STM32 immediately after reset.

The connection is one-shot, if it fails reset and try again.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

7 REPLIES 7
MM..1
Chief II

First check if you can flash over STMCubeproggrammer using UART

Yes, I tried to flash using STMCubeprogrammer and that too failed with error.

Aziz BRIGUI
ST Employee

Hello @Manoj_Guha_49​,

Could you see if you encounter the same issue using STM32CubeProgrammer v2.12.0? You can download the latest release under this link.

If the same issue is encountered, could you share the verbose 3 log file from STM32CubeProgrammer? You can change the verbosity level using this radio button.

0693W00000WJeGZQA1.pngThanks,

Aziz


In order 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.

Hi @Aziz BRIGUI​ ,

Please find the attached image when trying to flash thought UART mode with Verbosity level set to 3. I had verified that the PC is at 0x1FF00510 ( System memory ) when trying this method. I have also tried with different baud rates and parity set to "even", after that also I am getting the same error. Any help for this is very much appreciated. Thanks

0693W00000WLRNRQA5.png

Make sure to use a USB to Serial using CMOS levels, not RS232

Use a common ground

Ensure no other devices are signalling the STM32 immediately after reset.

The connection is one-shot, if it fails reset and try again.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Are you sure you connect to pins desired

0693W00000WLRjDQAX.pngand parity from your screenshot is none . Setup all ok and it work.

Manoj_Guha_49
Associate II

@Community member​  Thank you very much for the help. After ensuring the following aspects programming using UART was successful:

  1. Ensured that no other UART command is sent on UART1 channel when the STM32 enters boot mode. That is when Boot 0 pin is pulled High, then the only packets which should be sent are from the Stm32Flash program or from Cube Programmer. If any other data is sent then it wont accept flashing of data.
  2. Ensured that other USART channels (USART2) are not transmitting any data when in boot mode.

BTW I am using RS422 for programming and not TTL and it is working fine. We can close this issue.