Read data directly from external nor flash

Hello,

I'm using the following setup:

  1. nRF Connect SDK v2.9.0
  2. B0, upgradable secure MCUBoot, and application
  3. Statically defined partitions in the partition manager

I have an external NOR flash of 4MB.

I'm storing a large amount of data (~4KB) in my external NOR flash, which will always be at the same offset in the flash.

Currently, I'm using flash_read to retrieve the data, but it consumes a significant amount of RAM. I saw that XIP (Execute In Place) can be used for read-only purposes, but I can't find any samples or guidance on how to implement it.

Please note that I'm not referring to using XIP to run code from the external flash; all I need is a way to hold a pointer to data that is stored in it.

Could you provide any examples or hints on how to use XIP for accessing read-only data in external NOR flash without wasting RAM?

Thank you for your assistance.

Best regards,
Udi

Parents Reply
  • checking the product spec on your site of nrf52840 + the nrf52840.h from the old sdk (mbk) + the NRF_QSPI_Type type taken from the nrf52840.h file in the nrf dir in nrf connect it seems there is no XIPEN register, only XIPOFFSET, am i to understand that it is always active ? if not i need an example on how to activate it in nrf52840 as even the product spec doesn't explains it. again i do not fear for race condition cause i read specific areas into ram and use them later on from there and next time is 24 hours later...

Children
Related