ModusToolbox Safety Test Library
Loading...
Searching...
No Matches

General Description

Functions

void SelfTest_Timer_Counter_init (TCPWM_Type *base, uint32_t cntNum, cy_stc_tcpwm_counter_config_t const *config, IRQn_Type intsrc)
 Initialize the counter and initialize the timer interrupt for the Self test.
uint8_t SelfTest_Counter_Timer (void)
 Performs Timer Counter test by checking that the counter is incrementing.

Function Documentation

◆ SelfTest_Timer_Counter_init()

void SelfTest_Timer_Counter_init ( TCPWM_Type * base,
uint32_t cntNum,
cy_stc_tcpwm_counter_config_t const * config,
IRQn_Type intsrc )

Initialize the counter and initialize the timer interrupt for the Self test.

Parameters
baseThe pointer to a TCPWM instance
cntNumThe Counter instance number in the selected TCPWM
configThe pointer to configuration structure
intsrcInterrupt source
Note
Use a TCPWM counter and interrupt source dedicated to this self-test. This function initializes the selected counter, installs the timer-counter ISR, enables the interrupt, and sets the counter interrupt mask.

◆ SelfTest_Counter_Timer()

uint8_t SelfTest_Counter_Timer ( void )

Performs Timer Counter test by checking that the counter is incrementing.

Note
Call SelfTest_Timer_Counter_init before this function. The test programs the selected counter period, compare value, and counter value during the check.
Returns
OK_STATUS (0) - Test passed
ERROR_STATUS (1) - Test failed