SLVSI23A September 2025 – December 2025 DRV81646
PRODUCTION DATA
P[2:0] is a set of 3 parity bits which are used to check the correctness of received data word. If the parity check fails then the output states are not updated. The parity bits are calculated as follows, where ⊕ is XOR:
For example to set (R/W=1) the channels to OUT4=1, OUT3=0, OUT2=0, and OUT1=1 the parity calculation and frame construction is below:
The following is pseudo-code from the EVM firmware implementing the parity bit calculation :
bool B7 = startOut4;
bool B6 = startOut3;
bool B5 = startOut2;
bool B4 = startOut1;
bool B3 = rw_bit;
bool P2 = B7 ^ B6 ^ B5;
bool P1 = B6 ^ B5 ^ B4;
bool P0 = B5 ^ B4 ^ B3;
uint8_t CMD = (B7 << 7)|(B6 << 6)|(B5 << 5)|(B4 << 4)|(B3 << 3)|(P2 << 2)|(P1 << 1)|(P0 << 0);