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

General Description

Functions

uint8_t SelfTest_IO (void)
 This function performs I/O tests to detect pin shorts to Ground or Vcc.
uint8_t SelfTest_IO_GetPinError (void)
 This function returns a pin number that causes an error in the SelfTest_IO function.
uint8_t SelfTest_IO_GetPortError (void)
 This function returns a port number that causes an error in the SelfTest_IO function.
void SelfTest_IO_SetPinMask (const uint8_t *pinMaskArr)
 Summary: This function sets a custom pin mask to be used in the SelfTest_IO function.

Function Documentation

◆ SelfTest_IO()

uint8_t SelfTest_IO ( void )

This function performs I/O tests to detect pin shorts to Ground or Vcc.

Not all pins may be compatible with this test based on the applications specifics. By default, this function uses the "PinToTest" array to determine which pins to test. To set a custom pin mask, use the SelfTest_IO_SetPinMask() function.

Note
Include only GPIO pins that can safely be driven with the self-test pull-up and pull-down sequence. Do not include pins that are actively driven by external circuitry, tied directly to a power rail, used for debug or clocks, or required by another active peripheral during the test.
Returns
OK_STATUS (0) - Test passed
SHORT_TO_VCC (1) - Test failed (short to VCC)
SHORT_TO_GND (2) - Test failed (short to GND)

◆ SelfTest_IO_GetPinError()

uint8_t SelfTest_IO_GetPinError ( void )

This function returns a pin number that causes an error in the SelfTest_IO function.

Returns
The pin number that causes an error.

◆ SelfTest_IO_GetPortError()

uint8_t SelfTest_IO_GetPortError ( void )

This function returns a port number that causes an error in the SelfTest_IO function.

Returns
PORT number that cause an error

◆ SelfTest_IO_SetPinMask()

void SelfTest_IO_SetPinMask ( const uint8_t * pinMaskArr)

Summary: This function sets a custom pin mask to be used in the SelfTest_IO function.

Parameters
pinMaskArrThe custom pin mask array. The length of the array should be equal to the IO_PORTS value. Each element of the array is a mask of the GPIO port pins, to be tested in the SelfTest_IO function. The port sequence is the same as in the PORT_Regs array. Pass the NULL value to use the default pin mask.