Commit Graph

58 Commits

Author SHA1 Message Date
Lefucjusz
181feb4f40 cleanup 2024-08-20 15:40:34 +02:00
Lefucjusz
32c6769cb6 [BH-1657][BH-1833][BH-1854] Add WFI and SDRAM self-refresh mode
* Added mechanism enabling CPU to
enter WFI mode when the OS is
in idle, what results in large
power consumption reduction.
* Added mechanism to switch SDRAM to
self-refresh mode before entering
WFI, what resulted in further power
consumption reduction.
2024-01-22 12:32:35 +01:00
Mateusz Szczesny
6e76dc3e5f [BH-1787] Reboot to MSC endpoint
To allow the automation of gathering logs and swapping out OS images during tests a MSC reboot
endpoint was added. Together with a change to ecoboot, this allows the sending of a "reboot to
MSC" command. The deivce will then reboot and enter MSC mode.
2023-12-04 12:41:37 +01:00
Lukasz Mastalerz
d9a1194e6f [BH-1688] Create a standard for logs
* Adding document describing how to use logger
* Adjusting logs to follow a new guide
* Change order in log header:
  line number is now before function name
2023-10-23 15:17:44 +02:00
Maciej Gibowicz
635ad1ac05 [BH-1774] Fix frequency lock during user activity
- Sentinel locks the frequency when pressing buttons and the encoder.
- The "user activity" sentinel will be properly managed by the system
(CpuGovernor) just like other sentinels.
- Adding information about active sentinels in the power management
statistics logs
2023-09-26 11:04:50 +02:00
Lefucjusz
3cbbeff551 [MOS-1011] Fix frequency switching stability
Multiple fixes of clock switching related
stability issues:
* added RC oscillator hysteresis as in NXP example;
* changed DCDC converter config;
* configure PLL2 to be able to run on any CPU
frequency level;
* added switching to 1.275V (overdrive) voltage
when applying any clock change above 12MHz as
well as LDO or bandgap switching, as done in
Mbed OS' lpm.c for RT1050;
* changed BMCR AXI queues weighs for SDRAM
in JLink scripts to disable operations
reordering, as it is known to cause data
integrity issues;
* extracted some code to separate files;
* smaller or bigger code cleanups.
2023-09-07 17:19:15 +02:00
Lukasz Mastalerz
9752788304 [BH-1412] Whitelist update
Whitelist removed for Harmony
Changed the way whitelist is obtained
Added missing logs for Eink Dispaly
2023-08-08 10:43:58 +02:00
Lukasz Mastalerz
462a7393d9 [BH-1412] Fix system shutdown procedure
Changed startup services order.
Prevent handling multiple "close ready" messages from one service while closing
system.
Introduced a new state in ServiceGUI.
Fixed a problem with turning on Harmony with a connected USB cable.
2023-08-08 09:35:54 +02:00
Lukasz Mastalerz
f7ad63c951 [BH-1412] Fix services dependencies
Changes in dependecy managment
Replacing state flags with states in ServiceGUI
Unifying some parts of code
2023-08-01 17:22:48 +02:00
Adam Wulkiewicz
0e7ae160e6 [BH-1639] Add welcome message with charging info
Add new bell welcome window
Add new close reasons
Add new actions
Bump assets version
Remove bold text from welcome message
Remove bold text from onboarding popups
2023-03-06 14:11:04 +01:00
Lefucjusz
9ece62c171 [MOS-903] Remove reboot to USB MSC mode
Remove mechanics enabling to perform reboot
to MSC mode by sending request to one of the
endpoints via serial port, as it is not
implemented in bootloader and may potentially
be unsafe.
2023-02-14 10:59:43 +01:00
Bartosz
8d1da66936 [MOS-237] Removed unnecessary workaround for system reboot
Removed workaround for rebooting into recovery (update)
2023-02-09 14:37:38 +01:00
Lefucjusz
82e0c6df09 [MOS-851] Remove factory reset screen from backup and restore
Fix of the issue that factory reset screen
informing user of need to manually turn
on the phone to continue the process
was appearing also when restarting to
backup or restore.
2023-01-19 16:41:56 +01:00
Bartosz
fef2ad61a8 [MOS-786] A/B Booting - fixed factory reset from menu
Now factory reset works both from ecoboot and from menu
2023-01-19 16:41:56 +01:00
Bartosz
01857dd1bd [MOS-786] Added support for A/B boot codes in OS
Further implementation of A/B booting
2023-01-19 16:41:56 +01:00
Pawel Olejniczak
0867d17242 [CP-1424] Refactor backup and restore endpoints
Redesign of backup and restore endpoints in the
service-desktop to delegate responsibility for
execution of the actual backup and restore process
onto the Updater.
2023-01-19 16:41:56 +01:00
Maciej-Mudita
4bd7b1acf4 [MOS-275] Fix alarm rings on the low battery screen
When we had a critical battery level and the alarm clock rang,
it was impossible to turn it off.
2023-01-19 12:07:19 +01:00
Maciej-Mudita
f4aaf4e302 [MOS-775] Create run-time statistics for tasks
Every hour, statistics of tasks that put a heavy load
on the CPU will be logged
2022-10-25 18:46:54 +02:00
Dawid Wojtas
e77b5d6702 [MOS-424] Improvement of logger module
Due to losing bytes the logger has a worker
which is responsible for dumping logs to
the file. The logger also has its own timer
to dump logs every 15 minutes. EventManager
is not responsible for interval dumping logs
now.
2022-09-15 11:58:09 +02:00
Dawid Wojtas
b7330da36c [MOS-662][MOS-301] Fix E-ink shutdown while restoring data
While restoring system data the timer can turn off power of E-ink
to save the power. To avoid this situation we need to power on
the E-ink before wiping out the display. The restore procedure
also performs reversing services list to close. In this case
we do it twice so the order is wrong.
2022-08-30 11:00:04 +02:00
Adam Wulkiewicz
fe708cdf31 [MOS-670] Change clang-format AlwaysBreakTemplateDeclarations to Yes
Add --all and --fix-all options to style-check-hook
2022-08-26 15:22:39 +02:00
Maciej Gibowicz
fc05d5e618 [MOS-389] Fix phone stuck on shutdown screen
The phone sometimes remained on the power off screen
during system shutdown.
2022-05-05 14:16:03 +02:00
Mateusz Piesta
97e9d7b79f [BH-1449] Fix gui/eink dependencies
* Dependencies between service-gui and service-eink
have been correctly defined.
* System close routine was replaced with the sequential one
which should solve many bell issues.
* It also fixes BH-1406 and BH-1442.
* Fixed some weird CMake issues in module-audio and
several other modules.
* Fixed service-gui closing routine
* Removed unneeded messages/states from service-gui/eink.
* Enhanced app-mgr closing routine. Fixed closing action handling.
2022-04-26 13:47:12 +02:00
Maciej Gibowicz
619685d70a [MOS-339] Fix rapid change of CPU frequency
After disconnecting the USB cable, the CPU consumption
increased to over 80% (for 4 MHz), which resulted
in a cyclical change in the CPU frequency and finally
a much shorter battery life.
2022-04-11 08:54:54 +02:00
Adam Dobrowolski
cc02ffffbb [MOS-258] System profile util works with separate rtt
Profiling Move RTT handling to interfacing library
Library for msgpack sink
magic enum updated
performance monitor fixups
2022-04-07 11:32:49 +02:00
Marek Niepieklo
aacd665eb9 [CP-1119] Fix Restore failure
Restored Eink service to Restore whitelist
2022-03-15 10:27:49 +01:00
Mateusz Piesta
6ad290366f [MOS-296] Merge SNVS cherry-pick conflicts fixed
Fix SNVS Harmony approach conflicts with master
2022-03-09 19:34:39 +01:00
Maciej Janicki
5dc42c2be6 [MOS-296] Merge new master commits into merge-stable-wip
Merge new master commits
2022-03-09 19:32:59 +01:00
Maciej Janicki
2b2bb13a49 [MOS-296] Merge remote-tracking branch 'origin/stable'
Merge stable Harmony branch into merge wip branch
2022-03-09 19:27:50 +01:00
Adam Dobrowolski
b0c41d4ed4 [MOS-225] Restore SystemManager service idle priority
It crashes othervise on use of deleted elements
2022-03-04 07:05:02 +01:00
Adam Dobrowolski
1fff92e9d6 [MOS-225] Review applied
As above.
2022-03-04 07:05:02 +01:00
Adam Dobrowolski
d4d1344f0c [MOS-225] Fixed no response from SystemManager service
SystemManager service had implementation of bus processing
which never sent responses. This rendered any blocking call
to SystemManager useless
2022-03-04 07:05:02 +01:00
Adam Dobrowolski
dd12853503 [MOS-226] Moved algorithms and their data to separate classes
This way we have controll over what does what, and can test
them separatelly
Logging statistics update more and better data presented
2022-03-04 07:05:02 +01:00
Maciej Gibowicz
2a11e4d6e3 [MOS-135] Proper system shutdown during restore
After the restore process is complete, the system shuts down
properly without any unexpected events.
2022-03-01 18:45:09 +01:00
Alek Rudnik
e0da78c9be [EGD-8193] Proper system shutdown durign update
Made sure all system is deinitialized during update.
Currently there are two exceptions: service eink and service
desktop. There are some issues with them but it should be fixed
in the near future
2022-02-22 09:42:12 +01:00
Adam Dobrowolski
30487c6008 [MOS-110] Statistics api for system
Gets data from freertos and prints on frequency change depending
if it's important. Gathering is not costly, printing is though.
For less intrusive checks I would rather disable names gathering
as in worst case scenario it hangs rtos context switching till
thread id is found.
2022-02-17 16:46:56 +01:00
Tomasz Rybarski
5f861a4c3f [BH-1372] Fix BellHarmony turn off
Fix BellHarmony turn off in Charging state
2022-02-02 12:00:19 +01:00
Pawel Olejniczak
6566ad7ae3 [CP-1007] Add API for rebooting to USB MSC mode
It will allow to reboot the device to USB MSC mode
without need to interact with a physical keyboard.
2022-02-01 15:26:20 +01:00
Lucjan Bryndza
c250230401 [EGD-8193] Revert proper system shutdown durign update
This reverts commit cc15dfdc3e.

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2022-01-28 13:54:35 +01:00
Alek Rudnik
6aa54d4ad5 [EGD-8193] Proper system shutdown durign update
Made sure all services are deinitialized properly
2022-01-27 13:58:28 +01:00
Maciej Gibowicz
0bc5db64a6 [EGD-8138] Software closing procedure improved
Release of resources and closing of all unfinished
services and workers.
2022-01-20 17:07:37 +01:00
Kuba
0bc4e6502b [EGD-8156] Fix cellular on system close whitelists
Service cellular is added to system close whitelists.
It prevents hard fault when cellular is blocked
on long command handler.
2022-01-17 12:52:34 +01:00
Alek Rudnik
9cf11913a1 [EGD-8129] Add atexit functionality
Added atexit functionality. All global destructors and functions
registered with atexit() should be called at program exit.
It was possbile to reuse original newlib implementation with
MALLOC_PROVIDED flag set.

