Commit Graph

15 Commits (c97f95817c462e96ffe7f1401ee95f2a1f5defcd)

Author SHA1 Message Date
Martin Kojtal c97f95817c 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-11 11:55:21 +01:00
Martin Kojtal 1c5097af49 Watchdog: fix dtor 2019-07-11 11:55:21 +01:00
Martin Kojtal df03c527e9 Watchdog: kick method should not have any external dep 2019-07-11 11:55:21 +01:00
Martin Kojtal f0c050dace Watchdog: cleanup after singleton usage 2019-07-11 11:55:20 +01:00
Martin Kojtal 6ab79c93d4 Watchdog: use get_instance to access watchdog hw 2019-07-11 11:55:20 +01:00
Martin Kojtal cd8ac1e132 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-11 11:55:20 +01:00
Martin Kojtal 2a26e1af4b watchdog: fix copyright 2019-07-11 11:55:18 +01:00
Rajkumar Kanagaraj 16b340ea60 SW watchdog unittest cases
-Added the mock class function to mock mbed_assert_internal
  -Added the unit test case to test start,kick,stop
  -Modified the interface api name from is_alive to process
  -added the unit test cases for process
2019-07-11 11:55:14 +01:00
Rajkumar Kanagaraj 02b319f3c7 Add SW Watchdog
-SW watchdog has interface name start(),stop(),kick()	Sw watchdog internally has static list and shared across multiple instance of SW watchdog
	- Sw watchdog initialize timeout value,unique string via constructor whenever threads created sw watchdog object
	-Threads make sure pass proper timeout value,Unique string while creating the instance.
	-start() called by components(BLE,WIFI etc.,),it adds the entry into static list with few details current count ,etc.,
	-kick() called by registered components(BLE,WIFI etc.) to reset current count to zero.
        -is_alive - interface API to mbed_watchdog_manager
        -implementation optimization
2019-07-11 11:55:13 +01:00
Rajkumar Kanagaraj bb9ccb8f47 Watchdog refactoring to multithreaded thread.
-Added API to register muliple threads to watchdog drivers
-Watchdog timeout reconfigures everytime whenever new register thread with longer timeout period
-New APIs for watchdog
 wd_register(const osThreadId_t tid, const uint32_t timeout) to register to watchdog
 wd_unregister(const osThreadId_t tid) to unregister to watchdog
 kick(const osThreadId_t tid) to refresh the watchdog
2019-07-11 11:55:13 +01:00
Donatien Garnier fd7e46b799 Apply new astyle config style 2019-07-11 11:55:09 +01:00
Donatien Garnier 7c05a83afa Update license headers 2019-07-11 11:55:09 +01:00
Steven Cartmell a56da4f3fd Move watchdog parameter validation into the driver layer 2019-07-11 11:55:04 +01:00
Steven Cartmell 0128edd996 Remove window and sleep mode options for watchdog API 2019-07-11 11:55:04 +01:00
Steven Cartmell 0a140b97d8 Add Watchdog driver API 2019-07-11 11:55:03 +01:00