In the main loop of my application I need to copy data into tmp_buf. I wish to disable an interrupt (masked by M_Int1ms) that is likely to modify data while it is being copied. Other interrupts should continue to be serviced while memcpy() is executed.
Is the following code a safe way to achieve this?
IER &= ~M_Int1ms;
memcpy(tmp_buf, data, len);
IER |= M_Int1ms;
Regards, Johannes