2025-11-14 12:50 AM - last edited on 2025-11-17 6:13 AM by mƎALLEm
/ {
aliases {
adc0 = &adc1;
};
};
&vbat1 {
status = "okay";
io-channels = < &adc1 5 >;
};
2684 = 2162mV
1788 = 1440mV
1571 = 1265mV
1532 = 1234mV
1492 = 1202mV
adc@42028000, channel 12, 5 sequence samples:
2092 = 1685mV
1660 = 1337mV
1571 = 1265mV
1532 = 1234mV
1532 = 1234mV
0 = 0mV
1068 = 860mV
1404 = 1131mV
1492 = 1202mV
1492 = 1202mV
adc@42028000, channel 12, 5 sequence samples:
636 = 512mV
1315 = 1059mV
1492 = 1202mV
1492 = 1202mV
1532 = 1234mV
Solved! Go to Solution.
2025-11-17 6:03 AM
Hello @devin-hu,
I've tested on my side and I got the same results as you. I've fixed it by changing the value of `<st,adc-prescaler>` value to 2 instead of 1 in the board dts file.
I've pushed a PR on Github to fix this issue here: boards: st: stm32u5g9j_dk: adjust adc prescaler by gautierg-st · Pull Request #99506 · zephyrproject-rtos/zephyr.
Hope this helps.
2025-11-17 6:03 AM
Hello @devin-hu,
I've tested on my side and I got the same results as you. I've fixed it by changing the value of `<st,adc-prescaler>` value to 2 instead of 1 in the board dts file.
I've pushed a PR on Github to fix this issue here: boards: st: stm32u5g9j_dk: adjust adc prescaler by gautierg-st · Pull Request #99506 · zephyrproject-rtos/zephyr.
Hope this helps.
2025-11-25 12:52 AM
Hi,
Thank you for your reply. This solution is effective.