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

General Description

Functions

void SelfTest_Motif_Init (stl_motif_cfg_handle_t *hPtr)
 This function initializes the MOTIF self test configuration.
void SelfTest_Motif_DeInit (stl_motif_cfg_handle_t *hPtr)
 This function de-initializes the MOTIF self test configuration.
uint8_t SelfTest_Motif_Start (stl_motif_cfg_handle_t *hPtr)
 This function starts the Motif and capture the count between two quadrature clock edges.

Function Documentation

◆ SelfTest_Motif_Init()

void SelfTest_Motif_Init ( stl_motif_cfg_handle_t * hPtr)

This function initializes the MOTIF self test configuration.

Initialization includes

  • Generate the emulated signals for Phase-A, Phase-B and Index using TCPWM. These signals are input to the MOTIF module.
  • Configure the TCPWM counter to capture the Q-CLK resolution.
  • Configure the MOTIF module.
Note
Use MOTIF and TCPWM resources dedicated to this self-test while it is active. This function configures the MOTIF block, a TCPWM counter for Q-clock capture, and TCPWM PWM instances that emulate Phase-A, Phase-B, and Index inputs. Call SelfTest_Motif_DeInit before returning those resources to the application.
Parameters
hPtrPointer to the motif self test configuration handler.

◆ SelfTest_Motif_DeInit()

void SelfTest_Motif_DeInit ( stl_motif_cfg_handle_t * hPtr)

This function de-initializes the MOTIF self test configuration.

De-initialization includes:

  • Disable and de-initialize the MOTIF module.
  • Disable and de-initialize the TCPWM counter used for Q-CLK capture.
  • Disable and de-initialize the TCPWM PWM instances used to generate the emulated Phase-A, Phase-B and Index signals.
Parameters
hPtrPointer to the motif self test configuration handler.

◆ SelfTest_Motif_Start()

uint8_t SelfTest_Motif_Start ( stl_motif_cfg_handle_t * hPtr)

This function starts the Motif and capture the count between two quadrature clock edges.

Captured value compares with the reference value and returns the result.

Parameters
hPtrPointer to the motif self test configuration handler.
Returns
OK_STATUS (0) - Test passed
ERROR_STATUS (1) - Test failed