foxBMS / foxbms-2

foxBMS 2, online documentation at https://docs.foxbms.org
https://foxbms.org
Other
263 stars 121 forks source link

[FIX] Bug when initializing multiple SPI slave strings #62

Closed niktwo17 closed 1 week ago

niktwo17 commented 1 week ago

@foxBMS For reference, please find a possible fix for handling multiple SPI slaves. The currently existing method initializes SPI interfaces in the following way: SPI_INTERFACE_CONFIG_s spi_ltcInterface[BS_NR_OF_STRINGS] = { { .pConfig = &spi_kLtcDataConfig[0u],},}; However, this only works as intended if BS_NR_OF_STRINGS equals 1 - spi_ltcInterface[].pConfig holds a null pointer for every instance apart from the first one. Verified using the Ozone Debugger, standard setup for foxBMS setup followed.

image

I'd appreciate it if you can include something like this in a future foxBMS release.

Please read this before creating a Pull Request

The foxBMS project is an open source project to empower everybody to build beyond state of the art battery management systems (BMS) based on software and hardware that:

We therefore release foxBMS with permissive licenses:

For details see the LICENSE.md file and the license documentation.

However foxBMS is not openly developed on GitHub (or any other platform). The main development on this project is done by members of the Fraunhofer IISB and organized in a non-public repository at the Fraunhofer IISB. This repository is the output of the release branch of this internal repository.

This workflow allows us to release these development outputs under these permissive licenses. We do not have a Contributors License Agreement (CLA) system or similar that would allow us to integrate input from GitHub Pull Requests, therefore GitHub Pull Requests are currently not accepted.

We would be very pleased if you intend to contribute to this project. Please contact us first at info@foxbms.org in order to discuss your contribution and how it can be applied to the project.

niktwo17 commented 1 week ago

61

foxBMS commented 1 week ago

Hi @niktwo17,

as stated in https://github.com/foxBMS/foxbms-2/issues/61#issuecomment-2367626405, the BMS software works for multiple strings. The proposed fix does also not fix the problem in a desireable way for the general project.

Additional information to PRs: Unfortunately we are not able to accept pull requests for the reasons given at .github/PULL_REQUEST_TEMPLATE.md.

Best regards, The foxBMS Team