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

Inconsistent ADC Behaviour with DFU

Hi all,

I have a working ADC implementation (S130 + Application) and use it to measure an analog input continuously.

However if I use the same code on top of bootloader (S130+DFU+Application), it starts acting weird. When I check the ADC values, I noticed that they are fluctuating in a large margin. What may cause this issue when I use the code with DFU but works as expected without DFU code?

Regards

Parents
  • Could you try configuring the GPIO pull settings using the GPIO pin number in the call to nrf_gpio_cfg_input()? The define you are using will not evaluate to the correct GPIO pin number (AIN2 = P0.01):

    NRF_ADC_CONFIG_INPUT_2 = ADC_CONFIG_PSEL_AnalogInput2  = (4UL) 
    

    Try changing from this:

    nrf_gpio_cfg_input(NRF_ADC_CONFIG_INPUT_2,NRF_GPIO_PIN_NOPULL);
    

    To this:

    nrf_gpio_cfg_input(1,NRF_GPIO_PIN_NOPULL);
    
Reply
  • Could you try configuring the GPIO pull settings using the GPIO pin number in the call to nrf_gpio_cfg_input()? The define you are using will not evaluate to the correct GPIO pin number (AIN2 = P0.01):

    NRF_ADC_CONFIG_INPUT_2 = ADC_CONFIG_PSEL_AnalogInput2  = (4UL) 
    

    Try changing from this:

    nrf_gpio_cfg_input(NRF_ADC_CONFIG_INPUT_2,NRF_GPIO_PIN_NOPULL);
    

    To this:

    nrf_gpio_cfg_input(1,NRF_GPIO_PIN_NOPULL);
    
Children
No Data
Related