SAADC external reference on nRF54L15

Hi guys,

I've been using the ADC with the internal reference of 0.9V. 

However, to increase the scale of the ADC without using the gain 1/4 I've made a revision to the PCB to use the REF333 ic on pin P1.08 (External reference for SAADC). I'm now struggling with the setup on Zephyr. I've searched a bit but no luck so far.

I'm using the native SAADC libs since I have PPP set up for auto-converting based on a timer.

I've applied the following to the channels:

"saadc_channels[i].channel_config.gain = NRF_SAADC_GAIN1;

saadc_channels[i].channel_config.reference = NRF_SAADC_REFERENCE_EXTERNAL;"
However, the signal saturates around 1.2V, which I believe is because the default NRF_SAADC_REFERENCE_EXTERNAL is set to 1.2V (PADC_EXT_REF_1V2).

I think I need to change the REFSEL register to select "VREF = AREF" and maybe the EXTREFSEL to setup P1.08? What is the Zephyr way of doing this? 

One last question, I've noticed this on the datasheet:

"Note: The external reference voltage should be close the internal reference voltage. Preferably no more than 5% deviation from the internal reference voltage, VREF. Using a lower reference voltage will lead to increased leakage, and can lead to undefined behaviour."

Does this means that I'm not recommended to supply 3.3V to the Ref pin? Or is this just a power saving thing, that cause leakage? This will be a device plugged to the outlet, so no need for power save modes.

Thank you for the ongoing support,

Best regards,

Fernando Fontes

Parents
  • Hi Metyis, 

    My understanding is that external reference voltage should be close to internal reference voltage = 0.9V (between 0.855V and 0.945V), not 3.3V nor 1.2V. 


    The reference to PADC_EXT_REF_1V2 I believe a mistake in the documentation. It's the pin on nRF54H not on nRF54L. On nRF54L external reference given at EXTREF pin. 

    NRF_SAADC_REFERENCE_EXTERNAL is simply a boolean bit to assign to REFSEL register to choose between internal and external reference. 

  • Ok, so if I have 3.3V connected to the EXTREF what should I do to be able to use it as the ADC reference?

    Best regards,

    Fernando Fontes

  • Hi Fernando, 

    You can't connect 3.3V to EXTREF 
    It only allowed to use internal reference or external reference at (around) 0.9V. 
    (unlike the nRF52 that can use VDD as reference)

    For doing ADC with higher than than 0.9V you will have to use GAIN or external voltage divider on the input. 

  • Ok,.. that's a shame.. I have a pressure sensor connected and I was trying to improve the accuracy by using an external 3v3 reference to increase the scale. 

    The note on the datasheet should be perhaps more direct and saying that is not possible at all. I thought it was possible but it would lead to leakage and therefore waste more energy.

    Ok, but nevertheless having 3v3 on EXTREF will not cause any warm on the nrf54l15 itself right? Because, it can also work as a normal gpio which should allow to go up to VDD right? Because I've a production batch already with this 3v3 on that pin.

    Best regards,

    Fernando Fontes

Reply
  • Ok,.. that's a shame.. I have a pressure sensor connected and I was trying to improve the accuracy by using an external 3v3 reference to increase the scale. 

    The note on the datasheet should be perhaps more direct and saying that is not possible at all. I thought it was possible but it would lead to leakage and therefore waste more energy.

    Ok, but nevertheless having 3v3 on EXTREF will not cause any warm on the nrf54l15 itself right? Because, it can also work as a normal gpio which should allow to go up to VDD right? Because I've a production batch already with this 3v3 on that pin.

    Best regards,

    Fernando Fontes

Children
Related