SCPS299A May 2025 – September 2025 TXE8116-Q1 , TXE8124-Q1
ADVANCE INFORMATION
The software reset call is a command sent from the controller on the SPI bus that instructs the SPI target devices that support the command to be reset to the power-up default state.
TXE8116-Q1/TXE8124-Q1 devices use a 24-bit SPI frame for communication. For example, to trigger register reset via software reset command, the controller can configure the SPI frame as the following:
| B23 | B22 | B21 | B20 | B19 | B18 | B17 | B16 | B15 | B14 | B13 | B12 | B11 | B10 | B9 | B8 | B7 | B6 | B5 | B4 | B3 | B2 | B1 | B0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
// Define the SPI register addresses
#define REGISTER_CMD_BYTE 0x1A // Register command byte of reset register
#define DATA_BITS 0x2 // Set B1 as 1 and B0 as 0 to trigger register reset
#define READ_WRITE_BIT 0 // 0 for Write operation, 1 for Read operation
// Function to send a 24-bit SPI frame to the I/O expander (MSB First)
void SPI_Send(uint32_t data) {
// Using a hardware SPI peripheral to send the 24-bit data bit by bit (MSB first)
for (int i = 23; i >= 0; i--) {
SPI_Transmit((data >> i) & 0x01); // Shift out MSB first
}
}
// Function to send software reset command to the SPI I/O expander
void SPI_Software_Reset(void) {
uint32_t frame = 0;
// Set the Read/Write bit (bit 23)
frame |= (READ_WRITE_BIT << 23);
// Set the Register Address (bits 20-16)
frame |= (REGISTER_CMD_BYTE << 16);
// Set the Data bits (bits 7-0)
frame |= (DATA_BITS & 0xFF); // Ensure we only use the lower 8 bits
// Pull CS low to select the target device
CS_LOW();
// Send the constructed SPI frame (MSB first)
SPI_Send(frame);
// Pull CS high to deselect the device after transmission
CS_HIGH();
}