Commit Graph

25291 Commits (51835f005bc760398373d4cd71535e30d6d6ed00)

Author SHA1 Message Date
Filip Jagodzinski 51835f005b 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-07-11 11:55:16 +01:00
Filip Jagodzinski 30319b8464 Tests: Watchdog: Add Watchdog Manager tests 2019-07-11 11:55:16 +01:00
Filip Jagodzinski 5bf6842efc 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-07-11 11:55:16 +01:00
Rajkumar Kanagaraj de3b843bfb Fix for Problem copying the instance from BSS to stack
-Created global instance of either LowPowerTicker or Ticker
2019-07-11 11:55:15 +01:00
Rajkumar Kanagaraj 11b09a489a Fixed the unittest case failure 2019-07-11 11:55:15 +01:00
Rajkumar Kanagaraj 75cc3c84cc Added the ticker support
-Modified the device dont have support of lp ticker will ticker for watchdog callback register
2019-07-11 11:55:15 +01:00
Rajkumar Kanagaraj 5150b37aea 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-07-11 11:55:15 +01:00
Rajkumar Kanagaraj 0a5ca29273 Incorporated the Reivew Comments 2019-07-11 11:55:15 +01:00
Rajkumar Kanagaraj 7cdbc3dccf Incorporated the Reivew Comments 2019-07-11 11:55:15 +01:00
Rajkumar Kanagaraj 2959775ff0 fix for astyle 2019-07-11 11:55:14 +01:00
Rajkumar Kanagaraj 19e22a0e3c fix for spell check and header file 2019-07-11 11:55:14 +01:00
Rajkumar Kanagaraj a644886d5d Fix for the Ci build issue 2019-07-11 11:55:14 +01:00
Rajkumar Kanagaraj 17be727821 fix: Fixing rebased created bugs 2019-07-11 11:55:14 +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 563e3a328a Hw Watchdog UnitTest cases
-Added the unit test case for testing Hw watchdog
    -Added the supported stubs files
