Writing from a file

nRF Util

tags
nRF Util

To program all OTP regions described in an input file, run the following command:

nrfutil device otp-write [--force] --serial-number <serial_number> --file <path>

Verify the command usage and remove square brackets around --force before running this example command.

Supported file types for --file are Intel HEX (.hex, .ihex), raw binary (.bin), and ELF (.elf).

The command observes the following rules:

  • Data outside the OTP memory range causes an error.
  • OTP addresses that are not present in the file are left unchanged.
  • If the file contains no OTP data, the command aborts without writing.
  • For .bin files, the start address of the file is assumed to be the OTP base address.

To read back OTP memory content for inspection, see device dump-to-file.