shining-man / bsc_fw

Firmware battery safety controller (BSC)
MIT License
81 stars 15 forks source link

Fix device BOOTLOOP when multiple BMS connected and SOC average activated #80

Closed meikjaeckle closed 4 months ago

meikjaeckle commented 4 months ago

Error description from Juergen @ Discord:

Bei aktivieren des CAN Ports zum Deye Inverter und folgenden Neustart (oder Stromfrei-machen) hängt der BSC jedes mal im Bootloop. Die rote LED am NodeMCU blinkt alle 20-30 sec einmal auf. Das Gerät tauch nicht mehr im Wifi auf, auch nicht das Backup BSC Wifi. Schaut für mich wirklich nach Bootloop aus.

I could reproduce the error as follows:

grafik

Error log: grafik

NOTE: Additionally I found another place, where a division-by-zero could occur. I fixed it as well, but this not verifiable without hardware.