Hi,
I'm trying to use XIP on our custom board running a nrf5340 with a different Flash memory than the one on the nrf5340-devkit.
The XIP worked on nrf5340dk, but now it's not working on the custom board. We are using a different Flash memory, W25Q64JW instead of the one on the devkit (MX25R64).
Not sure if it is the commands sent to the Flash that needs to be changed, but the commands looks pretty much the same on both flash memories.
Starting to think maybe that the problem is when trying to Flash the custom board, and specifically the external flash with the commands:
nrfjprog --qspicustominit --qspieraseall nrfjprog --coprocessor CP_APPLICATION --sectorerase --qspisectorerase --program zephyr.hex --verify
How is the QSPI peripheral initiated with these commands?
The problem I have is that I get the following: "Usage Fault":
***** USAGE FAULT ***** [00:00:00.326,477] <err> os: Attempt to execute undefined instruction [00:00:00.326,507] <err> os: r0/a1: 0x00000000 r1/a2: 0x0000001c r2/a3: 0x0000001b [00:00:00.326,538] <err> os: r3/a4: 0x20001940 r12/ip: 0x10000001 r14/lr: 0x0000261f [00:00:00.326,538] <err> os: xpsr: 0x29000000 [00:00:00.326,568] <err> os: Faulting instruction address (r15/pc): 0x10000000
And this is the resultl when trying to flash the external flash:
nrfjprog --coprocessor CP_APPLICATION --sectorerase --qspisectorerase --program zephyr.hex --verify --log Parsing image file. Verifying programming. ERROR: [ nRF53] - Data does not match in QSPI memory address range [0x00000000-0x00000060] ERROR: [ nRF53] - QSPI memory verification failed ERROR: [ nRF53] - Failed while verifying file zephyr.hex. ERROR: Write verify failed.
So I don't think the code is actually flashed to the external memory.
BR