Currently, I'm trying to use external interrupt that generated by ADXL345 to wake up the nrf51822 after sleep but not working as i want. Kindly check on the attached code and give advise. Please help!!! Thanks.
Currently, I'm trying to use external interrupt that generated by ADXL345 to wake up the nrf51822 after sleep but not working as i want. Kindly check on the attached code and give advise. Please help!!! Thanks.
So ADXL345 generates signal by shaking it but nRF doesn't wake up or ADXL345 doesn't generate signal?
It doesn't wake up and i try to use sd_app_evt_wait() is not working
for sending nRF to sleep I use:
NRF_GPIOTE->EVENTS_PORT = 0;
nrf_gpio_cfg_sense_input(WAKEUP_INPUT, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_HIGH);
sd_power_system_off();
Ya. this is the typical configuration of nordic for external interrupt. Currently, I'm using Arduino IDE as compiler. By the way, is it possible to use sd_power_system_off(); when i want my timer or RTC to keep running at the background? so fast as i know it is not possible.
No, in system off the system is off. You need wfi or wfe (sd_app_event_wait) to do that. You can use the sense machanism to wake the CPU.