Open kfessel opened 6 months ago
sorry very short
https://github.com/LibreSolar/bms-firmware/blob/58d2384f013ec466e16b1b6201fbb8aac653a2c9/drivers/bms_ic/bq769x0/bq769x0.c#L287-L288
of by a factor of 1000 (adc_gain is in µV/LSB)
ic_conf->cell_uv_limit = ((0x1000UL | (uv_trip << 4)) * dev_data->adc_gain / 1000.0 + dev_data->adc_offset) / 1000.0;
https://github.com/LibreSolar/bms-firmware/blob/58d2384f013ec466e16b1b6201fbb8aac653a2c9/drivers/bms_ic/bq769x0/bq769x0.c#L244-L245
of by a factor of 1000 (adc_gain is in µV/LSB) and for ti manual SLUSBK2I – page 22 OV trip level is mapped to “10-XXXX-XXXX–1000”.
OV trip level is mapped to “10-XXXX-XXXX–1000”.
therefor the (1U << 13 | ov_trip << 4) should probaly be (1U << 13 | ov_trip << 4|0x8) to match the effective value
(1U << 13 | ov_trip << 4)
(1U << 13 | ov_trip << 4|0x8)
ic_conf->cell_ov_limit = ((0x2008UL | (ov_trip << 4)) * dev_data->adc_gain / 1000.0 + dev_data->adc_offset) / 1000.0;
sorry very short
https://github.com/LibreSolar/bms-firmware/blob/58d2384f013ec466e16b1b6201fbb8aac653a2c9/drivers/bms_ic/bq769x0/bq769x0.c#L287-L288
of by a factor of 1000 (adc_gain is in µV/LSB)
https://github.com/LibreSolar/bms-firmware/blob/58d2384f013ec466e16b1b6201fbb8aac653a2c9/drivers/bms_ic/bq769x0/bq769x0.c#L244-L245
of by a factor of 1000 (adc_gain is in µV/LSB) and for ti manual SLUSBK2I – page 22
OV trip level is mapped to “10-XXXX-XXXX–1000”.
therefor the
(1U << 13 | ov_trip << 4)
should probaly be(1U << 13 | ov_trip << 4|0x8)
to match the effective value