In my application, CC2430 is connected to a digital accelerometer ADXL345 from Analog devices. This accelerometer has two interrupt output pins which are connected to CC2430's two GPIO pins. When there is an interrupt, CC2430 will read data from ADXL345.
My algorithm for the accelerometer runs well if POWER_SAVING is disabled. By the way, I use Zstack. A image below shows what happened when there is an interrupt from ADXL345. It can be seen that, when INT1 is low (active low), in less than 1ms, CC2430 will read data from ADXL345 via SPI.
However, when I enable power saving, the interrupt is served 2 seconds later. I observed that the 2 seconds here is related to the -DPOLL_RATE defined in f8wConfig.cfg file coz when I changed -DPOLL_RATE to 5000 (ms), the interrupt will be handled 5 seconds later. That means, interrupts are only handled when CC2430 wakes up to poll messages from its parent.
By the way, I also had a push button on the board. If the button is pressed, a packet will be sent. I can see that the packet is sent immediately after the button is pressed.
What could be the possible cause?
Thanks for any help.
regards,
Yuan Jian