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

General Description

Functions

uint8_t SelfTest_SPI_SCB (CySCB_Type *base)
 This function tests an internal loopback of SPI (transmitted byte must be equal to received).

Function Documentation

◆ SelfTest_SPI_SCB()

uint8_t SelfTest_SPI_SCB ( CySCB_Type * base)

This function tests an internal loopback of SPI (transmitted byte must be equal to received).

Parameters
baseThe pointer to SCB hardware to configure.
Note
Use SmartIO for internal loopback. During a call, the function transmits and receives bytes from 0x01 to 0xFF. Do not call this function while application traffic is active on the same SPI instance. The test clears RX/TX FIFOs and temporarily disables SPI RX/TX interrupt masks while each byte is checked.
Returns
ERROR_STATUS (1) - Test failed
PASS_STILL_TESTING_STATUS (2) - Still testing
PASS_COMPLETE_STATUS (3) - Test completed
ERROR_TX_NOT_EMPTY (4) - TX not empty
ERROR_RX_NOT_EMPTY (5) - RX not empty