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.

How do I set PendSV?



CPU: TM4C123G Launchpad

RTOS: Bare Metal

I would like to set PendSV from an interrupt using Tivaware.

I reviewed the Tivaware documentation and it states that only INT_* values in the library can be used with IntPendSet() and IntTrigger().  PendSV is listed as a FAULT_* value.

I tried IntTrigger(FAULT_PENDSV); and it didn't work (Yes, I know I violated the documentation).

What is the best way to software trigger PEND_SV?  Are three any examples?

Thanks,

-Vince

  • Hello Vince,

    As per the data sheet

    PendSV. PendSV is a pendable, interrupt-driven request for system-level service. In an OS environment, use PendSV for context switching when no other exception is active. PendSV is triggered using the Interrupt Control and State (INTCTRL) register.

    So the register is INTCTRL where you must set bit-28 to invoke the Interrupt

    Regards
    Amit
  • What are you trying to do, I don't understand your explanation.  If you are trying to trigger an interrupt why not just trigger it?

    Here is what I do

        IntTrigger(tsk->vector);
    

    Simple, straightforward and it works. The micro starts the interrupt according to priority (and yes, I do this from within interrupts)

    Robert