diyBMSv4ESP32 icon indicating copy to clipboard operation
diyBMSv4ESP32 copied to clipboard

Frequent controller restarts [RS485 experimental version]

Open moscito1010 opened this issue 2 years ago • 7 comments
trafficstars

Hello Stuart. Since yesterday I have had one of my 3 inverters back from repair. I use the RS485 branch. The controller restarts quite often without me being able to understand why it is doing this. I had the serial output written to two text files for you so you can take a look at the log. It seems as if this only happens when the controller has to work and the dynamic charging is very active and the charge controller is often readjusted. But this is not a forensic observation but rather a guess. When the memory is full and the charging current is low, the spitting stops again. diybms2.zip diybms.zip My Controller is the unit from your Patreon sale out and the Modules are the V4.50

Here Pic's from my Hardware IMG_20230904_155137 IMG_20230904_155204 IMG_20230904_155110

moscito1010 avatar Sep 04 '23 17:09 moscito1010

And because it's so beautiful... :-) I tried to reproduce the error and noticed that the controller keeps restarting when I switch on the export to an influxdb. Logs will follow tomorrow.

moscito1010 avatar Sep 04 '23 23:09 moscito1010

Hi @moscito1010 - I've not used the RS485 version, so can't directly support any problems you have with it, it was created by ruza87

Looking at the logs you sent over, its a fault with logging to the SD card which caused the reboot.

***ERROR*** A stack overflow in task sdout has been detected.

Backtrace: 0x40084185:0x3ffaede0 0x4008e465:0x3ffaee00 0x40092275:0x3ffaee20 0x400901a3:0x3ffaeea0 0x4008e574:0x3ffaeed0 0x4008e524:0x4000bff0 |<-CORRUPTED

ELF file SHA256: 694374712c41ffd0

Rebooting...

stuartpittaway avatar Sep 05 '23 07:09 stuartpittaway

oh damn, right. Unfortunately, he has no area for problems. at least I didn't find any. Then it must be by mail or something.

moscito1010 avatar Sep 05 '23 10:09 moscito1010

Did you compile the code yourself?

If you did, look in main.cpp for a line like...

xTaskCreate(sdcardlog_outputs_task, "sdout", 3200, nullptr, 0, &sdcardlog_outputs_task_handle);

and change the "3200" to a higher number (3400) and upload the firmware again.

stuartpittaway avatar Sep 05 '23 11:09 stuartpittaway

@stuartpittaway Since the topic of RS485/Pylontech really "triggers" me, I'll just ask. Would it be possible for you to contact me by email? [email protected] best regards

moscito1010 avatar Sep 08 '23 15:09 moscito1010

Hi @moscito1010, thank you for your feedback. I agree with @stuartpittaway, from the log it seems like some memory issue when logging to SD card. I'll analyze the logs in detail next week. Meanwhile, can you please remove the SD card (to stop the log being written) and see if it helps?

ruza87 avatar Sep 22 '23 11:09 ruza87

I've just merged the newest diyBMS sources into RS485 branch, can you please report if that helped?

Was there any improvement after increasing the stack size for SD task as suggested by @stuartpittaway?

ruza87 avatar Sep 25 '23 13:09 ruza87