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.

Task_sleep while task scheduler is disabled.

Other Parts Discussed in Thread: SYSBIOS

Good morning,

i use the ccsv55 to compile my project. Actually (but this problem is not shoiw in CCS53), while run the program i obtain a execution exit with message Cannot call  Task_sleep()  while Task scheduler is disabled.

Actually in my program, after main where i call the Bios_start(), i have a TaskInit setted in SYSBIOS with priority 15 linked to taskBootUpFnx(). In this function i put the Task_sleep() (as shown in the figure). During running i obtain the error.

Why Task scheduler is disabled if is called by SYSBIOS as task function?

Regards

Fabio

 

 

 

  • Hi Fabio,

    Which version of BIOS are you using in the working case (CCSv5.3)?

    Which version of BIOS are you using in the fail case (CCSv5.5)?

    Steve

  • Hi Steve,
     
    i have imported the project, so the same SYS/BIOS is set in both case. The SYS/BIOS version is 6.34.2.18.
     
    Actually i tryed with the new version of SYS/BIOS 6.35.... but optain the same error.
     
     
    Fabio
     
    PS: Steve you receive my response if i answer to your post with my email client? Or is necessary to join the ti e2e community?
    Thanks
  • Fabio Schina said:
    i use the ccsv55 to compile my project. Actually (but this problem is not shoiw in CCS53), while run the program i obtain a execution exit with message Cannot call  Task_sleep()  while Task scheduler is disabled.

    Can you please copy and paste this output for me to see?

    Fabio Schina said:
    Actually in my program, after main where i call the Bios_start(), i have a TaskInit setted in SYSBIOS with priority 15 linked to taskBootUpFnx(). In this function i put the Task_sleep() (as shown in the figure). During running i obtain the error.

    Can you show me the code that you are referring to?

    Note that if you don't want to post it publicly, we can become friends on the e2e forum and that will enable us to send private messages.

    Fabio Schina said:
    PS: Steve you receive my response if i answer to your post with my email client? Or is necessary to join the ti e2e community?
    Thanks

    You can try, but I believe you have to respond via the web page.

    Steve

  • Hi  Steve,

    i send to you the sceenshot for Task_sleep() problem.

    Why the scheduler can result Disabled during a task function (linked in sys/bios).

     

    Fabio

     

     

  • Fabio,

    The assertion is due to the call to Swi_disable() just before Task_sleep().  The Swi_disable() call also disables the Task scheduler.  There is some description of this in the API documentation for Swi_disable().  Here is a snippet:



    The API documentation can be found by opening the BIOS_APIs.html file in the “docs” subdirectory of the SYS/BIOS installation (e.g., c:\ti\bios_6_35_02_45\docs\BIOS_APIs.html), and navigating to the ti->sysbios->knl->Swi module.

    Scott