How to get VRef like in HAL ST Low Level Programming?
I’m trying to measure battery voltage, implementing a voltage divider into ADC1, but I don’t know how to get the voltage reference provided by STM32WL55.
How to get VRef like in HAL ST Low Level Programming?
I’m trying to measure battery voltage, implementing a voltage divider into ADC1, but I don’t know how to get the voltage reference provided by STM32WL55.
Welcome to RAK forum @rodrigobueno ,
In RUI3 API, there is no way for you to read the configured voltage reference. But you can set it using AnalogReference API. However, take note that there is a current bug in STM32WL RUI3 firmware so that analog reference stays at VDD as default.
Thank you @carlrowan ! My goal is to measure the battery of my device. You know another way to do it, with low power consumption?
If you can have a fix 3.3V then you can use it as voltage reference. What is your battery?
I’ll explain my current case, allow me to extend a little:
Therefore, I am wanting to migrate this project to use the RAK3172 with LORA WAN protocol, as the battery consumption is much lower, and the signal range is greater, but there were some items to be resolved, such as:
I believe that by solving these 2 items above, I will be able to migrate my project to RAK3172.
PS: I was able to successfully develop my project in low-level programming using the STM32 CUBE IDE, but the consumption in StandBy is running around 300uA, and I couldn’t get it down to around 1 to 3uA as I can in RUI3, is there any tip?
Hi @rodrigobueno ,
RAK3172 is a good choice in moving to LoRaWAN.
To answer your questions:
uA
can come from - depending on the circuit or the code itself.Thank you @carlrowan !
Before I close this topic, one last question:
Can I change the TX Power in LORAWAN (dB)?
Hi @carlrowan , this bug is in the backlog for resolution? “However, take note that there is a current bug in STM32WL RUI3 firmware so that analog reference stays at VDD as default.”
Hi @rodrigobueno ,
I just got an update on this issue and found out that configurable ADC reference is only available on RAK4630 RUI3 (based on NRF52840). The RAK3172 (based on STM32WL) has no configurable ADC reference. Sad to say but VDD will be the only ADC Vref for RAK3172.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.