app: read NTC temperatures via sensor API
Replace the temperature calculation in daq.cpp by the DAQ NTC sensor driver. Temperatures below -50 °C are still considered as a missing sensor. A missing MOSFET temperature sensor keeps the previous value instead of setting an implausible temperature. The series resistor of the NTCs was specified as multiplier of the DAQ channels before. It is moved to the pullup-ohm property of the new ntc-fets and ntc-bat nodes and the gain of the DAQ channels is set to 1. Note for out-of-tree boards: The temp-fets and temp-bat DAQ channels need the labels daq_temp_fets and daq_temp_bat and a corresponding libresolar,daq-ntc-thermistor node with the labels ntc_fets and ntc_bat. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6ec3c6f312
commit
b90be36dbc
@@ -178,7 +178,9 @@ Move all remaining hardware access from `app/src` into Zephyr drivers.
|
||||
- [x] STM32 timer backend (`libresolar,stm32-pwm-power-switch`) for PWM charge controllers
|
||||
(replaces `pwm_switch_driver.c`), needs hardware test
|
||||
- [x] Emulated backend (`libresolar,power-switch-emul`) for tests on native_sim
|
||||
- [ ] NTC thermistors via Zephyr sensor API (replaces `ntc_temp()` in `daq.cpp`)
|
||||
- [x] NTC thermistors via Zephyr sensor API (replaces `ntc_temp()` in `daq.cpp`)
|
||||
- [x] `libresolar,daq-ntc-thermistor` sensor driver using the filtered DAQ readings, as
|
||||
Zephyr's NTC driver requires exclusive ADC access
|
||||
- [ ] Bootloader entry and SoC-specific setup out of the application (`hardware.cpp`,
|
||||
`setup.cpp`, `mcu.h`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user