Dear forum,
I run with my code into the situation, that PM2 is not only exit due to sleep timer (as I want to), but also due to T4. I can reproduce this definitly with my code. When I set IEN1 = 0x00; which disables the T4 interrupt PM2 is exit after sleep timer expires only. When I set IEN1 = 0x10; which enables the T4 interrupt PM2 is exit immediately! This is against the description in the datasheet which states that only the sleep timer or external port interrupts are able to exit PM2.
I tried to cut out the relevant code to be able to post them, but then I cannot reproduce then the effect anymore. So it seems to be a combination of other things or a timing issue.
What cirmumstances can cause the T4 will exit PM2? Sure I can simply disable the T4 interrupt before enterring PM, but I would like to understand the behaviour of the CC2511.
I found a sentence which I do not understand in the datasheet in chapter 12.1.3 "Power management control" pg. 74 which reads:
"Since an interrupt can occur before the device has actually entered PM{1 - 3}, it is necessary to clear the MODE bits before returning from all ISRs associated with interrupts that can be used to wake the device from PM{1 - 3}."
Probably this is a hint to my problem, but I do not know what I have to do to follow the recommendation.
Any comment to my problem is highly appreciated.
regards
spachner