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
.binfiles, 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.