Memory controller (MEMC) driver
Overview
This sample demonstrates reading and writing external memory through a
memory controller driver. It works with both memory-mapped drivers and
drivers implementing the MEMC subsystem API (<zephyr/drivers/memc.h>).
The memory region is referenced via the sram-ext or psram0
devicetree alias and must not overlap with memory used by the application.
Building and Running
This application can be built and executed on an RT595 EVK as follows:
west build -b mimxrt595_evk/mimxrt595s/cm33 samples/drivers/memc
west build -t run
To build for another board, change “mimxrt595_evk/mimxrt595s/cm33” above to that board’s name.
Sample Output
*** Booting Zephyr OS build zephyr-v3.2.0-2686-gd52d828c2bdc ***
Writing to memory, size 0x800000
Check (0/8191) passed!
Check (1/8191) passed!
...
Check (8190/8191) passed!
Check (8191/8191) passed!
First 1KB of Data in memory:
\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=
00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f
20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f
....
Read data matches written data