This file contains all the variable defintions and the prototypes for the APIs used in performing the Clock Test using a secondary oscillator crystal as reference.
Includes
- ../../../diag_common/config/diag_config.h
- stdint.h
- stdlib.h
- xc.h
Enums
This enumeration contains return codes for SW_CLOCK_PERIODIC_MONITOR_01 diagnostics tests.
- diag_clock_status_t
- DIAG_CLOCK_TEST_PASS
-
0 - indicates that is successful
0 - indicates that is successful
- DIAG_CLOCK_TEST_FAIL
-
1 - indicates that is unsuccessful
1 - indicates that is unsuccessful
- DIAG_INVALID_NULL_INPUT
-
2 - indicates that input value is invalid
- DIAG_CLOCK_TEST_TIMEOUT
-
3 - indicates that has timed out
Functions
Table 3-5. voiddiag_ClockTestSetup (void)
Parameters |
|
Returns |
|
Table 3-6. voiddiag_Timer1Restore (void)
Parameters |
|
Returns |
|
Table 3-7. voiddiag_ClockTestTimer (void)
Parameters |
|
Returns |
|
Table 3-8. diag_clock_status_tDIAG_Clock_SOSC (uint32_t clockFrequency, uint32_t referenceFrequency, uint8_t msec, uint8_t tolerance)
Parameters |
[in] clockFrequency
|
uint32_t
- CPU system clock frequency value
|
[in] referenceFrequency
|
uint32_t
- Reference secondary oscillator frequency value
|
[in] msec
|
uint8_t
- Time in msec to run the test
|
[in] tolerance
|
uint8_t
- Limit for deviation frequency value
|
|
Returns |
diag_clock_status_t
| DIAG_CLOCK_TEST_PASS - Success,
DIAG_CLOCK_TEST_FAIL - Failure,
DIAG_INVALID_NULL_INPUT - Invalid,
DIAG_CLOCK_TEST_TIMEOUT - Timeout
|
|