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.

TMS320F28384D: Nesting Interrupts When Using Zero Latency and HWI Dispatcher Interrupts

Part Number: TMS320F28384D
Other Parts Discussed in Thread: SYSBIOS

Tool/software:

I am currently using TIRTOS. I have several HWIs in the system and am considering adding a zero-latency ISR. I am using Hwi_Params with maskSetting = Hwi_MaskingOption_BITMASK and providing masks to Hwi_Params disableMask/restoreMask for nesting interrupts based on priority when using Hwi_create and the Hwi Dispatcher.

Can I do a similar thing with the zero-latency interrupt but manually change the associated IER within the interrupt function? See the following code:

interrupt void Zero_Latency ( void ) 
{
// Set interrupt priority:
volatile Uint16 TempPIEIER = PieCtrlRegs.PIEIER1.all;
IER |= M_INT1;
IER &= MINT1; // Set "global" priority


PieCtrlRegs.PIEACK.all = 0xFFFF; // Enable PIE interrupts
asm " clrc INTM"

// [Insert ISR Code here]

// Restore registers saved:
asm " setc INTM"


PieCtrlRegs.PIEIER1.all = TempPIEIER;
}

My goal is to be able to add a zero latency while keeping my PIE group priority nesting intact using both the HWIs under HWI dispatcher and the zero latency interrupt. 

Can a HWI Dispatcher HWI interrupt a zero latency interrupt and visa versa depending on priority?

Thanks

  • There's a sentence on this FAQ that says, "You can pass a bitmask to the Hwi.zeroLatencyIERMask property to identify interrupts that should never be disabled [by SYSBIOS]," which makes me think that when nesting is enabled, the zero latency interrupt will left enabled and able to nest in the BIOS-managed interrupts.

    I think if you had either interrupts within the zero latency group that you wanted to prioritize by altering PIEIER, you'd probably be okay. I'm not confident there wouldn't be consequences of altering the IER or PIEIER status of the BIOS-managed interrupts from within a zero latency interrupt though.

    The Hwi code for C28 devices is in the folder below if you want to see how the nesting and zero latency modes are implemented.

    C:\ti\bios_6_83_00_18\packages\ti\sysbios\family\c28

    Whitney