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.
Tool/software: TI-RTOS
Hi,
I'm developing an application with SYS/BIOS 6.46.1.38.
I'm using 3 HW interrupt routines (HWI, configured through modules ti.sysbios.family.c28.Hwi and ti.sysbios.interfaces.IHwi):
HWI_routine_1 (interrupt number 82)
HWI_routine_2 (interrupt number 103)
HWI_routine_3 (interrupt number 198)
and an interrupt routine triggered by TIMER0 (configured through module ti.sysbios.family.c28.Timer):
TIMER_routine
I've configured all HWI Masking options as MaskingOption_ALL, because I wanted that all HWI routines didn't preempt each other (i. e. an HW interrupt is executed completely before another Hw interrupt routine is started).
Moreover I've read that all timer interrupt routines are executed in HWI context, therefore I think that TIMER_routine doesn't preempt HWI routines and HWI routines don't preempt TIMER_routine.
Is this correct?
Now I want that TIMER_routine (only!) can preempt all HWI routines.
I know that I should set
Masking options = MaskingOption_BITMASK
and then I should set two masks:
Nested interrupt disable mask
Nested interrupt restore mask
but I haven't understood what is the meaning of these two masks and how I should set to get what I want.
Let's consider for instance HWI_routine_3, linked to interrupt 198 (INT9.15, USBA).
I want that HWI_routine_3 can be preempted by TIMER_routine but cannot be preempted by HWI_routine_1 and HWI_routine_2.
What numbers should I write in "Nested interrupt disable mask" and "Nested interrupt restore mask"?
Thanks in advance.
Regards
Demis
Demis,
Not sure the single change of setting mask to "MaskingOption_ALL" would make a difference since this simple sets:
hwi->disableMask = 0xffff;
hwi->restoreMask = 0xffff;
But if that works, good! There is no drawback to that solution, in fact that was going to be my next suggestion.
Its a restore mask so it "&" the restore mask with the interrupts that were enabled prior to calling the Hwi isr.
Judah
Judah,
judahvang said:Not sure the single change of setting mask to "MaskingOption_ALL" would make a difference since this simple sets:
hwi->disableMask = 0xffff;
hwi->restoreMask = 0xffff;
The simple sets of the mask don't work, I'm sure because I tested them.
I think those sets work only if the use of bitmask is enabled, i.e. if masking option is set to "MaskingOption_BITMASK". I didn't test that configuration but I'm confident that it works because is similar to HWI.
judahvang said:Its a restore mask so it "&" the restore mask with the interrupts that were enabled prior to calling the Hwi isr.
OK, that's good.
Thank you for your support.
Demis