This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

GPIOTE+SAADC

Hi, I am facing some issue while working with both GPIOTE and SAADC. I have merged the GPIOTE and SAADC sample example sdk code into a new project but what I am facing is the GPIOTE not getting monitored when SAADC is functions are called.

int main(void)
{
    const uint8_t leds_list[LEDS_NUMBER] = LEDS_LIST;
    LEDS_CONFIGURE(LEDS_MASK);

    gpio_init();

    saadc_sampling_event_init();
    saadc_init(m_buffer_pool);
    saadc_sampling_event_enable();

    while (true)
    {
        __WFE(); 
    }
}

In the above code i can find out that the control is going to the saadc_sampling_event_enable() function and I can find the ADC data in the buffer but the GPIOTE pin is not getting monitored, means the control is not going to in_pin_handler function if there is any changes done in the input PIN.

I suppose both are using interrupt but why both are not executing can't be understood.

Please reply ASAP as the task is on priority and I am new to NRF52832 Soc.

Regards, Amit

Related