File tree Expand file tree Collapse file tree 5 files changed +7
-241
lines changed
TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F
TARGET_STM/TARGET_STM32F4 Expand file tree Collapse file tree 5 files changed +7
-241
lines changed Original file line number Diff line number Diff line change @@ -75,18 +75,6 @@ class Watchdog {
7575 */
7676 void kick ();
7777
78- /* * Stops the watchdog timer
79- *
80- * Calling this function will attempt to disable any currently running
81- * watchdog timers if supported by the current platform.
82- *
83- * @return Returns WATCHDOG_STATUS_OK if the watchdog timer was successfully
84- * stopped, or if the timer was never started. Returns
85- * WATCHDOG_STATUS_NOT_SUPPORTED if the watchdog cannot be disabled
86- * on the current platform.
87- */
88- watchdog_status_t stop ();
89-
9078 /* * mbed_watchdog_manager(runs by periodic call from ticker) used this API interface
9179 * to go through all the registered user/threads of watchdog.
9280 *
Original file line number Diff line number Diff line change @@ -63,7 +63,6 @@ uint32_t mbed_wdog_manager_get_max_timeout()
6363bool mbed_wdog_manager_start ()
6464{
6565 watchdog_status_t sts;
66- bool msts = true ;
6766 MBED_ASSERT (HW_WATCHDOG_TIMEOUT < mbed_wdog_manager_get_max_timeout ());
6867 core_util_critical_section_enter ();
6968 if (is_watchdog_started) {
@@ -73,15 +72,15 @@ bool mbed_wdog_manager_start()
7372 watchdog_config_t config;
7473 config.timeout_ms = HW_WATCHDOG_TIMEOUT;
7574 sts = hal_watchdog_init (&config);
76- if (sts != WATCHDOG_STATUS_OK) {
77- msts = false ;
78- } else {
79- us_timestamp_t timeout = (MS_TO_US (((elapsed_ms <= 0 ) ? 1 : elapsed_ms)));
80- get_ticker ()->attach_us (callback (&mbed_wdog_manager_kick), timeout);
75+ if (sts == WATCHDOG_STATUS_OK) {
8176 is_watchdog_started = true ;
8277 }
8378 core_util_critical_section_exit ();
84- return msts;
79+ if (is_watchdog_started){
80+ us_timestamp_t timeout = (MS_TO_US (((elapsed_ms <= 0 ) ? 1 : elapsed_ms)));
81+ get_ticker ()->attach_us (callback (&mbed_wdog_manager_kick), timeout);
82+ }
83+ return is_watchdog_started;
8584}
8685
8786bool mbed_wdog_manager_stop ()
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3838 "default-form-factor" : {
3939 "help" : " Default form factor of this board taken from supported_form_factors. This must be a lowercase string such as 'arduino'" ,
4040 "value" : null
41+ },
4142 "hw-watchdog_timeout" : {
4243 "help" : " Define the timeout in ms value LowPowerTicker to do HW kick" ,
4344 "value" : " 800" ,
You can’t perform that action at this time.
0 commit comments