RL78 Family VDE Certified IEC60730/60335 Self Test Library
R01AN0749EG0201 Rev.2.01 Page 26 of 50
Mar 04, 2014
Table 13: Source files: Hardware Clock test
STL File name Header Files
stl_RL78_hw_clocktest.asm stl_clocktest.h
stl.h
Test Harness File Names Header Files
main.c
stl_global_data_example.c
stl_main_example_support function.c
stl_peripheralinit.c
main.h
stl_gobal_data_example.h
Declaration
bool stl_RL78_hw_clocktest(void)
Description
This function tests the system clock using the hardware measurement (TAU channel n) feature. The measured result
(capture value) is compared against the upper and lower limit values defined in the clock test header file
(stl_clocktest.h) and the result status (Pass / Fail / No reference clock) is returned to the calling function.
The function “indicate_test_result.c” will be called by the test harness control files (main.c) to process the test result
Note Function “indicate_test_result.c “is located in the module stl_main_example_support function.c
Input Parameters
hwMAXTIME
Upper time limit compare value (Defined in stl_clocktest.h)
hwMINTIME
Lower time limit compare value (Defined in stl_clocktest.h)
CAPTURE_interrupt_FLAG
Timer channel Capture Interrupt Flag (Defined in stl_clocktest.h)
CAPTURE_Register_Addr
Timer channel capture register address (Defined in stl_clocktest.h)
Output Parameters
NONE
N/A
Return Values
bool
Test status result returned in CPU register A
0 = Test passed.
1 = Test measurement failed ( Outside the reference window)
2 = Test failed (No reference clock detected)