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.

LAUNCHXL-F28379D: Task_Sleep running into ILLEGAL_ISR

Part Number: LAUNCHXL-F28379D
Other Parts Discussed in Thread: C2000WARE

Hi,

I am using SYS/BIOS and creating a periodic task.

When I call Task_sleep inside my task it reaches until below part in Task.c file and then enters ILLEGAL_ISR from there

            Task_SupportProxy_swap((Ptr)&prevTask->context,
                            (Ptr)&curTask->context);
                            

my app.cfg has below line for SupportProxy

System.SupportProxy = SysMin;

Could you suggest changes to be made?

Thanks,

Rashmitha

  • ILLEGAL_ISR can sometimes be an indicator of a stack overflow. Can you check for signs of a stack overflow? ROV usually tell if you there has been one.

    Also, as I noted in your other thread, you don't want to call InitPieVectTable() in your application. Instead of calling ILLEGAL_ISR(), I would expect it to call a SYS/BIOS Hwi module error ISR instead.

    Whitney

  • Hi Whitney,

    I am unable to get the ROV working, below is the error displayed

    #315 has the below line

    And with InitPieVectTable() not being called, I cannot get past below line

    It gets stuck in below assembly code and does not execute my tasks

    Regards,

    Rashmitha

  • I think that address where you're ending up is in the boot ROM. You seem to be getting a reset. Can you look at the reset cause register (RESC) in the CCS Registers View and see what it says?

    Not sure what's going on with ROV. Can you try ROV Classic instead?

    Whitney

  • RESC is as shown below

    The Watchdog timer is causing the RESET.

    ROV Classic is working, what exactly should I be looking at in the ROV Classic to find the stack overflow?

  • Have you disabled the watchdog in your code? You can have SYS/BIOS do it for you by configuring the Boot module to do it. You could also call the C2000Ware function that does it. You should see a call to it in InitSysCtrl().

    In ROV under the BIOS category, there should be a "Scan for errors" tab that should be able to show you if it has detected a stack overflow among other errors.

    Whitney

  • Yes, even when watchdog is disabled in

    SYS/BIOS -> Boot.disableWatchdog = true;

    and 

    C2000Ware-> DisableDog();

    The code runs into bootROM, if InitPieVect() is not called.

    ROV isn't showing any errors in the Scan for Errors sections

    If InitPieVect()  is called in my init, then I have my Task1 executing within which I have a Task_sleep(10). The Task_sleep makes the Task1 go into BlockedState

    and then Task2 starts running within which I again have a Task_sleep(10), this again causes Task2 go into BlockedState

    Then the SYS/BIOS's IDLETask starts running and within that when

     

                Task_SupportProxy_swap((Ptr)&prevTask->context,
                                (Ptr)&curTask->context);
    is called,

    "lretr" line within TaskSupport_asm.s28 (TaskSupport_swap(oldSP, newSP) function) leads to ILLEGAL_ISR

    My Tasks are as below

    Void Task1(void)
    {
        for(;;)
        {
        	Activity_X();
    
        	Task_sleep(10);
        }
    }
    

    Void Task2(void)
    {
        for(;;)
        {
    	int i;
    	for(i=0; i<5; i++);
    
    	Task_sleep(10);
        }
    }

  • Rashmitha,

    Whitney is currently out of the office, returning next Monday October the 4th.  You should expect a reply back when she returns.

    Best,

    Matthew

  • Hi Whitney,

    I have the timers working correctly now when I comment InitPieCtrl() and InitPieVectTable(). With that the Task_Sleep is also working properly.

    Regards,

    Rashmitha