TI中文支持网
TI专业的中文技术问题搜集分享网站

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 的值吗?)

Star Xu:

您好,正在查询,稍后回复。

,

Star Xu:

您好,请参考下面的内容:

Thanks for pointing this out – there may be a bug in the example code for this function. If you read two bytes from this register, it will just read the following register as well. So in this case if 0x03 Safety Status A is being read, Safety Alert B is also being read (upper byte). 

The variable names you mention (alarm_ sta_ A,alarm_ sta_ B,alarm_ sta_ C) are not in the code example though, so I am not sure how these are being read.

,

yunling xing:

好的,感谢,关于状态不对应问题,经过测试,我大概知道是什么状况了

赞(0)
未经允许不得转载:TI中文支持网 » BQ76952: 官方demo软件bug及AlarmStatus状态异常问题
分享到: 更多 (0)