This function tests an internal loopback of SPI (transmitted byte must be equal to received).
- Parameters
-
| base | The 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