start[-end]Erases flash
(end is not included in the erase).
If end is not given, only one flash page will be erased.
If device is equipped with a QSPI peripheral the pages to erase belong to the XIP
region and an external memory device is present, this command erases 4 kB pages from the external memory device.
The first address of the region is considered as address 0 of the external memory device.
To determine if an external memory device is present, nrfjprog checks
the MemSize parameter from QspiDefault.ini or from the QSPI configuration ini file given with --qspiinii
nRF51 devices: the page will not be erased if it belongs to region 0.
--qspieraseall Erases all the flash of the external memory device using the QSPI peripheral.
Depending on the external memory device's erase speed the operation might take minutes.
Can be combined with --eraseall
Not available for devices without a QSPI peripheral.
For nRF52 devices, only available with an external memory device.
To determine if an external memory device is connected, nrfjprog checks MemSize parameter
from the QspiDefault.ini file or the QSPI configuration ini file that is given with the --qspiini
--qspisectorerase and --qspichiperase are not available.
Must be combined with --memrd, --memwr, --program, --verify, --erasepage or --qspieraseall .
Not for nRF51, nRF52 or devices without a QSPI peripheral.
--reset or --debugreset after the flash operation to start the execution.
If the hex_file provided contains sectors belonging to region 0, --program will fail.
| --rbp CR0 | ALL Enables ReadBack Protection,
prevents reverse engineering the device by reading the code.
CR0 is invalid for nRF52 devices.
| --recover Erases all user available non-volatile memory
Also disables read-back-protection, memory can now be written and read by debugger.
For nRF52 devices: --pinreset, --debugreset or --recover operations are available after --rbp.
For nRF51 devices and ALL is used --pinreset will not work on older devices.
Specifically memrd, readUICR, readcode, readram, readqspi, program, … are not available!
| --pinresetenable For nRF52 devices, pin reset enabled.(Invalid for nRF51 devices). `
| -p --pinresetPerforms pin reset. Core will run after the operation.
| -r --reset soft reset by setting SysResetReq bit AIRCR .
Core will run after the operation.
Can be combined with --program .
Reset will occur after flashing
| -d --debugreset soft reset usint CTRL-AP.
core will run afterwards .
With the --program , occurs after the flashing.
Not available For nRF51 devices, FnRF52832_xxAA_ENGA .
| --memwr 0xaddr --val 0xval Writes 1 word only
using the NVM Controller.
If
not erased(i.e. FFFFFFFF ), the operation will fail. (even attempting to write same contents.)
ERROR: The area to write is not erased.
If device is equipped with a QSPI peripheral and the address to write belongs to the XIP region, uses the QSPI.
The first address of the region is considered as address 0 of the external memory device.
Can be combined with --verify .
nrfjprog --memwr 0x10001080 --val 0x89010203 # write to first word of UICR
Parsing parameters.
Writing.
--memrd 0xaddr
[--w 8|16|32]
[--n [0x]n] reads and
outputs n values from 0xaddr .
If width is not given, 32-bit values will be displayed, if addr is 16bit aligned, 16-bit values if addr is half word aligned, and
8-bit values otherwise.
The address and n must be aligned to the width parameter.
Default: n is 1.
The maximum number of bytes is 1 MB.
If device is equipped with a QSPI peripheral, and 0xaddr
belongs to the XIP region, the QSPI peripheral is used to read from the external memory device.
The first address of the region is considered as address 0 of the external memory device.
A single --memrd cannot read addresses from both the external memory and the nRF device.
nrfjprog --memrd 0x10001080 --n 128 # implied --w 32 read fICR
0x10001080: 00001083 00001083 D6010203 FFFFFFFF |...o.............|
0x10001090: D6010203 FFFFFFFE FFFFFFFF 30313233 |............3210|
0 1 2 3 ~~~~~~~~~~~~~~'
…
0x100010F0: FFFFFFFF FFFFFFFF FFFFFFFF FCFDFEFF |................|
nrfjprog --memrd 0x10001080 --w 8 --n 0x20
0x10001080: 83 10 00 00 83 10 00 00 03 02 01 D6 FF FF FF FF |................|
0x10001090: 03 02 01 D6 FE FF FF FF FF FF FF FF 33 32 31 30 |............3210|
3 2 1 0 !
nrfjprog --memrd 0x10001080 --w 16 --n 0x20
0x10001080: 1083 0000 1083 0000 0203 D601 FFFF FFFF |................|
0x10001090: 0203 D601 FFFE FFFF FFFF FFFF 3233 3031 |............3210|
2 3 0 1 ~~~~~~~~~~~~~~'
'/Applications/Nordic Semiconductor/nrfjprog/nrfjprog' --memrd 0x10000100 --n 4 # part#
0x10000100: 00052832 |2(..|
Omitting the 0x will most likely NOT display what you expect!
Omitting the 0x and including a hex digit causes the error: ERROR: Argument provided has a wrong value. Memory access not aligned, value.
Specifying only 1 '-' instead of '--'
ERROR: outside of range or similar RC=54.
ERROR: An invalid argument was provided. Use --help for a list of valid
ERROR: arguments.
| --ramwr 0xaddr --val valWrites without using the NVM Controller.
If the address is in non-volatile memory it has no effect unless the
non-volatile memory controller (NVMC) has been configured for a write operation.
Can be combined with --verify .
pc_addr last bit must be one.
sp_addr must be word aligned.
| --readuicr fileu.hex Reads UICR and stores it in file .
Creates Intel Hex format file (starts at 10000000 for 11,550 characters
:020000041000EA
:10100000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10101000FFFFFFFF0050070000E00700FFFFFFFF9A
…
:10107000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF80
:101080000302010083100000030201D6FFFFFFFFEF [ 0- 3] NRF_UICR->CUSTOMER[0]
:10109000030201D6FEFFFFFFFFFFFFFF33323130B7 [ 4- 7]
:1010A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF50 [ 8-11]
:1010B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF40 [12-15]
:1010C000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF30 [16-19]
:1010D000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF20 [20-23]
:1010E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF10 [24-27]
:1010F000FFFFFFFFFFFFFFFFFFFFFFFFFFFEFDFC06 [28-31] NRF_UICR->CUSTOMER[31]
:10110000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF
…
:101FF000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1
:00000001FF
Can be combined with --readram , --readcode and --readqspi .
--readcode filef.hex Reads the device flash … 1,474,709 characters including
record size,type, addres and checksum.
| --readram filer.hex Reads the device ram … 184,350 characters
| --readqspi file Reads the QSPI-connected external memory …
Available inactively using /Applications/SEGGER/JLink_V633a/JLinkExe
--jdll file Use Segger's JLinkARM dll specified in the given file path (yes Mac OS too)
| -i --ids Displays serial numbers debuggers connected to the PC.
682930364
| -s --snr serial_number Selects the debugger with the given serial number
| --deviceversionwith --snr, displays device associated with this debugger
| -c --clockspeed khz debugger SWD clock speed in kHz
125 kHz to 50000 kHz. If
clockspeed is above the maxiumum clockspeed supported by the emulator, its maximum will be
used . Default from nrfjprog.ini.
| --ini fid instead of nrfjprog.ini in the installation
Must be combined with another command.
| --comlist serial port associated
with all connected debuggers.
with --snr displays all comports associated with this debugger
| --log fidEnable logging. (most likely only helpful to Nordic nrfjprog developrs).
Must be combined with another command.
| --qspiini file Uses the QSPI settings file specified in the given
| --readregs Reads the cpu registers.
| --licenses Displays the licenses of the open source modules used in nrfjprog.exe.
| -f --family family NRF51, NRF52 and UNKNOWN.
If UNKNOWN is given, an automatic family detection of the device is performed.
providing the actual family is faster . If
the default is taken from nrfjprog.ini.
| -q --quiet Reduces stdout . Must be combined with another command.
| -h --help
| -v --version Displays the nrfjprog and dll versions. 8/18/22nrfjprog version: 10.12.1
JLinkARM.dll version: 7.70c
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |