STM32L011 bootloader cannot read SRAM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-15 7:18 AM
I have an STM32L011 on a board I am developing.
I can enter the bootloader no problem, as per AN2606/AN3155. I am using USART2, 57600 baud.
I can program FLASH/erase FLASH/read FLASH - all works as expected.
I note that the bootloader reserves 2048bytes of SRAM, I assume it's the addresses 0x2000_0000 .. 0x2000_07FF.
When I try to use the memory read command to read from anywhere in SRAM (whether the bootloader reserved area or any other address) I get a NACK just after the address+xor-check-byte.
I believe the protocol is correctly implemented because the same thing works reading from FLASH addresses (e.g. 0x0800_0000).
Is there a known issue here (I have seen other posts on this forum with similar problems on other STM32 parts - but these are either unresolved or they are trying to read from the reserved SRAM which is expected to be NACK'd).
Solved! Go to Solution.
- Labels:
-
STM32L0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-15 1:28 PM
Dear @Robin_Iddon ,
Your observation is correct and is mentioned in AN2606 here
 
 so All RAM zone will be Nacked by any Write /Read or Go command on STM32L011 devices.
Hope it helps you
STOne-32
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-15 1:28 PM
Dear @Robin_Iddon ,
Your observation is correct and is mentioned in AN2606 here
 
 so All RAM zone will be Nacked by any Write /Read or Go command on STM32L011 devices.
Hope it helps you
STOne-32
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-08-20 8:01 AM
Thanks - we use L03x for some of our code development and had lost track of the fact that the L01 has only 2K of SRAM!
It would be nice if that was more clearly stated in the other sections of the manual ... it's easy to lose track of which parts have only 2K and which parts have more SRAM. For example on page 289 in the L0 SRAM section where it shows 2K are used by bootloader, it could say "see Table 196, L0 section, to determine how much, if any, SRAM is available for user read/write."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-08 1:09 AM
What we need to do to enter bootloader? I think just need to connect PB9-BOOT0 to VDD and reset, but I can't enter bootloader.
I use STM32L011F4U6.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-08 1:14 AM
You should create your own thread - this one is totally unrelated to your problem.
Also, you don't say what tools you're using, what is happening, what error messages you are seeing, etc. Without that, it's hard to see how anyone could help you solve your problem. Create a new thread and describe your problem is more detail, including all your tools, what output you do see, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-08 1:54 AM
sorry for using your POST. Before here, I creaed a topic, then I found this post, I think you have experience so I ask. my problem is it seems never enter bootloader program, doesn't matter with tools. after I connect PB9-BOOT0 to VDD, and power up the MCU, it run from application program, I suppose it should be stuck at bootloader, wait for messages from USART2 port, but it doesn't. also I tried use STM32 flash loader demostate, It reply no connection, I think the reason is clear, MCU not enter bootloader, LED is flashing. the USART2 connection to PC is tested, works well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-08 4:42 AM
It's possible you have programmed the option bytes to override BOOT0 operation.
See the reference manual for your MCU and look at the options byte functionality.
You may still be able to get in with SWD but you will need a jlink or similar SWD tool.
If this is your own design and you haven't yet programmed another board try with that.
If this is a nucleo or similar it has a jlink onboard.
If this is a 3rd party design, ask the vendor to help.
