Commit Graph

24909 Commits (02936376ae5c3652823d2d63afae3a93e45cbc4d)

Author SHA1 Message Date
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
Filip Jagodzinski 777a863ac8 Test: update HAL watchdog 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 68e536b368 Test: update HAL reset_reason 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
Anna Bridge b3d45c5eef
Merge pull request #10777 from fkjagodzinski/fix-watchdog-missing_commits
Bring back the missing watchdog commits
2019-06-18 15:05:28 +01:00
Filip Jagodzinski c5ad70c1e5 Tests: Watchdog: Update timing test
Skip test cases with unsupported timeout values.
2019-06-14 10:59:06 +02:00
Filip Jagodzinski d634862a09 Tests: Watchdog: Decrease default timeout to 100 ms 2019-06-14 10:59:06 +02:00
Filip Jagodzinski c29cdab079 Tests: Watchdog: Update test case teardown
Added a mechanism which will prevent an initialised watchdog from
resetting the device during final greentea communication.
This allows testing watchdog timeouts as short as 50 ms.
2019-06-14 10:59:06 +02:00
Martin Kojtal e3bcf0cebf
Merge pull request #10645 from fkjagodzinski/rajkan01-new_watchdog_api
Watchdog API update
2019-06-13 13:55:11 +01:00
Filip Jagodzinski 98708d1041 Tests: Update Watchdog Manager 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-11 10:52:47 +02:00
Filip Jagodzinski 19272b7a1c Tests: ResetReason: Use the HAL watchdog API
The Watchdog driver has been updated making this test incompatible
with the new API. Use HAL API instead.
2019-06-03 16:32:15 +02:00
Filip Jagodzinski 93b01c79bb Tests: Watchdog: Add Watchdog Manager tests 2019-06-03 16:32:15 +02:00
Filip Jagodzinski 2dd5216ceb Tests: Watchdog: Remove outdated driver tests
The Watchdog driver has been updated making these tests incompatible
with the new API. The Watchdog driver functionality is tested with the
unit tests located in UNITTESTS/drivers/Watchdog/ .
2019-06-03 16:32:14 +02:00
Rajkumar Kanagaraj dc9fbfa6fb Fix for Problem copying the instance from BSS to stack
-Created global instance of either LowPowerTicker or Ticker
2019-06-03 16:32:14 +02:00
Rajkumar Kanagaraj c41d80330e Fixed the unittest case failure 2019-06-03 16:32:14 +02:00
Rajkumar Kanagaraj 33793e710d Added the ticker support
-Modified the device dont have support of lp ticker will ticker for watchdog callback register
2019-06-03 16:32:14 +02:00
Rajkumar Kanagaraj dfe4b533c3 Update Watchdog
- Changed the process into static method
 - used the singletonptr for creating the low power ticker instance
 - Added the mbed stub into cmake build for cellularnonipsocket,loramacrypto
2019-06-03 15:31:20 +02:00
Rajkumar Kanagaraj f672974c25 Incorporated the Reivew Comments 2019-06-03 15:24:04 +02:00
Rajkumar Kanagaraj 696638afeb Incorporated the Reivew Comments 2019-06-03 15:24:03 +02:00
Rajkumar Kanagaraj cd26a74efb fix for astyle 2019-06-03 15:24:02 +02:00
Rajkumar Kanagaraj 3c0cd62476 fix for spell check and header file 2019-06-03 15:24:01 +02:00