Document API IEC60730 Library
|
Header file list of test cases for the verification operate functions in watchdog module. More...
Functions | |
void | unit_test_iec60730_watchdog_set_up (void) |
bool | unit_test_iec60730_watchdog_mock_rst_por (void) |
bool | unit_test_iec60730_watchdog_mock_rst_em4 (void) |
bool | unit_test_iec60730_watchdog_mock_rst_wdog0 (void) |
bool | unit_test_iec60730_watchdog_mock_rst_wdog1 (void) |
bool | unit_test_iec60730_watchdog_mock_set_watchdog_timout_min (void) |
void | unit_test_iec60730_watchdog_mock_rstcause_clear (void) |
uint32_t | unit_test_iec60730_watchdog_mock_rstcause (void) |
void | test_sl_iec60730_watchdog_post_reset_causes_not_por_and_watchdog (void) |
void | test_sl_iec60730_watchdog_post_wachdog_reset_before_por (void) |
void | test_sl_iec60730_watchdog_post_set_watchdog_timout_min_success (void) |
void | test_sl_iec60730_watchdog_post_set_watchdog_timout_min_fail (void) |
void | test_sl_iec60730_watchdog_post_reset_resason_no_valid (void) |
void | test_sl_iec60730_watchdog_post_prevent_unexpected_changed_value (void) |
Header file list of test cases for the verification operate functions in watchdog module.
IEC60730 Watchdog Unit Tests
These test cases run unit tests to check the operation of the functions in watchdog module.
Hardware setup:
void test_sl_iec60730_watchdog_post_prevent_unexpected_changed_value | ( | void | ) |
Public Check sl_iec60730_watchdog_post() operate
Check the function sl_iec60730_watchdog_post() operation when checking condition to prevent unexpected changed value when reset or return from power saving mode. If iec60730_watchdog_count value >= SL_IEC60730_WDOGINST_NUMB after device power on reset, the function sl_iec60730_watchdog_post() return result is SL_IEC60730_TEST_FAILED
void test_sl_iec60730_watchdog_post_reset_causes_not_por_and_watchdog | ( | void | ) |
Public Check sl_iec60730_watchdog_post() operate
If reset causes are not POR and not watchdog reset then no action. Value return by function sl_iec60730_watchdog_post() is SL_IEC60730_TEST_PASSED.
void test_sl_iec60730_watchdog_post_reset_resason_no_valid | ( | void | ) |
Public Check sl_iec60730_watchdog_post() operate
When the device is reset by power on reset first set the variable iec60730_watchdog_state to the value SL_IEC60730_WATCHDOG_TESTING, then check the watchdog reset. If sli_iec60730_set_watchdog_timout_min() is set successfully, and the device does not wake up from EM4, all Watchdogs are tested then finished. The cause of the reset is not by watchdog, the function sl_iec60730_watchdog_post() return result is SL_IEC60730_TEST_PASSED
void test_sl_iec60730_watchdog_post_set_watchdog_timout_min_fail | ( | void | ) |
Public Check sl_iec60730_watchdog_post() operate
When the device is reset by power on reset first set the variable iec60730_watchdog_state to the value SL_IEC60730_WATCHDOG_TESTING, then check the watchdog reset. If sli_iec60730_set_watchdog_timout_min() is failed, then after call sl_iec60730_watchdog_post() again, return result is SL_IEC60730_TEST_FAILED
void test_sl_iec60730_watchdog_post_set_watchdog_timout_min_success | ( | void | ) |
Public Check sl_iec60730_watchdog_post() operate
When the device is reset by power on reset first set the variable iec60730_watchdog_state to the value SL_IEC60730_WATCHDOG_TESTING, then check the watchdog reset. If sli_iec60730_set_watchdog_timout_min() is set successfully, and the device does not wake up from EM4, all Watchdogs are tested then finished. The cause of the reset is by watchdog, the function sl_iec60730_watchdog_post() return result is SL_IEC60730_TEST_PASSED
void test_sl_iec60730_watchdog_post_wachdog_reset_before_por | ( | void | ) |
Public Check sl_iec60730_watchdog_post() operate
When the device is reset by power on reset after watchdog reset, the variable iec60730_watchdog_state does not set to the value SL_IEC60730_WATCHDOG_TESTING, then check return value is SL_IEC60730_TEST_FAILED
bool unit_test_iec60730_watchdog_mock_rst_em4 | ( | void | ) |
Public Function replaces the value for the device being reset by EM4 Wakeup. Only used for unit testing.
bool unit_test_iec60730_watchdog_mock_rst_por | ( | void | ) |
Public Function replaces the value for the device being reset by Power On Reset. Only used for unit testing.
bool unit_test_iec60730_watchdog_mock_rst_wdog0 | ( | void | ) |
Public Function replaces the value for the device being reset by Watchdog 0. Only used for unit testing.
bool unit_test_iec60730_watchdog_mock_rst_wdog1 | ( | void | ) |
Public Function replaces the value for the device being reset by Watchdog 1. Only used for unit testing.
uint32_t unit_test_iec60730_watchdog_mock_rstcause | ( | void | ) |
Public The function replaces the value of the RSTCAUSE register indicating the cause of the reset. Only used for unit testing
void unit_test_iec60730_watchdog_mock_rstcause_clear | ( | void | ) |
Public Function replaces watchdog clear register rstcause. Only used for unit testing.
bool unit_test_iec60730_watchdog_mock_set_watchdog_timout_min | ( | void | ) |
Public Function replaces watchdog timeout min set value successfully or not. Only used for unit testing.
void unit_test_iec60730_watchdog_set_up | ( | void | ) |
Public Function setup condition before running test case. Only used for unit testing.