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.

RTOS/TMS320F28075: Does TI-RTOS implicitly disables interrupt for any critical section of RTOS code ?

Part Number: TMS320F28075
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

I am using TMS320F28075  and TI-RTOS  ( version 2.16.1.14 ) in my application. I am using ecapture interrupt which is at highest priority . During my testing, I see that sometimes ,I am missing ecapture interrupts .

So does TI-RTOS disables the interrupt during any critical section of code ? If so , then for how much time the interrupt is disabled?

  • TI-RTOS does disable interrupts for short periods of time. You can check the benchmarks in the SYS/BIOS release notes for the max interrupt latency this can cause.

    Have you tried plugging the eCAP interrupt outside of SYS/BIOS as a Minimal Latency Interrupt:

    http://processors.wiki.ti.com/index.php/SYS/BIOS_for_the_28x#Minimal_Latency_Interrupts

    Whitney

  • Hi Whitney,

    Thanks for your reply. I read the "Minimal latency" note you mentioned. Also tried to plug the ecapture interrupt outside the sysbios using the "Zero latency IER mask" field. However, when compiling I get the error "Hwi 56 conflicts with IER Mask 0x8".

    Also below note is mentioned in the "Minimal latency" article

    Note: We recommend that you use the zeroLatencyIERMask only if all interrupts in the groups execute non-SYS/BIOS interrupt handlers

    What does this mean?

    Also does it mean, I have to manage register saving and restoration for ecapture interrupt by writing some code in application  instead of using SYS/BIOS interrupt dispacther.

    Please let me know how to proceed in this issue. 

  • Are you still creating a Hwi for the interrupt? I believe if you're plugging a zero latency you don't need to create one, so I suspect that's where that error comes from.

    Instead of creating a Hwi, you use Hwi_plug() to specify the ISR to be called in place of the dispatcher. If you use the __interrupt key word on your ISR, the compiler should generate the necessary saves and restores.

    Whitney
  • Hi Whitney,

    I used  Hwi_plug and the code is working fine. Thanks.

    As you said TI-RTOS disables interrupt for small amount of time. So what is the maximum time interrupt is disabled by RTOS? 

    Is the interrupt disable time corresponds to  maximum interrupt latency time (172 cycles for TMS320F280X family ) ?