The memory space of the application core is empty when nRF9160 devices are shipped. To program it, use the Serial Wire Debug (SWD)
Arm®
CoreSight™
Debug Access Port (DAP) protocol.
-
Write 0x00000001 to the CONFIG register (0x50039504) of the Non-volatile Memory Controller (NVMC).
This enables writing to the non-volatile memory.
-
The READY register (0x50039400) of the NVMC will have a value of 0x00000001 when the device is ready for write operations.
-
Write the data to the selected, word-aligned address.
When the write operation is completed, the READY register (0x50039400) of the
NVMC will have a value of 0x00000001.
-
Continue writing and then reading the READY register (0x50039400) as necessary.
-
Write 0x00000000 to the CONFIG register (0x50039504) of the
NVMC.
This configures the non-volatile memory as
read-only.
The ranges of writeable addresses are:
You can write to flash using different methods. For nRF9160, a good flash algorithm should take around 10 seconds to write the entire flash . If you cannot achieve this time, contact Nordic Semiconductor for assistance.