Intermittent stops in cpsie

Using nRF9160, ncs 1.6 on a custom board and segger-SES for debugging, we have intermittent stops (debugger breaks)
on an assembler line with 'cpsie' opcode:

File: cpu_idle.S , function: arch_cpu_idle

wfi
/*
* Clear PRIMASK and flush instruction buffer to immediately service
* the wake-up interrupt.
*/
cpsie i

The call stack is: z_thread_entry >> pm_save_idle >> arch_cpu_idle.
Our app is doing a file download (like the https download client sample in ncs).

  • Any hints on the cause, or how to proceed?
  • Is it possible to eliminate any power saving state (thus prevent 'WFI'), just let it busy-loop in idle task? (only while debugging).
  • could it be power-supply [instable] related?
    Thanks!
Related