CAN requires the use of the external oscillator instead of LSI.
The RNG did not start with the default settings. See also Zephyr
upstream commit 768fe29f904463a34138acc1b62e73b04492d2c6.
Also use new Zephyr CI environment and compile all boards.
Board migration script example:
python ../zephyr/scripts/utils/board_v1_to_v2.py --board-root . \
-v libresolar -g libresolar -b pwm_2420_lus -s stm32l072xx
If the device received a command before the previous one was processed,
it could get stalled inside the ISR, as the rx fifo was never read and
the interrupts kept firing, while processing (in lower priority thread)
cannot happen.
The structure has been changed to match the new ThingSet v0.5 spec which
is more suitable to be used in mobile phone apps because the data is
structured based on logical subsystems (Battery, Load) and not on data type
(conf, input, etc.) anymore.
This required some updates in the ThingSet library aswell. Especially the
update mechanism for configuration data had to be changed.
The data_objects_parser script is now able to extract the units itself,
reducing the commenting effort.
All IDs have been kept the same, so previously stored settings in charge
controllers NVM should be compatible.
The format tries to maintain the previously used Libre Solar firmware coding
style as much as possible.
Applying the format fixed some issues and re-ordered some parts of the code.
https://docs.zephyrproject.org/latest/guides/west/workspaces.html
Previously, west manifest and CMake entry point were in zephyr subfolder
as required for PlatformIO. As PlatformIO support was dropped, we can
follow the default Zephyr folder structure more closely.
The application is built and flashed from app subfolder, where as unit
tests are run from tests subfolder.
Rationale: Too much effort to maintain two different tool chains.
PlatformIO does not consider the west.yml files and thus, does not
support custom Zephyr modules. However, they are needed to include
ThingSet as a module.
In addition to that, PlatformIO versions always lag behind official
Zephyr releases and we want to avoid being dependent on PlatformIO.
- Float charging is the more correct and more commonly used term compared
to trickle charging
- Putting voltage at the end of some variable names for more consistency
This allows the serial thread to sleep and avoids polling for incoming
commands every 10 ms as it was done before.
Two semaphores are used, one to lock the receive buffer and the other
one to signal a received command.
Also improving some variable and function naming.
Removing PlatformIO dependency as Zephyr v2.6 is not properly and PlatformIO
updates always take quite a long time after official Zephyr releases.
Unit tests and static code check still have to be ported to Zephyr.