Martin Jäger
4e6f6c7365
Move thermal model parameters to DTS
2020-05-06 12:53:26 +02:00
Martin Jäger
38125f3da3
Remove redundant CONFIG_NUM_LED_PINS
2020-05-06 12:53:26 +02:00
Martin Jäger
ab504e3dfa
DC/DC and PWM switch configuration via DTS
...
As these settings are clearly hardware-specific, configuration was
moved from Kconfig (hidden symbols) to DTS. New bindings added.
2020-05-06 12:53:26 +02:00
Martin Jäger
9efa2f8f77
Use Zephyr EEPROM driver
2020-05-06 12:53:18 +02:00
Martin Jäger
2a71d02aeb
Move PCB and user config to board Kconfig
...
Files in src/pcbs/xyz.h are moved to boards/xyz/board.h. User settings from
src/config.h are also configured via Kconfig, so the file is removed.
2020-04-30 10:53:58 +02:00
Martin Jäger
2d74a3a554
Mbed support removed
...
Rationale: The support for both Zephyr and Mbed made the code confusing,
especially because of many ifdefs.
Zephyr RTOS is the future!
2020-04-04 08:21:43 +02:00
Martin Jäger
2c2e59c072
Synchronize ADC2 with PWM signal
...
For boards with STM32G431, the ADC2 is used for fast current measurement,
synchronized with the half bridge switching PWM.
With this change, the ADC2 is triggered in the center of high-side
MOSFET ON signal using a second PWM output of TIM1.
2020-04-02 12:32:43 +02:00
Martin Jäger
daf43fb967
USB charging output control via LoadOutput class
...
- Introduce new CONFIG_HAS_USB_PWR_OUTPUT
- Improve charger.discharge_control function
- Add battery empty flag
2020-03-02 11:55:38 +01:00
Martin Jäger
0e918e6b2e
Add pwm-out DTS binding and fix CONFIG_PWM
...
The binding .yaml was forgotten in previous charge pump commit. CONFIG_PWM was
moved from prj.conf to board_defconfig as not all boards need the PWM driver.
2020-02-28 13:24:25 +01:00
Martin Jäger
46630f88cb
Enable half bridge for STM32G4 MCU
2020-02-26 19:30:59 +01:00
Martin Jäger
8307314000
Fix MPPT 2420 HPX pinmux and dts for I2C support
2020-02-26 18:22:16 +01:00
Martin Jäger
2154a1cb72
Add charge-pump driver for HS load switch
2020-02-21 18:27:42 +01:00
Martin Jäger
8539fa3557
MPPT 2420 HPX: Add reset after flashing
2020-02-19 14:44:51 +01:00
azeemshatp
b717dea6d1
Implement ADC 1 & 2 using low level APIs
...
ADC2 works for STM32G431RB processor using LL drivers.
Keep the changes in the MPPT 'boards' folder for possible future use with
zephyr drivers.
2020-02-19 14:33:49 +01:00
Martin Jaeger
08974169ab
Use new Zephyr 2.2 GPIO driver API features
...
Enable and disable pins are now handled the same using _set function
instead of _write and using ACTIVE_HIGH/LOW setting in dts.
2020-02-13 18:35:42 +01:00
Martin Jaeger
c4d4372953
Fix board files for Zephyr 2.2 compatibility
...
Warning: These changes break compatibility with previous v2.1.
2020-02-13 17:30:19 +01:00
Martin Jaeger
7940acccf4
Zephyr: STM bootloader activation added
2020-02-07 17:36:19 +01:00
Martin Jaeger
83d7c36778
Zephyr: MPPT 1210 HUS 0v7 board added
2020-02-05 18:05:55 +01:00
Martin Jaeger
1b6a7f82d7
Zephyr: CAN support added
...
So far, only publishing messages are supported (no RX yet).
Logging is switched on again, but with minimal output only (suitable
for small F0 MCUs). CAN is activated by default for MPPT 2420 LC.
2020-01-30 16:54:58 +01:00
Martin Jaeger
e078b87553
Zephyr: MPPT 2420 LC board added
2020-01-29 11:03:09 +01:00
Martin Jaeger
c04081fc8a
Make Serial and OLED configurable via Kconfig
2020-01-28 12:13:54 +01:00
Martin Jaeger
24f751b2e5
Initial support of MPPT 2420 HPX board
...
- Some flags changed to make the firmware compile for new STM32G431 MCU
- Zephyr board definition added
- Serial, OLED display and LED working
- ADC compiling, but not yet working
2020-01-23 14:41:44 +01:00
Martin Jaeger
d5ea6b5653
Zephyr: Custom DTS binding for GPIO switch
...
Previously, the LED binding was abused. DTS is now much cleaner.
2020-01-18 15:56:57 +01:00
Martin Jaeger
632eb5a4f7
Zephyr: ADC HAL replaced with LL
2020-01-16 16:21:21 +01:00
Martin Jaeger
27bb53bbeb
Zephyr: ADC based on STM HAL working
2020-01-16 12:24:25 +01:00
Martin Jaeger
cb988639ce
Zephyr: Added PWM 2420 LUS board
2020-01-09 13:56:02 +01:00
Martin Jaeger
04f0d42970
Zephyr board names unified with mbed code
2020-01-07 09:38:10 +01:00
Martin Jaeger
16ca793bb3
Port configuration based on Kconfig implemented
2020-01-06 19:16:44 +01:00
Martin Jaeger
7bd9bdeafd
Kconfig: User-configuration added
2020-01-06 19:05:09 +01:00
Martin Jaeger
d654324860
Charger-specific features added to Zephyr board spec
...
Hardware features like PWM switch, DC/DC converter and LED config
are now configured in the board definition. Actual source files still
need to be changed to use defines with CONFIG_ prefix instead of
defines from pcb.h.
2019-12-31 13:19:26 +01:00
Martin Jaeger
53ae6d4608
File headers shortened using SPDX-License-Identifier
2019-12-20 11:40:10 +01:00
Martin Jaeger
dc270372af
OLED display integrated with Zephyr
...
- Some fixes in DTS and pinmux settings
- Supporting different I2C address definitions of mbed and zephyr
- Thread for ext_mgr added
2019-12-20 10:51:00 +01:00
Martin Jaeger
7633dc1d93
Zephyr: Clock setup fixed and LEDs implemented
2019-12-20 10:41:53 +01:00
Martin Jaeger
88148e70cb
Initial compiling Zephyr integration
2019-12-20 10:37:50 +01:00