I want to read data over uart from sensor, advertise the value go to idle mode and wake up on rtc timeout to do the same thing again.
when I try to read data over uart from rtc callback I never recieve any caracter
I am using nrf52840dk , sdk 15.3.0
void rtc_handler(nrf_drv_rtc_int_type_t int_type)//this has to change { if (int_type == NRF_DRV_RTC_INT_COMPARE0) { nrf_drv_rtc_counter_clear(&rtc); nrf_drv_rtc_cc_set(&rtc,0,COMPARE_COUNTERTIME * 8,true); // uart_setup_init //measure data over uart //generate msg to be advertised //advertise init //advertise start } else if (int_type == NRF_DRV_RTC_INT_TICK) { // nrf_gpio_pin_toggle(TICK_EVENT_OUTPUT); } }
NB: the commands are just to explain what the used function are doing
and those are the same used in main to do the same work for the first time
is there something missing that should be updated or added