AnsweredAssumed Answered

kThreadStackOverflow when using VDK::Sleep() and interrupt

Question asked by mabuh on Jul 7, 2011
Latest reply on Sep 14, 2011 by mabuh



I'm trying to get an interrupt to run in a VDK application. The interrupt is basically the same as in the "Block based SPDIF talkthrough" for the ADSP-21469. I can get the interrupt to run together with one thread (which takes over the functionality of the main() function in the talkthrough example).


But when I introduce a "VDK::Sleep(1);" in that thread, I get a Kernel Panic sooner or later (after about 10 seconds at the latest). The VDK Status window shows, under Kernel Status, "Code: kStackCheckFailure" and "Error: kThreadStackOverflow". Increasing the amount of ticks in the Sleep() only seems to make the problem more unlikely; I still get Kernel Panic after a while (Sleep(100) gave me a Kernel Panic after about 200 seconds).


I tried commenting out the code in the SPORT ISR, which seemed to make the Kernel Panic disappear. But of course I need the ISR to do a minimum of functionality, which is pretty much the same as in the talkthrough example:


void P6I_Entry(void) {

/* Insert your ISR code here */
int_cntr %= 2;
blockReady = 1;


int_cntr and blockReady are global variables. blockReady is reset in the processing thread; int_cntr is currently not used anywhere else.


I have attached a very simple VDK project that can reproduce the error. It uses the EZKit Lite for 21469.


What am I doing wrong?