Datasheet

Theory of operation STPMC1
52/77 Doc ID 15728 Rev 7
9.17.7 Group 6 data records
6.1 ACR:
iR RMS SWM accumulator: 20-bit accumulator of R phase current in SWM mode (see
paragraph
9.7
)
R-phase elapsed: phase delay (see paragraph
9.15
)
6.2 ACS:
iS RMS SWM accumulator: 20-bit accumulator of S phase current in SWM mode (see
paragraph
9.7
)
S-phase elapsed: phase delay (see paragraph
9.15
)
6.3 ACT:
iT RMS SWM accumulator: 20-bit accumulator of T phase current in SWM mode (see
paragraph
9.7
)
T-phase elapsed: phase delay (see paragraph
9.15
)
6.4 CF3:
bits [111..84] of configurators (see
Tabl e 3 3
)
9.17.8 Parity calculation
Each bit of parity nibble is defined as odd parity of all seven corresponding bits of data
nibbles. In order to check the data record integrity, the application might execute the
following C code, given as an example:
int BadParity (unsigned char *bp)
{register unsigned char prty = grp;/* temp register set to group #
(0..6)*/
prty ^= *bp; /* xor it with 1st byte of data */
prty ^= *(bp+1); /* xor it with the 2nd byte */
prty ^= *(bp+2); /* and with the 3rd byte */
prty ^= *(bp+3); /* and last, with the 4th byte */
prty ^= prty<<4; /* combine */
prty &= 0xF0; /* remove the lower nibble */
return (prty != 0xF0); /* returns 1, if bad parity */}
Figure 20. Group 6 data records
4 bit
ACR
ACS
ACT
CF3
parity iR RMS Ah accumulator if bad uR R-phase elapsed
parity S-phase elapsediS RMS Ah accumulator if bad uS
parity iT RMS Ah accumulator if bad uT T-phase elapsed
parity bits [111..84] of configurators
8 bit
20 bit
20 bit
4 bit4 bit4 bit
ACR
ACS
ACT
CF3
parity iR RMS Ah accumulator if bad uR R-phase elapsedparity iR RMS Ah accumulator if bad uR R-phase elapsed
parity S-phase elapsediS RMS Ah accumulator if bad uSparity S-phase elapsediS RMS Ah accumulator if bad uS
parity iT RMS Ah accumulator if bad uT T-phase elapsedparity iT RMS Ah accumulator if bad uT T-phase elapsed
parity bits [111..84] of configuratorsparity bits [111..84] of configurators
8 bit8 bit
20 bit20 bit
20 bit20 bit
4 bit
ACR
ACS
ACT
CF3
parity iR RMS Ah accumulator if bad uR R-phase elapsed
parity S-phase elapsediS RMS Ah accumulator if bad uS
parity iT RMS Ah accumulator if bad uT T-phase elapsed
parity bits [111..84] of configurators
8 bit
20 bit
20 bit
4 bit4 bit4 bit
ACR
ACS
ACT
CF3
parity iR RMS Ah accumulator if bad uR R-phase elapsedparity iR RMS Ah accumulator if bad uR R-phase elapsed
parity S-phase elapsediS RMS Ah accumulator if bad uSparity S-phase elapsediS RMS Ah accumulator if bad uS
parity iT RMS Ah accumulator if bad uT T-phase elapsedparity iT RMS Ah accumulator if bad uT T-phase elapsed
parity bits [111..84] of configuratorsparity bits [111..84] of configurators
8 bit8 bit
20 bit20 bit
20 bit20 bit