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.

The purpose of ROM_IntMasterDisable/ROM_IntMasterEnable calls in timers code sample

Other Parts Discussed in Thread: EK-TM4C1294XL

timers code sample from C:\ti\TivaWare_C_Series-2.1.3.156\examples\boards\ek-tm4c1294xl\timers has the follwwing code in Timer0IntHandler and Timer1IntHandler:

    ROM_IntMasterDisable();
    cOne = HWREGBITW(&g_ui32Flags, 0) ? '1' : '0';
    cTwo = HWREGBITW(&g_ui32Flags, 1) ? '1' : '0';
    UARTprintf("\rT1: %c  T2: %c", cOne, cTwo);
    ROM_IntMasterEnable();

I think that ROM_IntMasterDisable/ROM_IntMasterEnable are used synchronize access to global g_ui32Flags variable. When all interrupts are disabled, another interrupt handler cannot be executed. Is this correct?

If I add the following lines to main function:

ROM_IntPrioritySet(INT_TIMER0A, 0x00);
ROM_IntPrioritySet(INT_TIMER1A, 0x00);

can I remove ROM_IntMasterDisable/ROM_IntMasterEnable lines from interrupt handlers? Since both interrupts have the same priority, interrupt handlers will be tail-chained and synchronization is not necessary. Is this correct?