2024-09-24 02:15 AM
Hi friends. With using STM32U535 microcontroller, i plan to make a project. The project includes 3.6V battery cell. We read adc values when this battery cell supplies the microcontroller. When the battery voltage decreases, the reference voltage should not be altered. Because of this situation, i think i need a vref pin on microcontroller. If i am not wrong, this microcontroller does not have vref pin for this purpose. Do you have any recommendation for me about this situation?
2024-09-24 02:42 AM
The actual name of the microcontroller is STM32U545CB (LQFP48 package).
2024-09-24 02:49 AM - edited 2024-09-24 02:50 AM
Hi,
which U535 ?
see ds:
100pin case has vref+.
But you dont need the vref pins, you have the RefINT .
So you just get the actual value, refint is giving and calculate the actual ADC vref+ (= VDD, battery /supply voltage).
Then you know (calculate) the ADC input voltages . Of course needs some 3rd grade mathematc skills. :)
2024-09-24 03:51 AM
I know the calculation of adc voltage from PIC microcontrollers. That anwer is not i seek for. But thank you anyway.
2024-09-24 03:57 AM
I just now inspect some of the pages of datasheet. It refer to some four levels of Vref voltage. If i understand correctly, i must supply the Vdda pins with certain amount of voltage. But i am curious about if it is enough to supply Vdda pin with just amount of voltage or am i have to program some kind of registers etc. ?
2024-09-24 04:04 AM
What voltage IS your supply ?
-> If maybe 2.5V, you only can use the 2.xx Vref to measure the reference. (The reference needs some headroom to the supply VDDA (bonded to VREF+ , so same).
2024-09-24 04:17 AM
If we adjust Vrefbuf as HOLD to 2.5V, does the adc have 2.5V reference voltage? Some of the code is attached.
2024-09-24 04:44 AM
Still no answer. What voltage IS your supply ?
+
see U535 maual:
But VREF+ is not on a pin on your chip. So - what then ??
+
>I know the calculation of adc voltage from PIC microcontrollers. That anwer is not i seek for. <
What else then ?
2024-09-24 05:17 AM
Hello,
As VREF is connected to VDDA, I suggest to connect VDDA to an external reference voltage. The power consumption on VDDA is low as it supplies only ADC, DAC, comparators and opamp (cf datasheet).
Bertrand
2024-09-24 05:32 AM
As we supply the Vdd with 3.3V and Vdda with 2.5V individually, i can get 2.5V reference voltage? Am i understand you correctly?