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

ADC offset

Dear Sirs!

On one from 25 boards there is offset in ADC input about 30 ADC units. Vref = 0.6 V, Gain=6, 12 Bit ADC, oversampling 256 sample.

In other devices I do not see this problem.

My questions:

1. If it is a possible offset or there is a hardware problem?

2. If there is no hardware problem, can nrf_drv_saadc_calibrate_offset solve this problem?

3. How much time maximum can take running nrf_drv_saadc_calibrate_offset?

Thank you

Parents Reply
  • Addtional question.

    Can I perform calibration each time after I init SAADC device before channel initialization?

    Can it cause any problem except issue that calibration takes time?

     nrf_drv_saadc_init(NULL, AD_saadc_callback);

    nrf_drv_saadc_calibrate_offset ();

        while(!AD_CalibrationDone);
        nrf_saadc_event_clear(NRF_SAADC_EVENT_CALIBRATEDONE);
        nrf_saadc_int_disable(NRF_SAADC_EVENT_CALIBRATEDONE);

     nrf_saadc_channel_config_t channel_config_bat = NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);
      nrf_drv_saadc_channel_init(&channel_config_bat);

    void AD_saadc_callback(nrf_drv_saadc_evt_t const * p_event)
    {
      // set calibration flag if is calibration event
      if(p_event->type==NRF_DRV_SAADC_EVT_CALIBRATEDONE)
      {
        AD_CalibrationDone = true;
      }
    }

Children
No Data
Related