Skip to main content
SS.6
Associate
January 17, 2019
Question

Is that possible to write into external flash when the code is excuted from external flash?

  • January 17, 2019
  • 3 replies
  • 1392 views

Hi all, I would like to know whether the write access to external flash is possible when the code execution is from external flash? When I tried to write on external flash HAL function returns driver busy, since it's been used in memory mapped mode for XIP.  

This topic has been closed for replies.

3 replies

Tesla DeLorean
Guru
January 17, 2019

No, generally external NOR devices don't permit erase/write and read operation to occur concurrently.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
rowant
Visitor II
January 18, 2019

Not if the code to do the writing is on the external flash. Memory mapped mode is read only. To write, you could have some blocking code on your internal flash that disables memory mapped mode, performs the write and then re-enables memory mapped mode before returning.

SS.6
SS.6Author
Associate
January 18, 2019

Thanks Clive.

Can we switch to indirect mode to write the data into external flash(not in the code region), then switch back to memory mapped mode. If it is possible, from where the code will be executed if switch to indirect mode.

Rowant,

Thanks for the reply. Means my actual application will be stalled, jump to internal flash to write the data into external flash.