2025-01-16
04:51 AM
- last edited on
2025-01-22
02:33 AM
by
Lina_DABASINSKA
Hi guide,
I am working with stm32u585 interface with Ext-Flash. I have SBSFU code in that I am doing external flash initialization(Indirect mode) in Boot code (boot_platform_init) to check firmware is available for update or not . Then after switching to secure next Non secure. In Non secure part I am doing initialization(Indirect mode) again and Reading / writing / erasing is working. after that I am switching to Memory map mode and I am getting memory map enable success command and trying to read the data at address 0x70000000, then program got stuck here .
can anyone help me , what may be the issue?
2025-01-16 07:07 AM
>>I am getting memory map enable success command and trying to read the data at address 0x70000000, then program got stuck here.
Stuck where? Are you getting a Hard Fault or Mem Fault? Would you know? Do the handlers output any diagnostic information so that you'd be aware.
Is it stalling the MCU doing the External Flash read? It there are timeout? Can you program this memory normally via an External Loader?
The Memory Mapping should use a template equivalent to a Read command you might issue normally, just with the MCU masking and stuffing the address into the transaction. Review what you're providing as a template, and test it.
2025-01-22 02:35 AM
Hi @Tesla DeLorean ,
Thanks for your continued support.
->Stuck where? Are you getting a Hard Fault or Mem Fault? Would you know? Do the handlers output any diagnostic information so that you'd be aware.
It's getting Mem Fault, The program got stuck to that particular line (picture shown below).
-> Is it stalling the MCU doing the External Flash read? It there are timeout? Can you program this memory normally via an External Loader?
yes, (as shown above picture). No timeout has approached as of now.
If I program normally with only Non-Secure independent code , I can able to perform action's in both mode.( Indirect mode and Memory mapping mode ).
2025-01-22 09:29 PM
Continue...
I am facing above issue , when trust zone is enabled and now I configured without external flash code in Boot code, I configured the external flash driver only in Non-secure part. I am unable to initialize here, It's not getting access to OCTOSPI2 peripheral only.
Note : If I configure same external flash driver independently with creating a new project (Non-secure) , I am able to initialize OCTOSPI2-External flash and do Read /Write /Erase actions in both modes (Indirect mode and memory mapping mode). .
can anyone suggest , what it causing to stop initialization external flash in NS code.