Closed niktwo17 closed 1 week ago
Dear @niktwo17,
The BMS software works for multiple strings. You need to adapt the SPI configuration to be able to use multiple strings. If you do not adapt it, then the array containing the SPI configuration is initialized invalid and you will access invalid memory, therefore the BMS chrashes.
We will update the documentation's how-to section in the next release on how to use multiple strings.
Best regards, The foxBMS Team
Thanks for the answer @foxBMS. However, I still think it makes sense to change code in a way where not only the first instance of a struct with configurable size is initialized - this will save others time in the future. And agreed, the solutions I proposed isn't nice, but as written I just wanted to outline a possible solution, and I trust you as maintainers to find a desirable way. When developing and debugging with different BMS setups having to constantly change multiple files is a huge headache.
Hi foxBMS-team,
when I set
#define BS_NR_OF_STRINGS (2u)
(inbattery_system_cfg.h
) the master instantly crashes, upon startup. Please see the picture below. Tested with both releases 1.6.0 and 1.7.0. No changes made besides number of strings.Edit: I found the issue, the initialization is incorrect causing a nullpointer write when starting SPI driver.
@foxBMS Please find a possible fix here #62
Thanks for your support, Niklas