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.

Any delay when enabling interrupts?

Other Parts Discussed in Thread: CC2510

When I enable interrupts, are they enabled immediately, or
is there a delay?  For instance:

    orl    IEN0,#0x80    ; Enable interrupts
    orl    PCON,#0x01    ; Go to sleep

Is there any chance of getting an interrupt between
these two instruction?

  • Hi.

    Depends on which interrupts and the content of the SLEEP.MODE bits as some interrupts are gated when SLEEP.MODE is different from 0.

    For an example on how to safely enter PM, please see chapter 12.1.3 in the CC2510 datasheet (or similar chapter in other datasheets).

    Kjetil

  • Kjetil said:
    For an example on how to safely enter PM, please see chapter 12.1.3 in the CC2510 datasheet

    I have read that section of the datasheet, and it gives a good description of how to enter a non-zero powermode.  But it does not explain how to safely go to idle mode when the powermode is zero.  I need to wake up on any interrupt, not just a subset, so I am using powermode zero, but I don't see any guarantee that I can do that without setting up a race condition.

    Other CPUs that I have used, including some 8051 variants, explicitly state that interrupts are enabled with a one instruction delay.  So interrupts can be enabled and the CPU can be idled, all as one atomic operation.  How can I do this on cc251x?