Hi, We have an application that can run in two modes. The mode is selected by setting the GPREGRET to 1 or 0 and restarting. Currently we are running this procedure directly via jlink commander, but we want to convert it to python commands. Using the nrfjprog cmd line tool, it works OK:
nrfjprog.exe --memwr 0x4000051C --val 1
nrfjprog.exe -r
Using the python API doesn't work:
api = API.MultiAPI(API.DeviceFamily.NRF51)
api.open()
api.connect_to_emu_with_snr(serial_number)
api.write_u32(0x4000051C, 0x01, True)
api.sys_reset()
api.disconnect_from_emu()
api.close()
The device is a PCA10031 with softdevice s120. The python API version is 8.4.0 along with Jlink 5.10t.