Hi,
my custom nrf5340 board has an external flash GD25Q127C(16M bytes), and everything is working well, able to access the QSPI flash via the nrfjpro tool and the firmware.
but now I need to change the GD25Q127C to GD25Q256E(32M bytes), I am facing a strange issue :
1. erase 4Kbytes at address 0x00,then 4Kbytes at address 0x1000000 is erased automatically
2. write data to address 0x00, then the same data is written at address 0x1000000
or
1. erase 4Kbytes at address 0x1000000 ,then 4Kbytes at address 0x00 is erased automatically
2. write data to address 0x1000000 , then the same data is written at address 0x00
that means the flash operation at address N will be executed at address 0x1000000+N at the same time, or the flash operation at address 0x1000000+N will be executed at address N.
this issue occurs when erase/write the flash by nrfjpro tool and zephyr flash API.
I note that the QSPI flash has 24-bits and 32-bits address modes.
I try to add "address-size-32" to the DTS file and "AddressMode = BIT32" to QspiDefault.ini, but I can not write flash correctly, always read back the data with 0.
&qspi { status = "okay"; pinctrl-0 = <&qspi_default>; pinctrl-1 = <&qspi_sleep>; pinctrl-names = "default", "sleep"; gd25q127: gd25q127c@0 { compatible = "nordic,qspi-nor"; reg = <0>; /* MX25R64 supports only pp and pp4io */ writeoc = "pp"; /* MX25R64 supports all readoc options */ readoc = "read4io"; sck-frequency = <8000000>; label = "GD25Q127"; jedec-id = [c8 40 19]; sfdp-bfp = [ /*e5 20 f1 ff ff ff ff 07 44 eb 08 6b 08 3b 42 bb ee ff ff ff ff ff 00 ff ff ff 00 eb 0c 20 0f 52 10 d8 00 ff*/ e5 20 f3 ff ff ff ff 0f 44 eb 08 6b 08 3b 42 bb ee ff ff ff ff ff 00 ff ff ff 00 ff 0c 20 0f 52 10 d8 00 ff d6 39 a5 fe 83 1f 15 51 ec 62 16 33 7a 75 7a 75 04 bd d5 5c 00 06 64 00 08 50 00 01 ]; size = <268435456>; has-dpd; t-enter-dpd = <10000>; t-exit-dpd = <35000>; address-size-32; }; };
by the way, for the nrfjpro, I need to program the UI resource(larger than 16M bytes ) to the QSPI flash. for the NCS, I need to upgrade the firmware over the external flash, so I place the secondary slot at the top address of the QSPI flash.
any idea on this issue?
Thanks!