LibreSolar / bms-firmware

Firmware for LibreSolar BMS boards based on bq769x0, bq769x2 or ISL94202
https://libre.solar/bms-firmware/
Apache License 2.0
146 stars 67 forks source link

bq769x0: Fix address and CRC detection #28

Closed krzysztof9nowak closed 1 year ago

krzysztof9nowak commented 1 year ago

Hi, I am in the process of porting bms-firmware for some noname BMS I found with bq76940 and stm32f103. In the process I encountered problems with detection of the BMS IC, I was getting an error: BMS communication error but after veryfing with logic analyzer, the communication turned out to be correct. The bug was caused by an erroneous (oposite) interpretation of return values of determine_address_and_crc function. I suspect this bug might affect other boards already supported by bms-firmware, but I have no way of verifying that/

martinjaeger commented 1 year ago

Oops, yes, that's definitely a bug. Looks like I introduced it in this commit: 9aa112a54bf4876be437634c518929405e394546

Thanks for providing the fix!