The input range of the SAADC is not as expected.

Hellow

We are in trouble. Please tell me what to do.

The input range of the SAADC is not as expected.

I use:
・nrf52840
・VDD=3.3V by Regulator
・nRF5_SDK_17.1.0
・Sample program Unmodified \examples\peripheral\saadc

Therefore:
・gain=1/6
・Resolution=10bit
・Reference internal =0.6V
-->The Voltage input range should be 3.6v.


Situation & The problem
Vin=1.0V->0x011e (ok)
Vin=1.5V->0x01ab (ok)
Vin=2.0V->0x0239 (ok)
Vin=2.2V->0x024f (NG)
Vin=2.3V->0x01e1(NG)
Vin=2.4V->0x017e(NG)

If the input voltage exceeds about 2.2V, the output code is not as
expected, and if the input voltage is higher than that, the output code
value becomes smaller.

What are the causes and what can be done about it?

Please help me.

Parents
  • That's strange. Are you using our DK, or are you using a custom board? 

    What's you regulator configuration? 

  • Sorry it took me so long to get back to you. I accidentally clicked on
    'verified answer' and couldn't reply.


    I use DK of other manufacturers.

    And then Regulator conditions in the DK board, as follows
    5V→Regulator(3.3V)→nrf52840

    As for the DK, it is made by another company, but the other functions
    are normal and there does not seem to be any problem with it.
    We are also concerned about the fact that similar questions have been
    asked in the past and no clear answers have been given.

    Is this an unusual situation?

  • REGOUT0 is set to 1.8V. When you apply a voltage of 2.1V and above (1.8V + 0.3V) the ESD diodes will start conducting from the analog input into VDD. If the signal source has more than ~100ohm internal impedance the voltage on the input pin will drop closer to VDD. 

    See the I/O pin voltage specs in Absolute maximum ratings

  • A series of problems were solved by writing a '5' to the UICR->REGOUT0 register in high voltage mode, setting it to 3.3V.

    The output level of the GPIO is now about 3V and the input voltage range of the SAADC is the same as the set value.

    However, this register should only be enabled when operating in VDDH mode. The circuit was wired in such a way that it would work in VDDH mode, but the question remains: why?


    (1) Then, why was VH=3.3V sometimes observed in the beginning?
    The waveform recorded by the oscilloscope at the time was about 3V, so I don't think I'm mistaken.

    (2) Also, why the return value of "nrf_power_dcdcen_get();" or "nrf_power_dcdcen_vddh_get();" is "false" in both cases?

    I didn't change the power supply, and I didn't apply the current to the regulator to make the voltage drop significantly.Incidentally, the revision for the 52480 was NRF52480_xxAA_REV2.

    Do you know the reason for these questions?

    1. The UICR->REGOUT0 register was likely set to 5(3.3V) at some point, then an nrfjprog eraseall command reset the UICR->REGOUT0 to its default state, 7 (1.8V). 

    2. You check for the state of the DCDC regulators, If false it means that they are operating in LDO mode. 

    I hope this clears things up. Most likely Raytac ships their dk's with UICR->REGOUT0 set to 5, we do the same for our nRF52840 dongles. 

  • Thank you for your reply.

    I asked Raytac and they said the evaluation board is working with VDDH. And I understood that it is working with LDO, not DC/DC.

    I think the trouble is that Raytac shipped with UICR-> REGOUT0=5, but I did an All Erase and it went back to REGOUT0=7.
    I think this is why, since All Erase, the board has a GPIO output H level of 1.8V and the SAADC input range is no longer as expected.


    Finally, I have cleared things up.
    Thank you for all your help and advice.

Reply Children
No Data
Related