This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/LAUNCHXL-CC1310: Application crashes hard if debugger is not connected

Part Number: LAUNCHXL-CC1310

Tool/software: TI-RTOS

Hi,

I have an application here with a very frustrating behaviour.

It will crash *hard* after a short while, ending up deadlocked at 0x10003A12 (somewhere inside reset vector where it checks halt-on-boot flag as far as I know) with a nonsense SP making it difficult to debug.

According to ROV, it usually crashes in the Idle thread (which I have added exactly zero functions to so it's only doing TI power saving stuff), but very occasionally it'll crash in a kernel swi or something. The ROV says all my tasks are blocked (as they should be) and only TI kernel stuff is happening.

However, if I leave the debugger connected so I can pick up assert breakpoints or similar, it *never crashes* and functions perfectly. Any time I pause, the PC is at 0x10000486 which I believe to be the standby function.

All console output is disabled, so System_flush is never called and thus shouldn't introduce timing issues that might affect race conditions.

Both of these behaviours occur with the same binary image - I've even reproduced this in a single run by simply hitting play in the debugger after a crash!

What changes does an attached but not paused debugger make which could cause such behaviour?

Since the user application code runs perfectly with the debugger simply attached and isn't doing anything unusual in terms of trying to bypass kernel stuff or relying on any specific timing of events, and when it crashes nothing suggests the application code is at fault, I'm really not sure where to look for the source of the problem..