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

BQ76940: BQ7694003 OV_TRIP写入不成功

Part Number:BQ76940

由MCU控制BQ7694003,在初始化的时候,写入OV_TRIP=C8, UV_TRIP=B8; 在写入之后,立马读取,返回值正确。 但是过了一小段时间,再去读取OV_TRIP和UV_TRIP的时候,发现OV_TRIP已经被清零, UV_TRIP还是维持B8。 请问这可能是什么原因。

user6108086:

MCU的代码如下:

static int __config_cell_ovp(struct config_s* conf) { PROTECT3_Type protect3; int ov_trip = 0; protect3.byte = __read_byte(PROTECT3); ov_trip = ((((long)(conf->cell_ov_limit * 1000) – conf->adc_offset) * 1000 / conf->adc_gain) >> 4) & 0x00FF; //printf("set OV_TRIP: %02X\r\n", ov_trip); __write_byte(OV_TRIP, ov_trip); //printf("get OV_TRIP: %02X\r\n", __read_byte(OV_TRIP)); protect3.OV_DELAY = 0; for (int i = COUNTOF(OV_delay_setting) – 1; i > 0; i–) { if (conf->cell_ov_delay_ms >= OV_delay_setting[i]) { protect3.OV_DELAY = i; break; } } __write_byte(PROTECT3, protect3.byte); // returns the actual current threshold value return ((long)1 << 13 | ov_trip << 4) * conf->adc_gain / 1000 + conf->adc_offset;}

,

Star Xu:

您好,请参考下面链接的内容,希望对您有帮助。

https://www.ti2k.com/wp-content/uploads/ti2k/DeyiSupport_电源管理_bq76940-setting-the-ov_trip-value

赞(0)
未经允许不得转载:TI中文支持网 » BQ76940: BQ7694003 OV_TRIP写入不成功
分享到: 更多 (0)