I am trying to program a QSPI flash with a file system. I have confirmed that my qspi ini is correct as i can read write and erase. I created a small file system on an usb disk and used HxD to read it to a .bin of the file system. I can then either use objcopy or JFlash to create a hex file with my file system placed passed the mcuboot partition. The issue I have is that when I flash I just get 0's back and the verify fails. below is my testing.
Erase Write Read
nrfjprog --log -f nRF53 --qspiini con_qspi.ini --qspieraseall
nrfjprog --log -f nRF53 --qspiini con_qspi.ini --memwr 0x100f0000 --val 0xAAAA
nrfjprog --log -f nRF53 --qspiini con_qspi.ini --memrd 0x100F0000 --n 100
D:\ZephyrWorkspace\ShockStream\Controller\fs>nrfjprog --log -f nRF53 --qspiini con_qspi.ini --memwr 0x100f0000 --val 0xAAAA Parsing parameters. [ #################### ] 0.000s | Reading external memory, 0x0004 bytes @ 0x000F0000 - Done Initializing the QSPI peripheral. Writing. Uninitializing the QSPI peripheral. D:\ZephyrWorkspace\ShockStream\Controller\fs>nrfjprog --log -f nRF53 --qspiini con_qspi.ini --memrd 0x100F0000 --n 100 [ #################### ] 0.000s | Reading external memory, 0x0064 bytes @ 0x000F0000 - Done 0x100F0000: 0000AAAA FFFFFFFF FFFFFFFF FFFFFFFF |................| 0x100F0010: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................| 0x100F0020: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................| 0x100F0030: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................| 0x100F0040: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................| 0x100F0050: FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF |................| 0x100F0060: FFFFFFFF
Write Hex
D:\Nordic\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-objcopy.exe -v -I binary -O ihex --change-addresses 0x100f0000 nor2.bin nor2.hex
nrfjprog --log -f nRF53 --qspiini con_qspi.ini --qspieraseall
nrfjprog -f nRF53 --coprocessor CP_APPLICATION --qspiini con_qspi.ini --program nor2.hex --verify
D:\ZephyrWorkspace\ShockStream\Controller\fs>nrfjprog -f nRF53 --coprocessor CP_APPLICATION --qspiini con_qspi.ini --program nor2.hex --verify [ #################### ] 177.071s | Program file - Done programming [error] [ Client] - Encountered error -160: Command verify_file executed for 158239 milliseconds with result -160 [error] [ nRF53] - Failed while performing 'Verify' operation on target address 0x100F0000. -160: Data does not match in address range [0x100F0000 - 0x108EFFFF] (XIP (QSPI)) Expected byte value 0xEB but read 0x00 at address 0x100F0000. [error] [ nRF53] - Failed while verifying device. -160: Data does not match in address range [0x100F0000 - 0x108EFFFF] (XIP (QSPI)) Expected byte value 0xEB but read 0x00 at address 0x100F0000. [error] [ Worker] - Data does not match in address range [0x100F0000 - 0x108EFFFF] (XIP (QSPI)) Expected byte value 0xEB but read 0x00 at address 0x100F0000. ERROR: Write verify failed. NOTE: For additional output, try running again with logging enabled (--log). NOTE: Any generated log error messages will be displayed. PS D:\ZephyrWorkspace\ShockStream\Controller\fs> .\fs.bat D:\ZephyrWorkspace\ShockStream\Controller\fs>nrfjprog --log -f nRF53 --qspiini con_qspi.ini --memrd 0x100F0000 --n 100 [ #################### ] 0.000s | Reading external memory, 0x0064 bytes @ 0x000F0000 - Done 0x100F0000: 00000000 00000000 00000000 00000000 |................| 0x100F0010: 00000000 00000000 00000000 00000000 |................| 0x100F0020: 00000000 00000000 00000000 00000000 |................| 0x100F0030: 00000000 00000000 00000000 00000000 |................| 0x100F0040: 00000000 00000000 00000000 00000000 |................| 0x100F0050: 00000000 00000000 00000000 00000000 |................| 0x100F0060: 00000000 |....|