Martin Jäger
6be4e20f04
Make load OC and LVD recovery delay configurable
2020-08-19 15:55:15 +02:00
Martin Jäger
ab63204adb
Make battery configurable via Kconfig ( fix #94 )
...
Also adds crazy IS_ENABLED macro to unit tests.
2020-08-19 15:55:15 +02:00
Martin Jäger
5b024dcd60
Increase stack space for ts.process in serial.cpp
...
Depending on the amount of data nodes, calling ?rec caused a stack overflow.
Larger stack memory solves the issue, for further improvement see also #103 .
2020-08-18 19:29:43 +02:00
Martin Jäger
b110918797
Select serial port for ThingSet via Kconfig
2020-08-18 19:29:23 +02:00
Martin Jäger
5e5f2c6680
mppt_1210_rc: Use USART1 as debug serial
2020-08-18 12:14:59 +02:00
Martin Jäger
c78c5431a4
Enable load short circuit comp for PWM 2420 LUS
2020-08-18 12:14:59 +02:00
azeemshatp
3aada5dbcc
Fix trailing whitespace check in Windows and Linux
...
Previous check in check.bat considered only uncommitted changes.
2020-08-18 12:14:01 +02:00
Martin Jäger
d2e833716a
Add Grid_A to ThingSet data nodes
2020-08-17 19:59:58 +02:00
Daniel Fanache
c8fa15a860
Remove executable bit for board definition files.
2020-08-17 19:59:58 +02:00
Daniel Fanache
e427b45352
Use DT macros instead of Kconfig for board pinmux
...
Stops using CONFIG_device_x style configuration items and checks the
devicetree to determine if the nodes are enabled.
Fixes UEXT serial port not working.
2020-08-17 19:59:58 +02:00
Martin Jäger
ee5846323f
Fix STM32G4 ADC settings to improve accuracy
...
- Wait for the reference voltage to stabilize (thanks to yasen)
- Increase internal regulator stabilization period prior to calibration
2020-08-17 19:59:58 +02:00
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
2a3e50f6ca
Add battery temp. sensor to MPPT 2420 RC
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
Martin Jäger
3c9a6e49f1
Fix not enabled UART_1 for some boards
2020-06-26 14:36:36 +02:00
Rhushabh
1dc5cdd7ef
Software watchdog for multiple threads
2020-06-23 15:59:31 +02:00
Martin Jäger
54bc5eaee8
Add MPPT 2420 RC board
2020-06-17 11:15:50 +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
9f02287a03
Add custom unit-test option
2020-06-08 14:27:07 +02:00
Martin Jäger
fb3251b88a
Add HS MOSFET fail-safe protection Kconfig
...
The function already existed since a while, but was accidentally not activated.
This is fixed by this commit.
2020-06-05 17:24:16 +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