Martin Jäger
483e09d1a2
Use generic Copyright notice in all files
2021-03-12 18:40:22 +01:00
Martin Jäger
830315cda0
Use new ThingSet macros for CAN and ISO-TP fixed addressing
2021-02-04 17:28:52 +01:00
Martin Jäger
24742fefcb
Fix CAN ISO-TP binding and CAN IDs
...
For the recv_ctx, the rx and tx addresses were swapped. In addition to that,
the binding has to be released before sending.
2021-02-04 17:28:52 +01:00
Martin Jäger
fec60aacbb
Enable CAN for MCUs with CAN-FD controller
2021-02-04 17:28:52 +01:00
Martin Jäger
a352d6b98c
Replace software watchdog with Zephyr task_wdt subsystem
2021-02-04 17:28:52 +01:00
Martin Jäger
e63a2db9e5
Update west.yml and platformi.ini to track Zephyr v2.5
...
The v2.5-branch is based on upstream master until Zephyr v2.5 is released.
hal_stm32 needs to be overwritten with forked version to support new pinctrl
introduced in Zephyr 2.5.
Also fixing some CAN issues because of API changes to make it compile.
2021-01-14 19:11:59 +01:00
Daniel Fanache
9ba540ec8c
Configurable log levels for all the modules using Zephyr's logging.
...
This allows us to enable e.g debug output for the CAN module with
CONFIG_CAN_LOG_LEVEL=4 without enabling the global
CONFIG_LOG_DEFAULT_LEVEL=4 and being swamped with debug output from
all of Zephyr's subsytems.
2020-12-13 11:06:02 +01:00
Martin Jäger
3d9c4589cd
Upgrade to Zephyr 2.4
...
- Make all struct device * constant
- Add additional argument to PWM nodes in devicetree
- Track customized LibreSolar/zephyr branch in platformio
- Update OLED submodule
2020-11-09 20:07:49 +01: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
bbd1312fe5
Relocate and clean up application Kconfig structure
2020-07-24 08:49:47 +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
ed374e8e99
Remove CAN msg queue and update ThingSet lib
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
7af7d1c4ee
Add CAN ISO-TP support
2020-07-23 12:55:37 +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
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
Martin Jäger
efc0bc8fdc
Update to ThingSet library v0.3
2020-05-06 12:53:26 +02:00
Martin Jäger
ce7f63b888
Introduce generic "outputs" DTS binding
...
Replaces previous "switch" and "pwm-out" bindings and allows to reference
either gpio or pwm handle and specify maximum current.
Also replacing CONFIG_HAS_LOAD and CONFIG_HAS_USB_PWR with DT_ variants.
2020-05-06 12:53:26 +02:00
Martin Jäger
c25640b987
Fix blocking if CAN not connected to bus
2020-05-06 12:53:26 +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 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
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
eed8c9114c
Coding style updated/fixed
...
Indentations of class definitions and preprocessor statements were not
uniform throughout the code. This commit cleans up indentations as well
as the order of include statements.
Style conventions see: https://github.com/LibreSolar/coding-style
2020-01-28 13:20:01 +01:00
Martin Jaeger
53ae6d4608
File headers shortened using SPDX-License-Identifier
2019-12-20 11:40:10 +01:00
Martin Jaeger
3f89943edf
ThingSet interfaces merged with Ext interfaces
2019-12-20 10:43:51 +01:00