SAADC VDDHDIV5 input on nRF52840 rev. 1

Hello,

I got two PCA10056 1.0.0 DKs equipped with an nRF52840 rev. 1 (code AC0). Both do not measure the VCCH voltage correctly (displayed voltage ~2.4V instead of 3.0V). The setup is based on the peripheral->saadc example with the only modification being:

//      NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN0);
        NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_VDDHDIV5);
        channel_config.gain = NRF_SAADC_GAIN1_2;

I chose to increase the input voltage swing on the ADC by configuring the gain stage from 1/6 to 1/2. This should normally give better results.

The displayed result is around 410: 410/1023 * 0.6V * 5 * 2 = 2.4V. I got the same result with the gain stage set to 1/6. The result is consistent across the two boards. Using NRF_SAADC_INPUT_VDD with gain 1/6 yields the correct result. A custom board with a rev. 2 chip works correctly with VDDHDIV5.

Can you confirm this behaviour? I did not see any erratum against explaining this. I can only guess that this behaviour (if confirmed) is a side-effect of erratum 197.

Thanks,

Norbert

  • Hello Karl,

    Thanks for the feedback. Very strange, indeed. I just reran the experiment with the same settings you have and still get only around 136 (2.39V).

    Power supply is USB. SW9 is in middle position (VDD power), the coin cell battery removed. The 3V are generated on-board from the buck regulator.

    The board should be unmodified, though it is not in a pristine condition. Chip version is Q1AAC0.

    I will dig further on Monday and let you know.

    Thanks for your help,

    Norbert

  • Hello again, Norbert

    Norbert said:
    Power supply is USB. SW9 is in middle position (VDD power), the coin cell battery removed. The 3V are generated on-board from the buck regulator.

    Oh, it seems I have misunderstood your configuration earlier.
    I did my measurements with a supply of 3V directly on the VDDH input - with the SW9 switch set to Li-Po, for High Voltage mode. If the SW9 is in the VDD position the nRF52840 will enter Normal voltage mode as opposed to high-voltage mode. In normal voltage mode you should not use the VDDHDIV5 to measure your VDD bus voltage, but instead use the _VDD input directly. In your test, do you see the expected SAADC measurements if you configure the SAADC to measure _VDD instead of _VDDHDIV5 (while keeping SW9 in the VDD position)?

    For all the details about the DK's power supply circuitry you could download the nRF52840 DK's schematics here, to take a closer look.
    Fair warning, the power circuitry of the DK is not the easiest to familiarize with due to the array of power switches utilized for the different configurations.

    Best regards,
    Karl

  • Hello Karl,

    I checked once more the boards and still got the same results. The board's HW looks fine. I also found a third V1.0.0 DK which behaves exactly like my other two boards. Then, I used bare-metal programming to configure and read the SAADC, totally avoiding the SDK. Still the same results.

    I am completely at a loss here. Would you please do me a favor and check the markings of the chip on your V1.0.0 DK, just to make sure you have a legit DK and not an upgraded version? It should read 'AC0'. Alternatively, you could also read FICR->INFO.VARIANT which should give 0x41414330 (= "AAC0").

    If you find that your chip is really a rev. 1, I suggest to give up and file it under great unresolved mysteries of the universe.

    Thanks,

    Norbert

  • Hello Norbert,

    Norbert said:
    I also found a third V1.0.0 DK which behaves exactly like my other two boards.

    Could you confirm that you tested this with the SW9 switch in the Li-Po position, while powering the device with 3.0 V through the J6 or P27 port?

    Norbert said:
    I am completely at a loss here. Would you please do me a favor and check the markings of the chip on your V1.0.0 DK, just to make sure you have a legit DK and not an upgraded version?

    Sure thing - I just checked my board, and I do indeed have a AAC0 version of the chip.

    Best regards,
    Karl

  • Could you confirm that you tested this with the SW9 switch in the Li-Po position, while powering the device with 3.0 V through the J6 or P27 port?

    No, as I said earlier, SW9 is in middle position (VDD). The power is coming from the USB I/F.

    Thanks,

    Norbert

Related