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.

SYS/BIOS sleep not working

hi,

I am new to TI and SYS BIOS and related architecture, but i have significant exp, working with other OS and embedded platforms.

I have managed to create a sample project {with SYS/BIOS} simulator {not with emulator} with few tasks and semaphores.

I could able to use the SYS/BIOS API's to control the communication among threads using semaphores i.e blocking a thread and going to others etc.

But when i use Task_sleep(), i could not able to achieve the same. i.e Sleep is not working at all. After sleep, i expect the control to switch to other tasks, but it does not happen. But using semaphores, the control goes to other tasks and returning back to it, when it got the required resource.

Does SLEEP not work with simulator? If i make it to work, what has to be done.

 

Kindly advice,.

  • Task_sleep() uses a timer interrupt to keep track of the number of Clock ticks to expire before waking up.

    If the simulator you're using does not have the device's timer peripherals modeled, then Task_sleep() will not work, nor will Semaphore_pend() with a timeout expire if Semaphore_post() is not called in time.

    Which simulator are you using?

    Alan.

  • Thanks Alan.

    I have chosen Texas Instrument simulator option which i configure in CCXML file. Device -> Cortex-M3 Device cycle accurate simulator,Little Endian.

    Reg Sempahore i always try with option of BIOS_WAIT_FOREVER, so i didnt notice that if i would have configured with time out, it  might not have work.

    Will clock or swi will work on simulator?

    ASR

  • The Clock module will not work with this simulator as it requires a timer device.

    The Swi module will work with the simulator.

    Alan