For a complete reference of the nrfjprog DLL and a description of the API, refer to the nrfjprogdll.h header file provided as part of the nRF Command Line Tools installation.
The following table lists all DLL functions of the nrfjprog DLL. The file DllCommonDefinitions.h provided with the installation defines all return codes of the DLL functions as well as other necessary type definitions.
Function | Description |
---|---|
NRFJPROG_dll_version |
Returns the JLinkARM.dll version. |
NRFJPROG_is_dll_open |
Checks if the JLinkARM DLL is open. |
NRFJPROG_open_dll |
Opens the JLinkARM DLL and sets the log callback. Prepares the DLL for work with a specific family. |
NRFJPROG_close_dll |
Closes and frees the JLinkARM DLL. |
NRFJPROG_enum_emu_com |
Enumerates all serial ports connected to a given SEGGER debug probe. |
NRFJPROG_enum_emu_snr |
Enumerates the serial numbers of connected USB SEGGER J-Link emulators. |
NRFJPROG_is_connected_to_emu |
Checks if the emulator has an established connection with a SEGGER emulator/debugger. |
NRFJPROG_connect_to_emu_with_snr |
Connects to a given emulator/debugger. |
NRFJPROG_connect_to_emu_without_snr |
Connects to an emulator/debugger. |
NRFJPROG_reset_connected_emu |
Attempts to reset the connected J-Link OB. |
NRFJPROG_replace_connected_emu_fw |
Replaces the firmware on the connected J-Link debug probe. |
NRFJPROG_read_connected_emu_snr |
Reads the serial number of the connected emulator. |
NRFJPROG_read_connected_emu_fwstr |
Reads the firmware identification string of the connected emulator. |
NRFJPROG_disconnect_from_emu |
Disconnects from an emulator. |
NRFJPROG_is_coprocessor_enabled |
Checks if the coprocessor is enabled. |
NRFJPROG_enable_coprocessor |
Enables the coprocessor. |
NRFJPROG_disable_coprocessor |
Disables the coprocessor. |
NRFJPROG_select_coprocessor |
Selects which coprocessor to connect to. |
NRFJPROG_recover |
Recovers the device. |
NRFJPROG_is_connected_to_device |
Checks if the emulator has an established connection with a SoC. |
NRFJPROG_connect_to_device |
Connects to the SoC. |
NRFJPROG_disconnect_from_device |
Disconnects from the SoC. |
NRFJPROG_readback_protect |
Protects the SoC against read or debug. |
NRFJPROG_readback_status |
Returns the status of the readback protection. |
NRFJPROG_is_eraseprotect_enabled |
Returns the status of the erase protection. |
NRFJPROG_enable_eraseprotect |
Enables erase protection. |
NRFJPROG_read_region_0_size_and_source |
Returns the region 0 size and source of protection, if any. |
NRFJPROG_debug_reset |
Executes a reset using the CTRL-AP. |
NRFJPROG_sys_reset |
Executes a system reset request. |
NRFJPROG_pin_reset |
Executes a pin reset. |
NRFJPROG_disable_bprot |
Disables BPROT. |
NRFJPROG_is_bprot_enabled |
Detects if memory block protection is enabled. |
NRFJPROG_erase_all |
Erases all flash. |
NRFJPROG_erase_page |
Erases a page of code flash. |
NRFJPROG_erase_uicr |
Erases UICR. |
NRFJPROG_write_u32 |
Writes one uint32_t data at the given address. |
NRFJPROG_read_u32 |
Reads one uint32_t address. |
NRFJPROG_write |
Writes data from the array starting at the given address. |
NRFJPROG_read |
Reads data_len bytes starting at address addr. |
NRFJPROG_is_halted |
Checks if the SoC CPU is halted. |
NRFJPROG_halt |
Halts the SoC CPU. |
NRFJPROG_run |
Starts the SoC CPU with the given pc and sp. |
NRFJPROG_go |
Starts the SoC CPU. |
NRFJPROG_step |
Runs the device CPU for one instruction. |
NRFJPROG_read_ram_sections_count |
Reads the number of RAM sections in the device. |
NRFJPROG_read_ram_sections_size |
Reads the size of the RAM sections in the device in bytes. |
NRFJPROG_read_ram_sections_power_status |
Reads the RAM section power status. |
NRFJPROG_is_ram_powered |
Reads the RAM power status. |
NRFJPROG_power_ram_all |
Powers up all RAM sections of the device. |
NRFJPROG_unpower_ram_section |
Powers down a RAM section of the device. |
NRFJPROG_read_cpu_register |
Reads a CPU register. |
NRFJPROG_write_cpu_register |
Writes a CPU register. |
NRFJPROG_read_device_version |
Reads the device version connected to the device. |
NRFJPROG_read_device_info |
Reads the version, name, memory, and revision descriptors of the device connected to the emulator. |
NRFJPROG_read_device_family |
Reads the family of the device connected to the emulator. Can only be called if
NRFJPROG_open_dll() was called with
UNKNOWN_FAMILY as family parameter. |
NRFJPROG_read_debug_port_register |
Reads a debugger debug port register. |
NRFJPROG_write_debug_port_register |
Writes a debugger debug port register. |
NRFJPROG_read_access_port_register |
Reads a debugger access port register. |
NRFJPROG_write_access_port_register |
Writes a debugger access port register. |
NRFJPROG_is_rtt_started |
Checks if the RTT is started. |
NRFJPROG_rtt_set_control_block_address |
Indicates to the DLL the location of the RTT control block in the SoC memory. |
NRFJPROG_rtt_start |
Starts RTT. |
NRFJPROG_rtt_is_control_block_found |
Checks if an RTT control block has been found. |
NRFJPROG_rtt_stop |
Stops RTT. |
NRFJPROG_rtt_read |
Reads from an RTT channel. |
NRFJPROG_rtt_write |
Writes to an RTT channel. |
NRFJPROG_rtt_read_channel_count |
Gets the number of RTT channels. |
NRFJPROG_rtt_read_channel_info |
Reads the info from one RTT channel. |
NRFJPROG_is_qspi_init |
Checks if the QSPI peripheral is initialized. |
NRFJPROG_qspi_init |
Initializes the QSPI peripheral. |
NRFJPROG_qspi_uninit |
Uninitializes the QSPI peripheral. |
NRFJPROG_qspi_read |
Reads from the external QSPI-connected memory. |
NRFJPROG_qspi_write |
Writes to the external QSPI-connected memory. |
NRFJPROG_qspi_erase |
Erases the external QSPI-connected memory. |
NRFJPROG_qspi_custom |
Sends a custom instruction to the external QSPI-connected memory. |