Other Parts Discussed in Thread: CC2650, SYSBIOS
Tool/software: TI-RTOS
I have an issue where our firmware gets stuck in a WFI instruction (ARM Wait For Interrupt).
When the device is re-attached to the debugger, it correctly moves to the next instruction and updates the clocks, although they are all obviously wrong (i.e. waaaaay past the tick they are supposed to expire on).
Reading through the forum it seems that the only way this might happen is that if the interrupts have been suspended before any WFI instruction is called. Our board is extremely simple with no external peripherals and the problem exhibits itself on the SensorTag as well.
All the stacks, heaps, ICALL resources are fine, no overruns and no errors in the ROV.
Searching through the RTOS source tree (tirtos_cc13xx_cc26xx_2_20_01_08) the only place I can find where the WFI instruction is explicitly referenced is in the power management code, specifically for us in the standby function.
Compiler versions don't seem to make much difference but we are following the instructions in the documentation, our BLE stack (2_02_01_18) is being compiled with 5.2.6, the app itself with 15.12.5.LTS.
I have replaced the standby function with a custom one trying to debug this problem but I don't really know what it is I'm looking for - is there a way to test if interrupts are disabled so I can skip over the WFI instruction until the next time I am in the idle loop and hopefully it gets reset? It's very hard to debug (or produce a simple program to reproduce it unfortunately).
Anyone else have any insight into where else the WFI instruction might be generated so I can instrument that?