2019-07-11 11:55:14 +01:00
Rajkumar Kanagaraj 89e2124d4a HW Watchdog and SW watchdog interface
- Added Hw watchdog periodic kick calls software watchdog is_alive check
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 1ab851bacf Add HwWatchdog
- mbed_watchdog_mgr has interface name mbed_wdog_manager_start(),mbed_wdog_manager_stop(),mbed_wdog_manager_kick()
    - HwWatchdog is going to attach with LowPowerTIcker for periodic callback functionality
    - mbed_wdog_manager_start() will either get start either by BL/RTOS Aps,it reads the timeout value specified via macro and macro gets defined in target.json file.
    - mbed_wdog_manager_start() internally configure below HAL hw watchdog with timeout specified via target.json
    - mbed_wdog_manager_start() internally divide the timeout(specified in target.json) by the 2 and attach LowPowerTicker with periodic callback of hw_kick()
    - mbed_wdog_manager_start() internally create one instance of sw watchdog class,to access the static list data structure of sw watchdog class
    - mbed_wdog_manager_kick() function periodically get called and refresh the hw watchdog to avoid watchdog reset
    - converted C++ code into C based APIs
    - added boolean to control watchdog start and stop
    - Added detach from ticker on stop API
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
Filip Jagodzinski b850d70d75 Remove RESET_REASON from MCU_NRF52840 2019-07-11 11:55:13 +01:00
Rajkumar Kanagaraj fc5de6f128 Removed RESET_REASON for NRF51_DK board 2019-07-11 11:55:13 +01:00
Rajkumar Kanagaraj b2f03b2155 Added the SPDX identifier 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 361c787abc Trailing space issue fix 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 3f20350b04 fix for Jenkin build issue 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 7d941950d3 Removed RESET_REASON for NRF52832,NRF52840 family and Removed WATCHDOG for H743ZI board 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 6d501401f3 Revert "fix for build failure issues"
This reverts commit 3ce1d4940cb7fd9d74ca2be75ed08b76854ff534.
2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj ea26d27c84 fix for build failure issues 2019-07-11 11:55:12 +01:00
Rajkumar Kanagaraj 9ed124707d doxy spell check fix for watchdog 2019-07-11 11:55:11 +01:00
Rajkumar Kanagaraj 070537f2e9 update:Remove DEVICE_WATCHDOG and added RESET_RESON in stm32 family 2019-07-11 11:55:11 +01:00
Mel W 257e4cb686 capitalizing class name
Hope this is alright.
2019-07-11 11:55:11 +01:00
Mel W cbb26403eb Capitalizing Watchdog 2019-07-11 11:55:11 +01:00
Mel W f1a3ccc21b small grammatical changes
Not sure if the formatting's still alright on these.
2019-07-11 11:55:11 +01:00
Filip Jagodzinski f5e61b99a1 Docs: Watchdog: Update code comments
* capitalize driver class name,
* reword test docs for the driver & HAL,
* capitalize Mbed name,
* reword the comments explaining the SERIAL_FLUSH_TIME_MS macro.
2019-07-11 11:55:11 +01:00
Steve Cartmell 5b0259dbd1 fix(hal-watchdog): Guard TMPM 'ResetReason' code behind feature flag 2019-07-11 11:55:11 +01:00
Steve Cartmell da7bf6e8e7 fix(hal-watchdog): Add 'RESET_REASON' flags to supported devices 2019-07-11 11:55:11 +01:00
Steve Cartmell dcf11f01f0 fix(hal-watchdog): Remove 'RESET_REASON' flags from unsupported devices 2019-07-11 11:55:10 +01:00
Steve Cartmell b8f0815959 fix: Remove excess comma from device_has key in targets.json 2019-07-11 11:55:10 +01:00
Amanda Butler c04ba485fc Edit ResetReason_tests.h
Make minor grammar edits.
2019-07-11 11:55:10 +01:00
Ganesh Ramachandran 83f16190b5 Added reset_reason feature for TMPM3HQ 2019-07-11 11:55:10 +01:00
Filip Jagodzinski 2e1b524917 Tests: Watchdog: Update the reset-to-sync delay
Change the config parameter used as a delay before sending the sync
packet after the device reset in watchdog and reset_reason tests. Use
'forced_reset_timeout' instead of 'program_cycle_s'.
2019-07-11 11:55:10 +01:00
Filip Jagodzinski e4217cb5e8 Tests: Watchdog: Fix config access in the host script
Move the calls to get_config_item() to the setup() method. The config is
not available in the initializer yet.
2019-07-11 11:55:10 +01:00
Donatien Garnier ec010fc5e6 Fix more astyle failures 2019-07-11 11:55:10 +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
Steve Cartmell e2538d931d fix(hal-watchdog): Add feature guards to K64F watchdog implementation 2019-07-11 11:55:09 +01:00
Steve Cartmell 4f2acf5f03 test(api-watchdog): Fix errors in compiling watchdog greentea tests
The latest rebase of the watchdog feature branch introduced errors in compiling
watchdog tests due to missing headers.

- Watchdog HAL API test
  Include missing header files to main.cpp (mbed_wait_api.h, stdlib.h).

- Watchdog HAL API timing test
  Include missing header files to main.cpp (us_ticker_api.h).

- Watchdog Driver API test
  Include missing header files to main.cpp (mbed_wait_api.h, stdlib.h).
  Inject mbed namespace into main.cpp to fix Watchdog name resolution.
2019-07-11 11:55:09 +01:00
Ganesh Ramachandran a2db1f1989 Added reset_reason feature for TMPM3H6 & TMPM4G9 2019-07-11 11:55:09 +01:00
Ganesh Ramachandran 22de156802 Added reset_reason feature for TMPM066 & TMPM46B 2019-07-11 11:55:08 +01:00
ccli8 87ca77bbfc Fix NUMAKER_PFM_NANO130 cannot pass mbed_hal/watchdog_reset test
On NUMAKER_PFM_NANO130 target, WDT's clock source is fixed to LIRC, which is much
less accurate than other targets. Enlarge delta define to pass this test.
2019-07-11 11:55:08 +01:00
ccli8 90c75f5d01 Enlarge wait time for flushing serial buffer in Greentea test code
Original wait time is not enough for UART to flush out before deepsleep/reset on some targets.
2019-07-11 11:55:08 +01:00