Functions | |
| uint8_t | SelfTest_Clock (TCPWM_Type *base, uint32_t cntNum) |
| Performs Clock test and verifies if the measured clock frequency is in the accuracy range. | |
| void | SelfTest_Clock_ISR_TIMER (void) |
| Handle Interrupt Service Routine. | |
| void | SelfTest_Clock_CSV_ISR (void) |
| Summary: ISR handler for SelfTest_Clock_CSV. | |
| uint8_t | SelfTest_Clock_CSV (const stl_clock_csv_entry_t *entry) |
| Summary: Runs the CSV functional self-test for the selected CLK_HF instance: triggers induced CSV fault by setting impossible supervision window, waits for the induced fault to propagate and register by SelfTest_Clock_CSV_ISR. | |
| uint8_t SelfTest_Clock | ( | TCPWM_Type * | base, |
| uint32_t | cntNum ) |
Performs Clock test and verifies if the measured clock frequency is in the accuracy range.
| base | The pointer to a TCPWM instance |
| cntNum | The Counter instance number in the selected TCPWM |
| void SelfTest_Clock_ISR_TIMER | ( | void | ) |
Handle Interrupt Service Routine.
Source - Timer.
| void SelfTest_Clock_CSV_ISR | ( | void | ) |
Summary: ISR handler for SelfTest_Clock_CSV.
The application routes the fault-struct interrupt to this handler with Cy_SysInt_Init and enables the mux line before calling SelfTest_Clock_CSV.
The NVIC mux line is disabled by this function so the ISR doesn't re-enter while the impossible CSV window is still armed. SelfTest_Clock_CSV clears the interrupt mask and any residual pending edge during teardown.
| uint8_t SelfTest_Clock_CSV | ( | const stl_clock_csv_entry_t * | entry | ) |
Summary: Runs the CSV functional self-test for the selected CLK_HF instance: triggers induced CSV fault by setting impossible supervision window, waits for the induced fault to propagate and register by SelfTest_Clock_CSV_ISR.
| entry | Pointer to stl_clock_csv_entry_t describing the CLK_HF under test, the app-provided fault structure, and the NVIC mux the fault-struct interrupt is routed to. |
CY_SYSFAULT_SRSS_CSV. ERROR_BAD_PARAM - entry is NULL, clkHf is 0, faultStruct is NULL, the refClk frequency is 0 (e.g. ECO/EXT not configured), or Cy_SysClk_ClkHfCsvManualConfigure() rejected the configuration.__enable_irq()). The self-test checks induced CSV fault using SelfTest_Clock_CSV_ISR interrupt handler.cpuss_interrupts_fault_N_IRQn) to SelfTest_Clock_CSV_ISR using Cy_SysInt_Init with NVIC_ClearPendingIRQ and NVIC_EnableIRQ on stl_clock_csv_entry_t::nvicMux.CY_SYSFAULT_SRSS_CSV mask, and clears STATUS/INTR. Any prior application configuration of that fault structure is overwritten.Cy_SysClk_ClkHfCsvConfigure() and Cy_SysClk_ClkHfCsvEnable() with its expected accuracy window.STATUS.VALID while the CSV state machine settles. Clear STATUS (loop until Cy_SysFault_GetErrorSource() returns CY_SYSFAULT_NO_FAULT) and clear INTR before enabling the fault-struct interrupt mask and the NVIC mux to avoid false faults.