I have a custom board with a nrf9160 on it that has been working for the last three months but last week when i was evaluating low power modes on the board i couldn't talk to the 9160 chip.
I would just get:
nrfjprog -r [error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 181 milliseconds with result -102 ERROR: Unable to connect to a debugger. [error] [ Worker] - An unknown error. ERROR: JLinkARM DLL reported an error. Try again. If error condition ERROR: persists, run the same command again with argument --log, contact Nordic ERROR: Semiconductor and provide the generated log.log file to them. NOTE: For additional output, try running again with logging enabled (--log). NOTE: Any generated log error messages will be displayed.
And the board would draw around 30mA.
I have been trying to find out what is causing it and discovered that if i run nrfjprog -e right at power up i can talk to the chip and flash new firmware on it.
This made it possible to find that the device works if i never initialise the modem. If i call nrf_modem_lib_init() i loose the communication with the device and i have to power it off and run nrfjprog -e again to be able to communicate with the chip.
I am using nrf connect sdk 2.6.1 on Ubuntu 22.04.5 but have tried building and flashing on 20.04 aswell. The chip has SICA B1 2205CU written on it.
I have tried to get a modem trace from the device but i get 0 bytes written after i've lost the device.
I have run nrfjprog --recover and tried to flash the modem with version 1.3.5, 1.3.6 and 1.3.7 firmware but it makes no difference, when i try to init the modem i loose all communication with the chip and the device draws around 30 mA.
Because it is not possible to init the modem it is not possible to send any at commands to do a factoryreset.
What could be causing this?