I'm having some issues reading memory addresses in an STM32L071RB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-03 9:12 AM
Hello, I'm having some issues with an STM32L071RB. I'm unable to read from memory address 0x08020000 onwards because it's supposed to be read/write-protected.
I had similar results on STM32CubeProgrammer and via the I2C bootloader, which are as follow:
- Reading address 0x08020000 from STM32CubeProgrammer. I get: "Error: Data read fail". Any address from 0x08000000 up to 0x08020000 work fine.
- Reading the whole flash space from I2C bootloader and it fails at "Read address 0x08020000 (66.67%) Failed to read memory at address 0x08020000, target write-protected?"
To remove the read/write protections I tried the following:
On CubeProgrammer
- Making sure all the read/write protections are disabled in the option bytes.
- Tried setting WPRMOD=1 and then WPRMOD=0
- Tried setting RDPROT=0xBB and then back to RDPROT=0xAA
- Tried doing a full erase, which fails because some sections are write protected.
Via I2C bootloader
- Sent commands to remove read and write protections, but the result is the same.
Via firmware
- Reading option bytes using HAL_FLASHEx_AdvOBGetConfig. The result is that PCROPSector, PCROPSector and PCROPState are all 0.
- Tried also to set it to 1 and then back to 0.
This issue seemed to have appeared when I was testing writing and reading from EEPROM, which shouldn't be related.
I'm not sure what else I could try. Any help is appreciated.
- Labels:
-
STM32CubeProgrammer
-
STM32L0 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-03 12:47 PM
Wouldn't the root of the problem be that the part only has 128KB of FLASH?
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
‎2020-09-03 2:40 PM
That makes sense. The question then is why is the STM32CubeProgrammer trying to erase pages outside the available range on a full chip erase? You can see on the screenshots attached that the part number is recognized correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-03 2:48 PM
>>The question then is why is the STM32CubeProgrammer trying to erase pages outside the available range on a full chip erase?
I don't see any screen-shot of that, but the software has plenty of bugs in it.
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
‎2020-09-03 2:52 PM
The screenshot attached shows that the part is properly recognized. I didn't attach a screenshot for the failing full chip erase (I just mentioned it in my comments). It could definitely be just a bug on the software, any ideas on how/where to report it?
Thanks a bunch for the help btw!
