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
  • Hi Amanda.

    The post is irrelevant as it speaks of cache for XIP.
    We are not talking about that, the request is simple:
    An example of zephyr app (for nrf52840-dk) that uses XIP preferable the last 1 mb of the flash for reading (not executing anything of the external flash, just reading data). for now assume we don't care how the data got there, we don't need to flash it with nrfjprog and .hex file.

    There are such examples for nrf53840 but not for nrf52840. For the very least a ref to the product spec and registers or driver you have (if you have) cause we were unable to find that data.

Children
Related