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.

Safely Temporarily Disable AM335x Ethernet Receive Interrupts

I've modeled my ethernet code after the Starterware LWIP interface examples (although I'm not using LWIP for various reasons). 

During the time the Receive interrupt process is called, I handle the incoming packets -- using some variables that are used in other parts of the system. 

So, I need to be able to "protect" these variables and temporarily disable the receive interrupt. 

I've tried using something like:

//Disable the Global Interrupts
intStatus = IntDisable();

/* Disable the interrupts for channel 0 and for control core 0 */
CPSWCPDMATxIntDisable(me->cpdma_base, 0);
CPSWWrCoreIntDisable(me->wrpr_base, 0, 0, CPSW_CORE_INT_TX_PULSE);

CPSWCPDMARxIntDisable(me->cpdma_base, 0);
CPSWWrCoreIntDisable(me->wrpr_base, 0, 0, CPSW_CORE_INT_RX_PULSE);

//Enable the Global Interrupts
IntEnable(intStatus);

or even just

//Disable the Global Interrupts
intStatus = IntDisable();

/* Disable the interrupts for channel 0 and for control core 0 */
CPSWWrCoreIntDisable(me->wrpr_base, 0, 0, CPSW_CORE_INT_TX_PULSE);

CPSWWrCoreIntDisable(me->wrpr_base, 0, 0, CPSW_CORE_INT_RX_PULSE);

//Enable the Global Interrupts
IntEnable(intStatus);

but this seems to cause crashes. 

Is this the correct way to temporarily disable the interrupts?