Martin Jäger
176af4188f
Increase serial watchdog timeout
...
This prevents the watchdog from kicking in while configuration is stored to
slow EEPROM integrated in STM32L072 MCUs.
2020-08-17 19:58:51 +02:00
Martin Jäger
445359c3b5
Make CAN publication frequency more accurate
...
Using K_TIMEOUT_ABS_MS for k_sleep calculate exact 1s interval.
2020-08-03 14:52:20 +02:00
Martin Jäger
8f96343cf1
Add support for Kconfig in src/custom
...
Also fixes data_nodes_custom.cpp inclusion based on Kconfig.
2020-07-27 17:53:31 +02:00
Martin Jäger
bbd1312fe5
Relocate and clean up application Kconfig structure
2020-07-24 08:49:47 +02:00
Martin Jäger
dc85b46477
Remove unused ExtInterface and ExtMgr
2020-07-23 19:27:45 +02:00
Martin Jäger
01650917fd
Move ThingSet serial to dedicated thread
2020-07-23 19:18:24 +02:00
Martin Jäger
79ba9006e7
Move OLED display to dedicated thread
2020-07-23 18:31:52 +02:00
Martin Jäger
5e213fdfb1
Generate COMMIT_HASH define via CMake
...
Previously the commit hash was generated with a python script which was only
called by PlatformIO and caused issues when using Zephyr SDK directly.
2020-07-23 17:34:41 +02:00
Martin Jäger
c2ef955a63
Replace custom print_* with Zephyr LOG_*
2020-07-23 17:34:41 +02:00
Martin Jäger
8e06357a7d
Make CAN node ID configurable
2020-07-23 17:34:41 +02:00
Martin Jäger
70baedf95d
CAN: Separate thread for pub messages
2020-07-23 17:34:41 +02:00
Martin Jäger
3b486f3193
Restructure SW watchdog and fix bug for >3 channels
...
The feed function considered max. number of channels and not actual number
of registered channels, which resulted in undefined behavior if not all
channels were used.
Also introducing more simple API to hide the software implementation.
2020-07-23 17:34:41 +02:00
Martin Jäger
ed374e8e99
Remove CAN msg queue and update ThingSet lib
2020-07-23 17:34:41 +02:00
Martin Jäger
dc4576c8b4
Remove all board.h files
...
Final updates to devicetree files (adding temperature sensor information) make
board.h files obsolete.
2020-07-23 17:34:41 +02:00
Martin Jäger
27cdcb3bf6
LED setup via devicetree
...
- New charlieplexing-leds binding
- board.dts files updated
- Pin and LED setup removed from pinmux.c and board.h files
2020-07-23 17:34:41 +02:00
Martin Jäger
a584904470
Switch to new DT_ macros
2020-07-23 17:34:39 +02:00
Martin Jäger
b8fe6d7023
Fix some static code analysis warnings
2020-07-23 12:55:38 +02:00
Martin Jäger
3012501358
Switch to Zephyr 2.3 and update pio check
2020-07-23 12:55:38 +02:00
Martin Jäger
6316dcd57f
Add DC/DC HV side output enable switch
2020-07-23 12:55:38 +02:00
Martin Jäger
7dfcac4037
Add ADC reading to/from voltage conversions
2020-07-23 12:55:38 +02:00
Martin Jäger
7af7d1c4ee
Add CAN ISO-TP support
2020-07-23 12:55:37 +02:00
Martin Jäger
3fcd27cdba
Use separate CMakeLists.txt per directory
2020-07-23 12:41:32 +02:00
Martin Jäger
8a28d8bc22
Remove unused bootloader support
2020-07-23 12:41:32 +02:00
Martin Jäger
705abbed6b
Remove broken ESP32 modem driver
...
This driver was only compatible with mbed and didn't work reliably. Zephyr
has an in-built ESP modem driver already.
2020-07-23 12:41:32 +02:00
Martin Jäger
a7f4ccaa91
Add CAN support for MPPT 2420 RC board
...
The CAN-FD driver is not yet in Zephyr master, so it is required to get
Zephyr PR 22832 to actually use CAN with this MCU.
2020-07-23 12:41:24 +02:00
Martin Jäger
d283436747
Move ADC peripheral setup to devicetree
...
Remove the ADC channel configuration from the board.h files and use new
DT macros to configure the ADC peripheral based on board.dts only.
2020-07-20 09:07:31 +02:00
Martin Jäger
1b6c56d25b
Replace adc-gain DT binding with adc-inputs
...
Preparation for cleanup of ADC driver.
2020-06-26 15:17:53 +02:00
Rhushabh
1dc5cdd7ef
Software watchdog for multiple threads
2020-06-23 15:59:31 +02:00
Martin Jäger
3185ff32a1
Add support for Zephyr 2.3.0 (using west)
...
Enable CONFIG_LEGACY_DEVICETREE_MACROS and fix removed Kconfig values
like UART_1 to support v2.2 and v2.3.
2020-06-17 11:15:38 +02:00
Jordan Silverman
a768f059a1
Stop energy counter when disabled
2020-06-16 21:23:07 +02:00
Martin Jäger
fc0276e72c
Allow custom DC/DC control functions
...
A Kconfig CUSTOM_DCDC_CONTROLLER is introduced to enable implementation of
more sophisticated control functions than the standard perturb and observe.
A function dcdc_low_level_controller() must be implemented and is called
from the DMA interrupt after each new current sensor reading.
The default Dcdc::control() function is defined __weak.
2020-06-05 16:22:41 +02:00
Martin Jäger
2875ea1519
Rename DC/DC control function responsible for MPPT
2020-06-05 16:18:20 +02:00
Martin Jäger
3eb70e9a01
Add test/zephyr.h to mock Zephyr functions/defines
2020-06-04 16:28:19 +02:00
Martin Jäger
dfde83d8be
Add CCR and ARR based functions to half_bridge
2020-06-04 11:51:42 +02:00
Martin Jäger
b288ffdf35
Cleanup of half_bridge driver
...
Variables are now named same as registers to avoid confusion between duty
cycle as a value between 0 and 1 or as the capture/compare register value.
2020-06-04 11:51:42 +02:00
Martin Jäger
a6c0eecf20
Small datatype updates to reduce RAM footprint
2020-06-04 11:51:42 +02:00
azeemshatp
cfed3ed6e9
Configure custom data nodes
2020-05-26 15:02:26 +02:00
Martin Jäger
81aefff168
Fix load overvoltage control for 24V systems ( #96 )
2020-05-21 10:09:54 +02:00
Martin Jäger
882f281333
Fix undervoltage error flag reporting
...
Load shedding should only trigger capacity calculation, but not set the
undervoltage flag. That flag is only set for voltage below absolute min.
2020-05-11 14:09:27 +02:00
Martin Jäger
1bd8734a2e
Use K_MSEC macro in k_sleep calls
...
This is required by Zephyr 2.3, otherwise getting compile error.
2020-05-11 12:26:41 +02:00
Martin Jäger
9a5004e81d
Fix DC/DC start check for 24V batteries ( #95 )
2020-05-11 11:01:47 +02:00
Martin Jäger
e1c7f97f63
Add support for devices without load output
2020-05-11 10:32:24 +02:00
Martin Jäger
d292ad425a
Add PWM switch off inhibit
2020-05-06 12:53:26 +02:00
Martin Jäger
3d4da66955
Generate DeviceID from hwinfo
2020-05-06 12:53:26 +02:00
Martin Jäger
efc0bc8fdc
Update to ThingSet library v0.3
2020-05-06 12:53:26 +02:00
Martin Jäger
7da96abbe4
Fix Solar_V enable and use float for gain calc
2020-05-06 12:53:26 +02:00
Martin Jäger
5e94d72117
Use LL for PWM switch driver to support STM32G4
...
This adds support for PWM solar input of MPPT 2420 HPX. Also adds new
PwmSwitch::test() function.
2020-05-06 12:53:26 +02:00
Martin Jäger
4011370646
MPPT-2420-HPX: Use TIM8 for charge pump
...
This commit implements the PWM driver manually using STM LL, as the Zephyr
driver doesn't work for "advanced" timers like TIM8.
2020-05-06 12:53:26 +02:00
Martin Jäger
e76709f2af
Enable load short circuit comparator
...
The load driver had to be moved to a .c file to allow attaching interrupt
in Zephyr.
2020-05-06 12:53:26 +02:00
Martin Jäger
9f258b6e69
Replace short STM32XXX defines with CONFIG_SOC_...
2020-05-06 12:53:26 +02:00