I'm having a problem with random behavior within my C55x DSP/BIOS application. I've tracked it down to what I believe is a stack corruption problem, but 1.) I'm not sure how to track where the corruption occurs and 2.) it may not be a corruption problem at all. I've found several TI and other resources online regarding detection of stack overflows, but I'm at a loss when it comes to detection of stack corruption. Let's say for the time being that I'm positive no stack overflows are occurring (watermark verified in each task's stack/sysstack as well as the application's stack/sysstack).
The behavior I'm seeing is that, while in one of my SWI handlers, I enter a function which appears to run to completion, but upon exiting from the function, I don't return to my SWI handler. I've verified this by having a status variable which gets incremented prior to entering the function and decremented upon returning from the called function and noting that the decrement doesn't occur. The problem is further complicated by the fact that it seems to be very closely related to timing (i.e. of the various HWIs and different priority SWIs), as usually the application runs fine.
Are there any resources explaining the debugging of stack corruption issues (particularly using CCS tools to do so)? Anybody out there want to give me some personal insight into debugging these types of problems in other projects? Your help is appreciated!