Unable to flash STM32L071 board using USART even after entering bootlaoder mode.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-21 2:02 AM
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 belowAfter 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?
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-20 6:24 AM
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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-21 6:44 AM
First check if you can flash over STMCubeproggrammer using UART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-25 1:27 AM
Yes, I tried to flash using STMCubeprogrammer and that too failed with error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-11-28 7:04 AM
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.
Thanks,
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-20 6:18 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-20 6:24 AM
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.​
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-20 7:14 AM
Are you sure you connect to pins desired
and parity from your screenshot is none . Setup all ok and it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-22 8:31 PM
@Community member​ Thank you very much for the help. After ensuring the following aspects programming using UART was successful:
- 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.
- 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.
