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.

critical section execution

Other Parts Discussed in Thread: SYSBIOS

Hi,

We are in a crital section exection, example SPI data transmit and receive

Can any one suggest how to block

1)Task of higher or lower priority interrupting

2) other high priority interrupts

3) Block all the other, during critical section execution

Regards,

Bindu

  • Hi Bindu,

    1)Task of higher or lower priority interrupting
    => if other Task instances can access the same resource, semaphore_pend/post can be used to share the critical section safely,  Semaphore instance should be a counting semaphore initialized with 1. Or, Task_disable/restore.

    2) other high priority interrupts
    3) Block all the other, during critical section execution

    =>  Swi_disable/restore and Hwi_disable/restore 

    You can find the various gate implementations in <bios_install_dir>\packages\ti\sysbios\gates.

    Hope this helps.

    Regards,
    Kawada