Martin Kojtal
33f8b35917
watchdog unittest: fix naming after refactor
2019-07-02 12:46:23 +01:00
Martin Kojtal
8231efc41c
unittest: remove platform watchdog (moved to drivers)
2019-07-02 12:46:23 +01:00
Martin Kojtal
4549a22566
unittest: move watchdog files to drivers
...
Test VirtualWatchdog and Watchdog
2019-07-02 12:46:23 +01:00
Martin Kojtal
8bbba26842
unittest: rename watchdog to VirtualWatchdog
2019-07-02 12:46:23 +01:00
Martin Kojtal
2d77fccb09
Watchdog: update unittests
2019-07-02 12:46:23 +01:00
Martin Kojtal
bb473d916e
Watchdog: keep it simple - providing simple driver functionality
...
No callbacks or tickers. User is handling kick() method directly based on timeout set.
VirtualWatchdog manages ticker and callback.
2019-07-02 12:46:23 +01:00
Martin Kojtal
28398e6254
Watchdog: fix include paths - use module name
2019-07-02 12:46:23 +01:00
Martin Kojtal
a63a54680c
VirtualWatchdog: fix default timeout value (1ms is unreal)
2019-07-02 12:46:23 +01:00
Martin Kojtal
88a9548167
VirtualWatchdog: fix name for member timeout
2019-07-02 12:46:23 +01:00
Martin Kojtal
a18ba70c1b
VirtualWatchdog: fix is hw init definition
2019-07-02 12:46:23 +01:00
Martin Kojtal
61f859b514
VirtualWatchdog: add config option to ctor to clarify the hw timeout
2019-07-02 12:46:23 +01:00
Martin Kojtal
9f48f26876
Watchdog: fix timeout - use full range for watchdog
2019-07-02 12:46:23 +01:00
Martin Kojtal
b822c09b3b
Watchdog: fix callback - uses ms
2019-07-02 12:46:23 +01:00
Martin Kojtal
0519caebe1
VirtualWatchdog: fix doxygen docs errors
2019-07-02 12:46:23 +01:00
Martin Kojtal
581bf208ad
Watchdog: refactor timeout handling
...
Enable kicking directly by kick() and handle timeout by using private handler.
2019-07-02 12:46:23 +01:00
Martin Kojtal
0aa095b944
Watchdog: add missing docs doxygen
2019-07-02 12:46:23 +01:00
Martin Kojtal
f7ccd06685
Watchdog: remove dead reference file
2019-07-02 12:46:23 +01:00
Martin Kojtal
400a7e4b77
error: add watchdog driver error
2019-07-02 12:46:23 +01:00
Martin Kojtal
1c0f1880eb
VirtualWatchdog: fix error code and timeout
2019-07-02 12:46:23 +01:00
Martin Kojtal
02936376ae
Watchdog: fix const static
...
Fixing error "non-static data member initializers only available with -std=c++11 or -std=gnu++11"
2019-07-02 12:46:23 +01:00
Filip Jagodzinski
455015daf5
Watchdog & VirtualWatchdog process() update
...
Add uint32 argument - pass how much time already passed to the callback.
2019-07-02 12:46:23 +01:00
Martin Kojtal
701d8f7cef
VirtualWatchdog: make sure we are the only owner of watchdog
...
If virtual one is not the only owner we error - init error code in driver.
2019-07-02 12:46:23 +01:00
Martin Kojtal
a3599414e1
Watchdog: clean-up start
2019-07-02 12:46:23 +01:00
Martin Kojtal
b166acd1cb
watchdog: fix astyle errors
2019-07-02 12:46:23 +01:00
Martin Kojtal
f98c2fdbba
watchdog: remove manager
...
Watchdog can handle callbacks - VirtualManager can attach to the tick. This should simplify the logic.
Watchdog can tick on its own using tickers.
VirtualWatchdog uses attach to get a callback when Watchdog ticks - to process own
linked list of virtual watchdogs.
2019-07-02 12:46:23 +01:00
Martin Kojtal
698b0eda8a
watchdog: add WatchdogManager
...
Watchdog should be usable on it's own - kicking it via ticker. No Virtual involved.
VirtualWatchdog as well - services should use this one to have multiple one in the system.
There's WatchdogManager - basically internal class to manage ticker for Watchdog.
2019-07-02 12:46:23 +01:00
Martin Kojtal
a668454de4
Watchdog: fix dtor
2019-07-02 12:46:23 +01:00
Martin Kojtal
bb1cc32a25
Watchdog: kick method should not have any external dep
2019-07-02 12:46:23 +01:00
Martin Kojtal
91679d40d5
Watchdog: cleanup after singleton usage
2019-07-02 12:46:23 +01:00
Martin Kojtal
d9e12e4168
VirtualWatchdog: fix protection macro
2019-07-02 12:46:23 +01:00
Martin Kojtal
7da2c6dbb6
Watchdog: use get_instance to access watchdog hw
2019-07-02 12:46:23 +01:00
Martin Kojtal
962a3d3c4c
mbed: add Watchdog and VirtualWatchdog
2019-07-02 12:46:23 +01:00
Martin Kojtal
737335c357
Remove watchdog manager
...
Use VirtualWatchdog instead
2019-07-02 12:46:23 +01:00
Martin Kojtal
edd857ea9c
VirtualWatchdog: software watchdog
...
Refactor old Watchdog (it was not a driver) to become VirtualWatchdog.
This is software virtual watchdog. This it the primary used watchdog in user application.
VirtualWatchdog: has-a watchdog. Initializes hw watchdog - start it when first used, stops it when there is no more VirtualWatchdog in the system -
list is empty.
Adding also check to watchdog to make sure there is only one in the system - runtime error if multiple objects created to already
running hw watchdog.
2019-07-02 12:46:23 +01:00
Martin Kojtal
7b0915c7d4
Watchdog: refactor driver
...
Watchdog is hardware driver. It interacts with HAL - provides wrapper to interact with the peripheral.
Provides basic functionality: start/stop, get timeout/max timeout.
It is automatically kicked by a timer, according to the timeout set in ctor.
2019-07-02 12:46:23 +01:00
Amanda Butler
c497010a56
Edit ResetReason.h
...
Edit file for active voice, complete sentences and grammar.
2019-06-27 09:45:32 +01:00
Amanda Butler
f8a6674afd
Edit Watchdog.h
...
Edit file, mostly for active voice, consistent abbreviations, grammar and spelling.
2019-06-27 09:28:05 +01:00
Amanda Butler
9d5757eb52
Edit watchdog_api.h
...
Edit file, mostly for active voice, consistent tense and international spelling.
2019-06-27 09:26:42 +01:00
Amanda Butler
bd5de8d769
Edit reset_reason_api.h
...
Edit file, mostly for correct grammar.
2019-06-27 09:23:45 +01:00
Martin Kojtal
fa76620afd
watchdog hal: remove space
2019-06-26 14:03:11 +01:00
Martin Kojtal
9cf7a9a327
watchdog: fix astyle issue
...
Missing a space after group and before license
2019-06-26 11:32:18 +01:00
Filip Jagodzinski
9935bdcb72
HAL: Watchdog: Update the header file
...
Minor doxygen fixes.
2019-06-26 09:58:31 +01:00
Filip Jagodzinski
e2ba0bb533
ResetReason: Update the header file
...
Minor doxygen fixes.
2019-06-26 09:58:24 +01:00
Filip Jagodzinski
f084bd5a9d
HAL: ResetReason: Update the header file
...
Add defined & undefined behavior.
Minor doxygen fixes.
2019-06-26 09:58:18 +01:00
Martin Kojtal
e40a76575f
watchdog: fix copyright
2019-06-26 09:43:21 +01:00
Filip Jagodzinski
a33536e78e
HAL: Watchdog: Update the header file
...
Add a SPDX license identifier.
Add defined & undefined behavior.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski
4e35e368b2
Test: watchdog_mgr: Remove dead code
2019-06-26 09:09:59 +01:00
Filip Jagodzinski
94181a9930
Test: update reset_reason driver test
...
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Use a SERIAL_FLUSH_TIME_MS value consistent with other tests.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski
ee202dafd8
Test: update HAL watchdog-timing test
...
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski
81898af2b5
Test: update HAL watchdog-reset test
...
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Remove explicit calls to sleep.
2019-06-26 09:09:59 +01:00