From 06499a2409c45f0c496dfd05fd06b54e31e87136 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Tue, 6 Oct 2020 13:44:17 +0200 Subject: [PATCH] PWM solar input: Fix voltage calculation offset in dts This offset had to be left-shifted by 4 since the DAQ calculations switched to 16-bit resolution. --- boards/arm/mppt_2420_hpx/mppt_2420_hpx.dts | 2 +- boards/arm/pwm_2420_lus/pwm_2420_lus.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/arm/mppt_2420_hpx/mppt_2420_hpx.dts b/boards/arm/mppt_2420_hpx/mppt_2420_hpx.dts index 04c737f..b7424df 100644 --- a/boards/arm/mppt_2420_hpx/mppt_2420_hpx.dts +++ b/boards/arm/mppt_2420_hpx/mppt_2420_hpx.dts @@ -99,7 +99,7 @@ io-channels = <&adc1 4>; multiplier = <25224>; // (12*8.2 + 120*8.2 + 120*12) * 10 divider = <984>; // (8.2*12) * 10 - offset = <2338>; // 4096 / (1 + 8.2/120 + 8.2/12) + offset = <37414>; // 65536 / (1 + 8.2/120 + 8.2/12) }; temp-fets { diff --git a/boards/arm/pwm_2420_lus/pwm_2420_lus.dts b/boards/arm/pwm_2420_lus/pwm_2420_lus.dts index 3b636ce..7010379 100644 --- a/boards/arm/pwm_2420_lus/pwm_2420_lus.dts +++ b/boards/arm/pwm_2420_lus/pwm_2420_lus.dts @@ -104,7 +104,7 @@ io-channels = <&adc1 1>; multiplier = <25224>; // (12*8.2 + 120*8.2 + 120*12) * 10 divider = <984>; // (8.2*12) * 10 - offset = <2338>; // 4096 / (1 + 8.2/120 + 8.2/12) + offset = <37414>; // 65536 / (1 + 8.2/120 + 8.2/12) }; i-load {