Hi
We would like to monitor the supply voltage (VDD) to the MCU (S32K142) in one of our applications. Chapter 43.2 in the S32K1xx Series Reference Manual describes that this is possible. My understanding is that we need to set ADC_SUPPLYEN to 1b and ADC_SUPPLY to 000b and then we can read ADC0 internal channel 0.
My question is which voltage reference is then use and what is the accuracy? Is it the internal bandgap found in the datasheet with an accuracy of 3mV?
BR,
Johan
Hi Johan,
Yes, it is the bandgap reference voltage.
You should always get 4095 ADC result (12b resolution) when the VDD voltage is measured.
The ADC voltage reference can be either VDDA/VREFL or VREFH/VREFL.
VDD and VDDA must be shorted to a common source on the PCB.
VREFH should always be equal to or less than VDDA + 0.1 V and VDD + 0.1 V
Regards,
Daniel
Hi Daniel
I'm a bit puzzled by your answer. I was wondering which ADC voltage reference that is used when using the internal supply monitoring on ADC0 internal channel 0. In your answer you first confirmed my assumption that it is the internal bandgap reference voltage but then you stated that its either VDDA/VREFL or VREFH/VREFL.
VDD, VDDA and VREFH are connected to the same source in our design. So measuring VDD with VDDA or VREFH as ADC voltage reference makes no sense since we will always get 4095 ADC.
BR,
Johan
Hi Johan,
By measuring Vbg, which is stable regardless of VDD, you can tell what the 4095 ADC result actually means.
BR, Daniel
Hi Daniel,
Since the ad value we read is always 4095, why to sample this voltage? Can you provide an answer about when the "43.5ADC Internal supply monitoring(S32K datasheet,p.1197)" function is used. Or is there an application note for explanation。
I have read AN12217,I already understand“using bangap to monitor reference voltage”.vref = 1000*4095/BG_AD.
My question is how to use this function "43.5ADC Internal supply monitoring",and why NXP design this function?
thank you very much.
Hi @Muskz,
Do you mean why there are the options to measure VDD and VDDA which should be >= VREFH, and the result is always saturated to 4095?
Refer to the S32K1xx Safety Manual which is available at the S32K1xx webpage in Secure Files or on the SafeAssure NDA community.
https://community.nxp.com/t5/SafeAssure-NDA-group/gh-p/52177
Section 5.7.2.3.2.1.4 ADC_SWTEST_TEST1.
Rationale: To detect possible failure of the ADC conversion logic.
Regards,
Daniel
Thank you very much for your reply. I have read the document you mentioned and I understand. Thank you again.
Hi Daniel
How can we measure Vbg?
Going back to my original question, when using the internal supply monitoring on ADC0 internal channel 0, what is the ADC voltage reference?
Regards,
Johan
Hi Johan,
Simply select Bang Gap as the input channel.
As I said, the voltage reference can be either VDDA/VREFL or VREFH/VREFL
BR, Daniel
so the "always get 4095 ADC result" is wrong?