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:电流校准问题

Guru**** 2462180 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1333293/bq76952-current-calibration-issue

器件型号:BQ76952

我遵循校准手册中给出的当前校准步骤。 我正在从 READ_CAL1 子命令中读取 CC2计数的中间两个字节。 当前读数不会更新。

I:读取的字节数14
I:buf_data[0]:10
I:buf_data[1]:ff
I:buf_data[2]:ff
I:buf_data[3]:ff
I:buf_data[4]:0
I:buf_data[5]:0
I:buf_data[6]:0
I:buf_data[7]:0
I:buf_data[8]:b8
I:buf_data[9]:C7
I:buf_data[10]:C8
I:buf_data[11]:3F

这是读取 READ_CAL1子命令。 等待2分钟后,我再次执行命令,仍然是相同的读数。 前两个字节中的"校准数据计数器"未递增。

中间两个字节的读数始终为-1。

我哪里出了问题??

这是读取 READ_CAL1子命令的代码:

int32_t current_readCC2 (常量结构设备*dev)
{
int16_t MidByte
uint8_t buf_data[32]
uint8_t num_Bytes
Int ret

//循环读取 CC2计数寄存器的第3个字节和第4个字节,并将字节交换为大端字节序格式。
MidByte = 0

// READ_CAL1子命令读取一个12字节的寄存器。 CC2计数寄存器从偏移量2开始。
RET = bq769x2_subcmd_read_str_call (devBQ769X2_SUBCMD_READ_CAL1、buf_data、&num_Bytes);
if (ret!= 0){
Log_ERR("尝试从 READ_CAL1子命令读取值时发生错误。 返回值为%d\n"ret);
返回-2
//打印读取的字节数
log_inf ("读取的字节数%d\n"num_Bytes);

for (int i = 0i < num_Bytes-2i++){
Log_INF ("buf_data[%d]:%x"ibuf_data[i]);
返回0

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Ananya:

    发送子命令后、您需要等待2ms、然后才能从0x40传输缓冲区读取数据。  

    子命令需要一些时间才能完成该操作、然后读取该操作才有效。

    我在这里没有看到该延迟?

    此致、

    路易斯·埃尔南德斯·萨洛蒙