Other Parts Discussed in Thread: BQ79606A-Q1
Hi support,
I am able to read the cells voltage back and enable the cell balance, all FETs are in their expected states. But I can not read the status back (always 0) with following code:
BYTE bFrame = 0;
ReadReg(0, CB_SW_STAT, &bFrame, 1, 0, FRMWRT_SGL_R);
int pStat = (int)(bFrame & 0x3F);
printf("Passive switch status: %d\n", pStat);
/* or
ReadReg(0, DEV_STAT, &bFrame, 1, 0, FRMWRT_SGL_R);
int pStat = (int)((bFrame >> 4) & 0x1);
printf("Passive CB status: %d\n", pStat);
*/
In BQ79606A-Q1 Software Design Reference under 4.7 section, it mentions:
80 00 02 00 00 84 1E // read PARTID
80 00 02 04 00 86 DE // read DEV_STAT
80 00 02 06 00 87 BE // read FAULT_SUM
• 80 = Single device read of 1 byte
• 00 = Device 0
• 0200, 0204, 0206 = Register address 0x200, 0x204, 0x206
• 00 = Read back one byte of data
• 841E, 86DE, 87BE = CRC
So does my ReadReg() function sending the right code of: 80 00 02 04 00 86 DE ?
Please advise.
Thanks,
Eric