Our application requires that we are able to program the nRF52832 device from our host microcontroller, in order to upgrade the nRF52832 firmware.
We are using an SPI peripheral on our host micro in order to communicate with the SWD peripheral on the nRF device. We have got to the point where we are able to write to the program memory via the NVMC, however we are stuck on something that is not mentioned explicitly in the documentation.
The NVMC seems to be locking up after some writes in between steps 3 and 4, writing and polling on the NVMC.READY register, where the NVMC stops reporting NVMC.READY == 1. The size we are writing at a time using auto-increment in the SWD for the write address is 1024 Bytes - we are now attempting 512 Bytes.
There are some mentions in other tickets for the NVMC indicating that you need to check NVMC.READY register in between each word.
https://devzone.nordicsemi.com/f/nordic-q-a/70012/how-to-write-the-data-in-nvmc-block-wise
https://devzone.nordicsemi.com/f/nordic-q-a/12428/regarding-flash-read-and-write
Question 1: What is the maximum size that can be written between NVMC.READY checks when using the SWD interface for writing to internal flash vis NVMC?
There are some articles that suggest that using auto-increment is possible, but what would be the point as you would need to write the NVMC.READY register to the TAR each time you need to poll the ready flag?
Question 2: Is there any other way to check the NVMC.READY register using SWD without writing to the TAR? This would enable the use of auto-increment in the SWD for the write address.
We are looking forward to your advice on this, thank you.