cancel
Showing results for 
Search instead for 
Did you mean: 

Issue where flash memory range reads as all zero.

BBekk.1
Associate II

Hello,

I’m working on a project using the stm32l562E-DK. The project is based on (mainline) TFM with a secure and nonsecure application, and bootloader. I’ve modified the TFM sector definitions to change the sizes of the sectors. The bootloader and secure application use flash bank 1 (0x0C000000 to 0x0C040000), and the nonsecure application uses flash bank 2. The second images are on external flash. I have also modified the SECWM option bytes to mark the entire first bank as secure, and second bank as nonsecure.

My problem is that the bootloader is not able to read memory locations above some address in the nonsecure area (0x08046fff). I have verified that the contents of the flash are non-zero with stm32cubeprogrammer, but when the memory location is read by the bootloader, or with the memory viewer in stm32cubeIDE, it shows as all zeroes, both in the 0x08 and 0x0C memory ranges. Changing the SECWM options seem to change the highest memory value that can be read, where the highest memory address that can be read is 0x7000 above the start of the nonsecure memory area, but i’m not sure this always holds true.

I am out of ideas of what could cause this. I would appreciate any suggestions on how to debug this issue.

Best regards,

Bernard Bekker

i have attached my option bytes configuration:

0693W000003RRFTQA4.png0693W000003RRFJQA4.png

3 REPLIES 3
PW.2
Associate

Were you ever able to figure this out? I have run into an identical issue.

PYada.1
Associate III

hello @BBekk.1​ , I am facing a similar issue Have you resolved this issue? Can you help me with this issue?

HI Pyada,
The issue has been fixed for me, but I'm not quite sure how I resolved it. Make sure to carefully check the SECWM settings, stm32cubeprog doesn't always seem to write them successfully.
I'm sorry I can't be of more help.
Bernard