Part Number: CC2630
Other Parts Discussed in Thread: TIMAC, SYSBIOS
I am trying to init the ICall stack similar to the MSA example for TIMAC (I am stuck with this hardware so switching isnt possible). I am properly making the ICall calls from a task function. This issue seems common with many causes. This and this case were having a disabled application security stack while it was enabled in the stack (I tried both ways wothout success). I do not know how to evaluate which stack I am running with -- I am writing this for a deployed product so I am completely stuck with whatever is on that ROM. It's whatever the chip shipped with.
I am also observing Task_restore be called earlier in the programs execution without issue so its not that function, per se. My program also works fine without the ICall functions at all (I have working support for GPIO, UART and i2c).
The exception redirects to my handler function but the reported registers don't make any sense. I'm guessing its just a pointer to uninitialized memory.
- PC -> 0x20000208 (user0Cfg)
- Why would PC point at this address?
- I set a breakpoint here just in case but it never runs
- SP -> 0x1001B429 (ti_sysbios_knl_Task_exit__E)
- Why is SP pointing to rom?
Stepping through the code and assembly the call chain is
- Taskfxn (called as a task from main)
- ICall_createRemoteTasks
- Task_restore
- ti_sysbios_knl_Task_restore__E():
- ICall_taskEntry
- Jump to 0x9001 (thumb to ICALL_STACK0_ADDR)
- Jump to 0x897C which has no label (ICall_threadStackSizes + 0x18E4)
- The exception sometimes happens on the jump, sometimes dozens of steps later.
- Jump to 0x9001 (thumb to ICALL_STACK0_ADDR)
- ICall_taskEntry
I'm lost on what to do here or how to make sense of the info I have. It's not even clear to me what insturction is cuasing the issue.