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

The imprecision SAADC data just after VDD voltage measurement

Hello all,

I have a question about the SAADC of nRF52832.

Now I use the SAADC to measure the some external sensor voltage and the internal VDD voltage.

The sensor connection is follows,

- differential mode (sensor =AIN1, and stable constant voltage=AIN0)

- oversampling x256

- GAIN 1/4

- internal reference 0.6V

- use CH[0]

meanwhile, the VDD is

- single-end mode

- oversampling x128

- GAIN 1/6

- internal reference 0.6V

- use CH[0]

I measure the sensor voltage in almost time and sometime measure the VDD.

The VDD source is coin battery (CR2032).

Finished the VDD and switched to the sensor , just 1st ADC data of sensor voltage is strange.

The 1st data is always 20-30LSB (14bit mode) higher than other normal data.

The sensor voltage is not change at this moment, but the data changed.

When switch from VDD to the sensor, I of course run the uninit() and the init() to reset.

But I use the same channel CH[0]  on both VDD and sensor.

Is that wrong?

Should I set the individual channels at each measurement sources?

Please let me know the correct way to use.

Best regards,

Kiyoshi Iwai

Parents Reply
  • Hello Kiyoshi Iwai,

     

    Kiyoshi Iwai said:
    1.What do you mean the 0x40007FFC=0 or 1 ?

    You should write '0' to address 0x40007FFC after un-initializing the SAADC:

    nrf_drv_saadc_uninit();

    *((volatile uint32_t *)0x40007FFC) = 0;

    When re-initing again, you should write '1' to address 0x40007FFC prior to initializing the SAADC:

    *((volatile uint32_t *)0x40007FFC) = 1;

    nrf_drv_saadc_init(...);

     

    Could you see if this has any impact on this issue?

     

    Kiyoshi Iwai said:
    2.I can't set 1/4 for VDD because of 3.0V.

    Ah, I understand. If the signal does not go over 3.0V, you can use "Gain1_5", to see if this also produces the same behavior.

    Kind regards,

    Håkon

Children
Related