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.

ti.sysbios.knl.Task in invalid mode: 4 on MSP430F2619 Sysbios Problem

Other Parts Discussed in Thread: SYSBIOS, MSP430F2619

Hello,

 my name is Alexander, and despite I did a bunch of microcontroller and C firmware development in the past, I must admit that I am completely new to Sysbios programming. I am currently developing my first program with sysbios on the
 MSP430F2619 and I have currently lots of issues with sysbios.

My program does the following: Watchdog is disabled via the option 'Disable watchdog reset" in Module Boot
 (otherwise my program never reaches main(), thats the first problem I had to solve :( ). Then at the start of main I
 hold the watchdog again, and I also enable an external 8 MHz crystal on LFXTL1, and then I switch the MCLK clock source to this osc. Oscillator starts running with 8 MHz and program continues.

Then I call BIOS_start() and the following happens:

1,  in ti_sysbios_BIOS_startFunc__I() all the functions are called: oscillator and program still runs fine

   then in this function ti_sysbios_knl_Task_startup(); is called

2, in ti_sysbios_knl_Task_startup() is called

If I now press Step into once I end up in the function 'Swi_startup" with does a single command "Swi_restore(FALSE);

After pressing the Step into again for multiple of times I end up doing a lot of Swi and Hwi related function stuff with

 Keys and so on.

Then the program ends up in the function Task_disable(), and from there it jumps to Tasl_startCore(), and in this function the final instructions I can see are the following (a loop):

 while (Task_module->curSet == 0) {
        Task_allBlockedFunc();
    }

And after the call of Task_allBlockFunc() the whole microcontroller restarts somehow, and everything start again. So it seems I have a endless loop of restart, reconfiguring the XTAL, start of Bios_start, and then a restart of the device again.

If I disable the TASK module then the program seems to run fine, at least the IDLE module worked well for me once.

Somehow I have the feeling something is seriously wrong with my setup of sysbios.

My only lead is the following observation under RTOS Object view (ROV) after jumping into the main() function:

 If I go to scan for errors I get the following problems:

    ti.sysbios.family.msp430.Hwi Module, field = hwiStackPeak message = Overrun!

   ti.sysbios.knl.Task, inst = ti.sysbios.knl.Task.IdleTask, field = mode, message = Invalid mode: 4

 I get the invalid mode error also for my own single Task which I have set up for testing purposes.
 And also the ti.sysbios.knl.Task IdleTask shows a Hwi Sack Overrun! message.


Somehow I suspect this is all connected to my problem. I do not know what to do next, I tried already a lot for 2 days

 to find the root cause but I did not succeed :(

Maybe somebody knows what to do now, I'm really thankful for every input I get, Thank you very much in advance,

 Alex

 

  • Hi Alex,

    Unfortunately, the MSP430F2619 is not supported by SYS/BIOS.

    SYS/BIOS currently (version 6.40.01.16) supports the following MSP430 devices:

    Steve

  • Hi Steve,

     thank you so much for this information. I really appreciate it. And thanks to this info I will also not lose more important time

     try to figure out the bug in my program :)

     From the customer point of view it would have been really helpful if either the IDE, the compiler or the linker or

     BIOS_start would have told me that somehow. But the program compiled and seemed to start normally. And I had to set the specific device I use at least in two places in the IDE, so the information was there. But maybe there was somewhere a warning, and I did not see it :)


     Thank you very much again, I wish you a nice weekend,

     Alex