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
  • Following is my ADC setup:

    nrf_gpio_cfg_input(NRF_ADC_CONFIG_INPUT_2,NRF_GPIO_PIN_NOPULL);
    
    adc_channel_config.config.config.reference = NRF_ADC_CONFIG_REF_SUPPLY_ONE_THIRD
    adc_channel_config.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD;
    adc_channel_config.config.config.ain = NRF_ADC_CONFIG_INPUT_2;
    
    nrf_drv_adc_channel_enable(&adc_channel_config);
    

    I am getting ADC samples at every 1ms. The issue occurs only if DFU is programmed to the chip. (S130+DFU+Application) By the way, you can see the waveform of NRF_ADC_CONFIG_INPUT_2 once the ADC is enabled where it is stable until ADC started.

    link text

Reply
  • Following is my ADC setup:

    nrf_gpio_cfg_input(NRF_ADC_CONFIG_INPUT_2,NRF_GPIO_PIN_NOPULL);
    
    adc_channel_config.config.config.reference = NRF_ADC_CONFIG_REF_SUPPLY_ONE_THIRD
    adc_channel_config.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD;
    adc_channel_config.config.config.ain = NRF_ADC_CONFIG_INPUT_2;
    
    nrf_drv_adc_channel_enable(&adc_channel_config);
    

    I am getting ADC samples at every 1ms. The issue occurs only if DFU is programmed to the chip. (S130+DFU+Application) By the way, you can see the waveform of NRF_ADC_CONFIG_INPUT_2 once the ADC is enabled where it is stable until ADC started.

    link text

Children
No Data
Related