Trouble writing to external NAND flash using nrfutil

We have a custom nRF5340 board that interfaces with an MT29 NAND Flash IC over the SPIM3 peripheral. Our DFU solution involves storing update and rollback images on this external flash. As part of our DFU test suite we have some setup fixtures that use nrfjprog to pre-load images to specific locations in the external flash. With the deprecation of nrfjprog we have been working on moving our test tooling over to nrfutil, and we have hit a snag trying to write to the external flash. 

We are using nrfutil v8.1.1 and nrfutil-device v2.15.6

Our external mem config json is defined as:

{
"firmware_config": {
"peripheral": "SPIM3"
},
"pins": {
"sck": 8,
"csn": 11,
"io0": 9,
"io1": 10,
"io2": 4294967295,
"io3": 4294967295
},
"flash_size": 1073741824,
"page_size": 4096,
"sck_frequency": 32000000,
"address_mode": "MODE32BIT"
}
We are trying to demonstrate functionality by writing to a location and then reading it back. When we do:
nrfutil device --x-ext-mem-config-file ext_mem_cfg.json read --address 0x10000000
We successfully read the contents of flash, but when we do:
nrfutil device --x-ext-mem-config-file ext_mem_cfg.json write --address 0x10000000 --value 0xDEADBEEF
The write fails, with the message "Failed to write data to device, Device error: Could not set state; buffer busy"

I have a sneaking suspicion that nrfutil does not support external NAND devices, although I cannot find anywhere in docs that definitively states this. Does nrfutil support writing to external NAND flash? If it does, what are some other troubleshooting steps I can take?
Parents
  • Coming back with a silly update,

    We have support for two external flash chips, one is NOR and one is NAND. I was mistaken and thought we were using NAND for DFU images, but we are actually using the NOR chip and so my external memory config was totally wrong. After a bit more trouble shooting I was able to access the external NOR flash through nrfutil as we were used to with nrfjprog. 

Reply
  • Coming back with a silly update,

    We have support for two external flash chips, one is NOR and one is NAND. I was mistaken and thought we were using NAND for DFU images, but we are actually using the NOR chip and so my external memory config was totally wrong. After a bit more trouble shooting I was able to access the external NOR flash through nrfutil as we were used to with nrfjprog. 

Children
No Data
Related