This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BQ76952: 官方demo软件bug及AlarmStatus状态异常问题

Part Number: BQ76952

如上图所示:软件代码是截取的官方demo,首先alarm_sta_A,alarm_sta_B,alarm_sta_C这几个寄存是8位单字节,程序使用16位双字节去读取,并且按位解析赋值个故障标志位,这是错误的,希望改正。

正题:

今天测试发现,AlarmStatus这个寄存器里有值是0x8000,但是,alarm_sta_B,alarm_sta_C里却没有任何值。alarm_sta_A的值,却在高8位上有个0x2000如图所示:

根据上面的描述:

问题1:为什么AlarmStatus报了0x8000,但是alarm_sta_B,alarm_sta_C却没有任何值

问题2:读alarm_sta_A时,读了两个字节出来,高8位到底什么?(PS:是 Safety Alert B Register 的值吗?)