Document API IEC60730 Library
|
Verifies all tests have completed on time. More...
Macros | |
#define | IEC60730_VMC_COMPLETE (1 << 0) |
Mask bit used for Variable Memory Checks completed. | |
#define | IEC60730_IMC_COMPLETE (1 << 1) |
Mask bit used for Invariable Memory Checks completed. | |
#define | IEC60730_CPU_CLOCKS_COMPLETE (1 << 2) |
Mask bit used for CPU Clocks Checks completed. | |
#define | IEC60730_CPU_REGS_COMPLETE (1 << 3) |
Mask bit used for CPU Register Checks completed. | |
#define | IEC60730_INTERRUPT_COMPLETE (1 << 4) |
Mask bit used for Interrupt Checks completed. | |
#define | IEC60730_GPIO_COMPLETE (1 << 5) |
Mask bit used for GPIO Plausibility Checks completed. | |
#define | IEC60730_ANALOG_COMPLETE (1 << 6) |
Mask bit used for Analog Plausibility Checks completed. | |
#define | IEC60730_COMMS_COMPLETE (1 << 7) |
Mask bit used for Communications Plausibility Checks completed. | |
#define | IEC60730_OEM0_COMPLETE (1 << 8) |
Mask bit used for OEM Check 0 completed. | |
#define | IEC60730_OEM1_COMPLETE (1 << 9) |
Mask bit used for OEM Check 1 completed. | |
#define | IEC60730_OEM2_COMPLETE (1 << 10) |
Mask bit used for OEM Check 2 completed. | |
#define | IEC60730_OEM3_COMPLETE (1 << 11) |
Mask bit used for OEM Check 3 completed. | |
#define | IEC60730_OEM4_COMPLETE (1 << 12) |
Mask bit used for OEM Check 4 completed. | |
#define | IEC60730_OEM5_COMPLETE (1 << 13) |
Mask bit used for OEM Check 5 completed. | |
#define | IEC60730_OEM6_COMPLETE (1 << 14) |
Mask bit used for OEM Check 6 completed. | |
#define | IEC60730_OEM7_COMPLETE (1 << 15) |
Mask bit used for OEM Check 7 completed. | |
#define | IEC60730_ALL_COMPLETE_BITS |
Mask used for checking that all bits are set. More... | |
Functions | |
void | sl_iec60730_program_counter_test (void) |
Variables | |
uint16_t | sl_iec60730_program_counter_check |
Verifies all tests have completed on time.
The frequency of test execution must be checked to ensure that tests are being run in time.
The Program counter check requires that each BIST test set a bit in a bit array whenever an iteration of testing completes. The Program counter check uses the test clock timer configured in the system clock plausibility test to determine when to execute. See System Clock Check for system clock plausibility details. The Program counter test executes at 1/10 the frequency of the system clock plausibility test. Best practice recommendations and example OEM code configure the system clock plausibility test to run at 100 ms intervals, resulting in BIST frequency check intervals of 1s.
Bits within sl_iec60730_program_counter_check are set as tests pass. OEMs can determine how fast their tests are running by checking this variable. If a bit is still clear, that test has not completed.
OEM configuration of this test is dependent on system clock plausibility configuration. Please see System Clock Check for details.
The library's BIST execution frequency test will force entry into safe state if a period of time defined by 1/10 test clock test frequency passes without all BIST tests completing their test execution. It is the OEM's responsibility to call the BIST in the main() loop with enough frequency to execute all tests within the required time period.
If the system clock test's test timer is not configured as expected, so that 1/10 test clock frequency is unexpectedly fast, the system may fall into safe state because tests have not had enough time to execute to completion.
For the IEC60730 implementation, see Figure 1
#define IEC60730_ALL_COMPLETE_BITS |
Mask used for checking that all bits are set.
void sl_iec60730_program_counter_test | ( | void | ) |
public IEC60730 program counter test
Checks flags in sl_iec60730_program_counter_check set by each BIST test to determine if BIST is executing within a specified period.
uint16_t sl_iec60730_program_counter_check |
Global variable used by BIST to determine if modules are running frequently enough to meet maximum fault time.
sl_iec60730_program_counter_check equals 0 before BIST check. Each module then sets its assigned bit once it has completed testing. Before the maximum fault time, sl_iec60730_program_counter_test() verifies that the value is IEC60730_ALL_COMPLETE_BITS.