Hello, I'm using SDK 16.0, softdevice s132 v7.0.1, I'm sending the device to SystemOFF and configuring a pin to wake it up with
nrf_gpio_cfg_sense_set(IMU_INT2_PIN, NRF_GPIO_PIN_SENSE_HIGH);
IMU_INT2_PIN is an output from an IMU.
The device goes to SystemOFF however SOMETIMES the device won't wake up, I've checked with the oscilloscope, and the IMU_INT2_PIN is indeed going from LOW to HIGH, but the device simply wont wake up.
Similarly after flashing a new firmware, SOMETIMES the device just doesn't start. I've tried doing a mass erase but it didn't work.
I'm using a secure bootloader and it doesn't seem to be stuck in the bootloader code, because when I attached the debugger via gdb I can see that the PC is moving in a loop in the following directions:
0x0be04 ldr.w r0, [r4, ; 260] ; 0x104
0x0be08 cmp r0, ; 0
0x0be08 beq.n 0xbe00
0x0be00 bl 0x251b4
0x251b4 addw r0, pc, ; 12
0x251b8 add.w r0, r0, ; 0
0x251bc mov r1, sp
0x251be str.w r0, [r1, ; -8]
0x251c2 wfe
0x251c4 bx lr
and again from the 0x0be04
If I understand correctly this is the PC correspond to the SOFTDEVICE part, can someone identify what's happening here?
Is waiting for something? maybe in a loop waiting for the 32MHz crystal to stabilize?
How can I determine where the problem is?