SLVSIJ3 May 2026 DRV81646-Q1
ADVANCE INFORMATION
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 for Bit 3) the channels to OUT4=1 (Bit 7), OUT3=0 (Bit 6), OUT2=0 (Bit 5), and OUT1=1 (Bit 4) 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);