Made sure logger destructructor is called as last one.

Due to mudita OS legacy, it was not possible to simply fix dependencies
in global objectes and hence there are neither global objects
destructors nor functions registered with atexit() called when exit()
is called.
Possibly it will be changed later.
2022-01-05 13:59:51 +01:00
Lucjan Bryndza
e9ee2af0dc [EGD-8131] Add Reboot/Poweroff for _platform_exit()
Add support for Reboot and Power off for the
_platform_exit code.

Add _platform_exit mode handle

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
2021-12-22 15:55:24 +01:00
Maciej Gibowicz
7f9bc6bf6f [EGD-7922] Added Permanent Frequency Setting
Added Permanent Frequency setting in Advanced Developer
Mode with simple set window.
2021-12-06 13:57:38 +01:00
Alek Rudnik
65d67e2690 [EGD-7948] Extend log dumping
Log are now dumped:
* on system shutdown including hard faults and aborts
* every 5 minutes

Fixed some logs
2021-11-16 17:56:28 +01:00
Alek Rudnik
1666429e07 [EGD-7584] Fix OS factory reset
There was an issue that we were deleting files which were still open.
Added removed of FI .indexed file.
2021-11-02 16:45:04 +01:00
Kuba
1ab84f774f [EGD-7720] Unmounting file system on system closure
Make sure file system is properly unmounted on gentle system
shut down.
2021-10-20 14:38:08 +02:00
Wojtek Rzepecki
6e69eb6aa6 [BH-990] Adjist CPU frequency chages
Adjusted Bell frequency low-power mode changes
2021-10-15 13:22:43 +02:00
Marcin Smoczyński
57874cab33 [BH-912] Improve sys module structure
Improve structure of the module sys. Problems within this module
prevents from linking others.

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
2021-09-24 10:01:19 +02:00