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

General Description

Functions

uint8_t SelfTest_I2C_SCB (CySCB_Type *master_base, cy_stc_scb_i2c_context_t *master_context, CySCB_Type *slave_base, cy_stc_scb_i2c_context_t *slave_context, uint8_t *slave_read_buf, uint8_t *slave_write_buf)
 I2C master under test sends data to I2C slave for self test.

Function Documentation

◆ SelfTest_I2C_SCB()

uint8_t SelfTest_I2C_SCB ( CySCB_Type * master_base,
cy_stc_scb_i2c_context_t * master_context,
CySCB_Type * slave_base,
cy_stc_scb_i2c_context_t * slave_context,
uint8_t * slave_read_buf,
uint8_t * slave_write_buf )

I2C master under test sends data to I2C slave for self test.

Slave reads the data and writes the complement[1's] to the slave read buffer. Master reads back the data from the slave and checks the dataforis corruption.

Parameters
master_baseThe pointer to the master I2C SCB instance.
master_contextThe pointer to the master I2C SCB context.
slave_baseThe pointer to the slave I2C SCB instance.
slave_contextThe pointer to the slave I2C SCB context.
slave_read_bufThe pointer to slave read buffe.
slave_write_bufThe pointer to slave write buffer.
Note
During a call, the function transmits from 0x01 to 0xFF. Clears I2C Master status, reads and writes the buffer Do not call this function while application traffic is active on the same I2C master or slave instances. The slave read/write buffers and I2C status are used as test resources and are modified by the function.
Returns
ERROR_STATUS (1) - Test failed
PASS_STILL_TESTING_STATUS (2) - Still testing
PASS_COMPLETE_STATUS (3) - Test completed OK