This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Sample battery voltage via VDDHDIV5 in zephyr with NRF52840

Hi,

I am currently developing an application for the NRF52840 using a custom pcb powered through the VDDH pin using a 4.2v lithium ion battery. Part of my application requires me to monitor the battery voltage, and I was previously able to achieve this using the NRF SDK and sampling VDDHDIV5 as per the below thread:

https://devzone.nordicsemi.com/f/nordic-q-a/46513/how-to-measure-battery-voltage-4-2v-3-0v-without-external-resistors-on-nrf52840

Recently however, I have switched my project over to using Zephyr and was unable to find any example showing how to do the same thing. I see examples for sampling the 8 ADC channels but not VDDHDIV5. Is this possible to achieve this using Zephyr or will I need to update the hardware to use a voltage divider and sample using one of the eight ADC channels?

Thanks in advance!

Parents Reply Children
No Data
Related