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.
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();
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();