The nrfjprog DLL functions must be called in a specific order.
This is the recommended sequence of calling the nrfjprog DLL functions:
-
NRFJPROG_open_dll_inst() -
Connect with or without specifying the serial number:
NRFJPROG_connect_to_emu_with_snr_inst()NRFJPROG_connect_to_emu_without_snr_inst()
-
NRFJPROG_connect_to_device_inst() -
NRFJPROG_halt_inst() -
Other desired functions such as
NRFJPROG_read_inst()orNRFJPROG_write_inst() -
NRFJPROG_close_dll_inst()