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.

Is it possible that the assignment instruction would be interrupted by another ISR?

Hi All,

I am using F28377D. For example, I have two global float variables, A and B. In one lower priority ISR, I have one instruction A = B. For some reason, another higher priority ISR would interrupt this lower priority ISR, and it needs to read the correct data of A. When the CPU do A = B, I guess at first the lower 16 bits of B would be assigned to the lower 16 bits of A. If the higher priority ISR interrupts it at this time, then the read value of A would be wrong because the higher 16 bits data is not correct. Is my understanding correct?

Thanks

  • Fei,

    CPU supports 32-bit data operations/movement.
    Having said that - In general, If you want to certain sequence of code to be non-interruptible, you can do so by by disabling the global interrupt (DINT) and enable the same (EINT) after the sequence.

    -Bharathi.