Giter VIP home page Giter VIP logo

foxbms-2's Introduction

The foxBMS Project

foxBMS

foxBMS is a free, open and flexible development environment to design battery management systems. It is the first modular open source BMS development platform.

foxBMS 2

foxBMS 1

⚠️ Refer to foxBMS 2 as foxBMS 1 is no longer supported or updated ⚠️

Contact

For more information or if you want to give use some feedback, please contact us.

The Fraunhofer IISB foxBMS Team

foxbms.org

foxbms-2's People

Contributors

foxbms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

foxbms-2's Issues

How to flash foxbms firmware to MCU?

Hi, foxbms2 developing team,

Can you help me to flash the firmware to MCU?
I have built the foxbms-2 [rev: 9eb6d1c] by using command:
C:\huyle\projects\TSME\foxBMS\foxbms-2> waf build_bin

Then, the program has been built successfully, there are files: foxbms.bin, foxbms.elf, and foxbms.hex in *foxbms-2\build\bin\src\app\main* directory

I have a dev kit: TMDX570LC43HDK (ti.com/tool/TMDX570LC43HDK) connecting to my PC at COM14 port.
I have tried flashing the foxbms-2 firmware to devkit by command:
C:\huyle\projects\TSME\foxBMS\foxbms-2> waf install_bin
But, it has appeared some error:

Build failed
Traceback (most recent call last):
  File "C:\huyle\projects\TSME\foxBMS\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Task.py", line 180, in process
    ret=self.run()
  File "C:\huyle\projects\TSME\foxBMS\foxbms-2\tools\waf-tools\f_j_flash.py", line 200, in run
    self.generator.bld.fatal("No debugger configured in the flash tool.")
  File "C:\huyle\projects\TSME\foxBMS\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Context.py", line 261, in fatal
    raise self.errors.ConfigurationError(msg,ex=ex)
waflib.Errors.ConfigurationError: No debugger configured in the flash tool.

I have read docs of forbms-2 (docs.foxbms.org) but cannot find the specified guideline which tell "how to flash".

Please help me to flash the firmware,
Thank you

identical expression

src/app/driver/can/can.c line 270
Code:
canREG1->CTL = (uint32)0x00000000U | (uint32)0x00000000U /* <-- identical */ | (uint32)((uint32)0x0000000AU << 10U) |
(uint32)0x00020043U;

unable to establish communication with slave MC33775A with the src code given

I have set-up the MC33775A based slave card with master. While establishing the communication with the slave, I'm failing to do so. Due to bus activity the slave wakes up and enters in to the deep sleep but could not establish the communication further. Documentation for the respective part in foxBMS-2 Documentation is not completed yet. If anyone faced the same issue or working on the NXP-MC33775A slave please repond.

Looking forward for your responses.

Best Regards,
Bhavay Sen

MC33775A Daisy-Chain connection with the MC33664 Interface Card

I'm in doubt on how to set-up the connection in hardware for daisy chain with four slave cards (MC33775A).

  1. TPL1 and TPL2 are for multiple chains??
  2. TPL1 and TPL2 are working as two ports (TPL1 as TPL_IN or TPL_OUT and TPL2 as TPL_IN or TPL_OUT)?
  3. Source code provided in the project uses which concept? TPL1 standalone for bi-directional communication? OR TPL1 is specifically used as TPL_OUT and TPL2 is specifically used for TPL_IN (as in the daisy chain).

Dear foxBMS-2 team, Please suggest me suitable solution which I can use to smoothly connect four of the MC33775A slave cards in daisy chain.

Best Regards,
Bhavay Sen

XXX_REDUNDANCY0 variable no assignment

in redundancy.c function MRC_ValidateAfeMeasurement() ,mrc_tableCellVoltageRedundancy0 mrc_tableCelltemperatureRedundancy0 variables read from database ,but in database DATA_BLOCK_ID_CELL_VOLTAGE_REDUNDANCY0 DATA_BLOCK_ID_CELL_TEMPERATURE_REDUNDANCY0 it's never been written.Is that right?

gui.bat problem

while running the GUI.bat after complete setup and successful build. Below is the output showing on CMD instead of the GUI pops up.


D:\foxBMS\foxbms-2>tools\gui\gui.bat
DEBUG:root:Logging level: DEBUG
INFO:root:Checking for pcan in ['PCAN_USBBUS1', 'PCAN_USBBUS2', 'PCAN_USBBUS3', 'PCAN_USBBUS4', 'PCAN_USBBUS5', 'PCAN_USBBUS6', 'PCAN_USBBUS7', 'PCAN_USBBUS8', 'PCAN_USBBUS9', 'PCAN_USBBUS10', 'PCAN_USBBUS11', 'PCAN_USBBUS12', 'PCAN_USBBUS13', 'PCAN_USBBUS14', 'PCAN_USBBUS15', 'PCAN_USBBUS16']
DEBUG:root:Checking PCAN_USBBUS1 (0)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS1', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS2 (1)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS2', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS3 (2)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS3', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS4 (3)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS4', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS5 (4)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS5', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS6 (5)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS6', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS7 (6)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS7', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS8 (7)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS8', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS9 (8)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS9', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS10 (9)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS10', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS11 (10)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS11', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS12 (11)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS12', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS13 (12)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS13', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS14 (13)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS14', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS15 (14)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS15', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS16 (15)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS16', 'interface': 'pcan'}
INFO:root:Connected CAN adapters: [<can.interfaces.pcan.pcan.PcanBus object at 0x000002460E7F3940>]
DEBUG:root:CAN adapter: PCAN_USBBUS1

D:\foxBMS\foxbms-2>


Please check and provide some solution.

Best Regards,
Bhavay Sen

Feature: Min Max Algo Change

Hi,

Currently Min Max logic is implemented on Pack level, Shall we implement it based on Module Level too.

As number of module increases, i think it's better to keep track of module min max too. I found it useful for one of the ESS system.

    pMinMaxAverageValues->minimumCellVoltage_mV[s]      = min;
    pMinMaxAverageValues->nrCellMinimumCellVoltage[s]   = cellNumberMinimum;
    pMinMaxAverageValues->nrModuleMinimumCellVoltage[s] = moduleNumberMinimum;
    pMinMaxAverageValues->maximumCellVoltage_mV[s]      = max;
    pMinMaxAverageValues->nrCellMaximumCellVoltage[s]   = cellNumberMaximum;
    pMinMaxAverageValues->nrModuleMaximumCellVoltage[s] = moduleNumberMaximum;
    pMinMaxAverageValues->validMeasuredCellVoltages[s]  = nrValidCellVoltages;

SPI: Sending only one byte

Hello, I am working on a similar project.
I currently unable to send just one byte using code from TI.
I am wondering how were you able to do it ?

Drivers for Ethernet PHY Trans-receiver DP83869 used in MASTER card

Dear foxBMS/foxBMS-2 Team,

While going through the source code and drivers, I couldn't find drivers for PHY IC DP83869. I got the drivers generated by HALCoGen for DP83640. Is there any other file or name with drivers are attached or users have to add them by their own.
If yes for adding drivers by users then please guide me or share a short procedure to add the PHY driver in software application of foxBMS-2 Master.

Best Regards,
Bhavay Sen

@foxBMS

PER SBC chip only works in debug mode

Greetings,

The PER SBC chip fails Abist1 test when I OTP with the provided script. It only seems to work when I run it in debug mode. Is there any explanation or solution for this?

Thank you!

Programming of PMIC/SBC for foxBMS-2 Master card

Hello,
Please share the programming procedure for MC33FS8530A0ES used in master card. Is foxBMS firmware module have the code in it? or as per the information we have to program it before assembly. Please share the procedure or share the section where it is mentioned in the documentation. As you cannot share the OTP because of NDA.

Best Regards,
Bhavay Sen


Adding Previous conversation,

@BhavaySen
Hello Team foxBMS,

One part MC33FS830A0ES is used in MASTER Card. This is an OTP IC, I have not gone through all the modules of firmware yet but wanted to know that the programming of this IC is done in the firmware or is it already programmed before assembly??
This A0 part of ASIL D category is used in two different flavor. Program to set the desired configuration is covered in firmware in documentation???

@foxBMS
Owner
foxBMS commented 18 hours ago
Dear @BhavaySen,

The MC33FS830A0ES needs to be programmed before the PCB is assembled. The details of the MC33FS830A0ES one-time programming cannot be shared due to NDAs.

For future questions, bug reports and similar, please open each time a specific issue.

Best regards,
The foxBMS Team

Issue with foxBMS-2 Master Board Power-Up

Hello Team foxBMS-2,

I wanted to inform you that we have successfully manufactured the master card and programmed the PMIC with the OTP, thanks to the efforts of the team.

However, during testing, we encountered an issue. When testing the PMIC in Emulation mode, it performed as expected, and we verified the voltages on each PMIC (MCU and PER). However, upon soldering them onto the MASTER Board after the OTP and powering up the circuit with a 12V Supply at connector J2009, we observed that the board did not power up. Additionally, the LEDs indicating different voltages on the MCU_SUP PMIC were blinking at a constant frequency.

Upon further investigation, I discovered that the PMIC requires consecutive WD refreshes to start all the regulators. However, my on-board processor is not programmed, and it cannot be programmed without power, which is to be delivered from the MCU_SUP PMIC.

I have tried using the J-Link Plus, but it cannot deliver power to the board. I also confirmed that the Mictor-38 connector takes power from the MCU_PER PMIC VPRE (3.3V).

I kindly request your assistance in resolving this issue.

Best Regards,
Bhavay Sen

Toolchain installation error

Hi, I have followed the instructions for setting up the environment here , but I am getting strange errors. Happened both with source and latest release:

  • The test fails

PS C:\Users\nremi\Documents\foxbms-2> tools\utils\cmd\run-python-script.bat tests\env\packages_test.py -f tests\env\conda_env_win32.json
Traceback (most recent call last):
File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 156, in
main()
File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 96, in main
raise BaseException("Environments differ.")
BaseException: Environments differ.
PS C:\Users\nremi\Documents\foxbms-2> tools\utils\cmd\run-python-script.bat tests\env\packages_test.py -f tests\env\conda_env_win32.json
Traceback (most recent call last):
File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 156, in
main()
File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 96, in main
raise BaseException("Environments differ.")
BaseException: Environments differ.

  • waf configure and ide.bat both fail with a package error

PS C:\Users\nremi\Documents\foxbms-2> .\waf configure
Waf: The wscript in 'C:\Users\nremi\Documents\foxbms-2' is unreadable
Traceback (most recent call last):
File "C:\Users\nremi\Documents\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Scripting.py", line 102, in waf_entry_point
set_main_module(wscript)
File "C:\Users\nremi\Documents\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Scripting.py", line 142, in set_main_module
Context.g_module=Context.load_module(file_path)
File "C:\Users\nremi\Documents\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Context.py", line 362, in load_module
exec(compile(code,path,'exec'),module.dict)
File "C:\Users\nremi\Documents\foxbms-2\wscript", line 61, in
import jsonschema
ModuleNotFoundError: No module named 'jsonschema'`

  • manually adding the jsonschema package to the conda environment will just trigger yet another missing package error

Thanks for your support!

Variables defined 3 times with differrent values

Hello,

While looking through the code I found out that the macro BC_VOLTAGE_MAX_MSL_mV is defined in 3 files: panasonic_ncr18650bd.h, lg_inr18650mj1.h and battery_cell_cfg.h.
That macro has different values according to which files it has been defined in. It takes two values: 4200 or 2800.

Which one should I use ?

in continuation to Issue no. 36.

Issue No. 36

Thanks for the reply, Team foxBMS. However, I noticed that the documentation you attached (documentation) does not mention anything about the Ignition signal. I found a section in the documentation (SBC SECTION 4.34) which mentions the requirement for an Ignition signal, but it does not specify the rating of the signal. I believe this information should be included in the Electrical Connection section. while as I asked the query regarding the powering up the MCU with PMIC without the INIT_FS commands.

Just imagine, Processor is not programmed yet and the PMICs are programmed with the OTP. but in the state machine diagram there is a point where we have to write INIT_FS registers to power up the IC otherwise it will reset in 256uS window. Now, without the power I cannot program the processor and the PMIC is not starting because it is not getting the INIT_FS values.

I am looking forward to your response.

Best Regards,
Bhavay Sen

gui.bat not working

Hello,

When I try to run .\tools\gui\gui.bat, the program is able to find which pcan I am using.
But then it just stop. It seem to failed when it's trying to do the first check on baud_rate at line 84 of foxbms_gui.py.

Error in ADC driver

Hi there,

thanks for this project. Very well structured.

Ever wondered why ADC measurements are off? And can get negative? The ADC equation in the TI TRM is formulated backwards (adc counts as function of input voltage). It has been implemented like this in adc.c. That is wrong. The function needs to be inverted first, so:

static float ADC_ConvertToVoltage(u16 adcCounts)
{
    /** For details to equation see Equation 32 in Technical Reference Manual SPNU563A - March 2018 page 852 */
    float result_mV = (((adcCounts + 0.5f) * (ADC_VREFHIGH_mV - ADC_VREFLOW_mV)) / ADC_CONV_FACTOR_12BIT) + ADC_VREFLOW_mV;

    return result_mV;
}

I have also removed the cast in the call to ADC_ConvertToVoltage and renamed that function appropriately.

What is your policy on pull requests? Do you like reports like this or would you rather have a PR?

Best

Power sequencing and delay for both the PMIC.

Hi ,
I'm receiving an error with Fox BMS code that says ABIST2 fail and BAD_WD_TIMING (wrong window, timeout, or bad WD refresh).
Please find the fail and safe register value after the FS85_InitializeFsPhase for reference.

I have not made any modifications to the code; I am using the same version of fox BMS2.

**- grl_flags 0xE5

  • iOvervoltageUndervoltageSafeReaction1 0x9C30
  • iOvervoltageUndervoltageSafeReaction2 0x44E2
  • iWatchdogConfiguration 0x8120
  • i_safe_inputs 0x58E1
  • iFailSafeSateMachine 0x5200
  • i_svs 0x318
  • watchdogWindow 0xBD80
  • watchdogSeed 0x8E5
  • watchdogAnswer 0x9CC0
  • overvoltageUndervoltageRegisterStatus 0x58E2
  • releaseFs0bPin 0x8110
  • safeIos 0x30E1
  • diag_safety 0x5100
  • intb_mask 0xC08
  • states 0xBD80**

Here, the configured value in FS85_InitializeFsPhase and the register value are not matching.

code

Best regards,
Arjun.

CAN not working with the master

Greetings,
Thank you for your continuous help. Whenever I try to run CAN with foxgui, it seems to give me this error. I have checked the CAN connections and everything seems to be fine.

DEBUG:root:Logging level: DEBUG
INFO:root:Checking for pcan in ['PCAN_USBBUS1', 'PCAN_USBBUS2', 'PCAN_USBBUS3', 'PCAN_USBBUS4', 'PCAN_USBBUS5', 'PCAN_USBBUS6', 'PCAN_USBBUS7', 'PCAN_USBBUS8', 'PCAN_USBBUS9', 'PCAN_USBBUS10', 'PCAN_USBBUS11', 'PCAN_USBBUS12', 'PCAN_USBBUS13', 'PCAN_USBBUS14', 'PCAN_USBBUS15', 'PCAN_USBBUS16']
DEBUG:root:Checking PCAN_USBBUS1 (0)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS1', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS2 (1)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS2', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS3 (2)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS3', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS4 (3)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS4', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS5 (4)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS5', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS6 (5)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS6', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS7 (6)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS7', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS8 (7)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS8', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS9 (8)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS9', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS10 (9)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS10', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS11 (10)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS11', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS12 (11)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS12', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS13 (12)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS13', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS14 (13)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS14', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS15 (14)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS15', 'interface': 'pcan'}
DEBUG:root:Checking PCAN_USBBUS16 (15)
DEBUG:can:can config: {'state': <BusState.ACTIVE: 1>, 'channel': 'PCAN_USBBUS16', 'interface': 'pcan'}
INFO:root:Connected CAN adapters: [<can.interfaces.pcan.pcan.PcanBus object at 0x0000017DA6DA3490>]
DEBUG:root:CAN adapter: PCAN_USBBUS1
DEBUG:root:BAUD rate: 500000
DEBUG:root:CAN Logging: None
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
Bus error: an error counter reached the 'heavy'/'warning' limit
DEBUG:root:SyncThread was canceled.
DEBUG:root:PeriodicSendThread was canceled.

wrong version in WAF?

Hello foxBMS-team,

for some projects i searched for an open-source-BMS and found this awesome work. After getting familiar with the docs and the toolchain i tried to build the application, but encounteres some problems. After following the setup descripted in the docs i can't build the application, just getting an error message:

Build failed Traceback (most recent call last): File "E:\01_Repos\07_FoxBMS\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Task.py", line 180, in process ret=self.run() File "E:\01_Repos\07_FoxBMS\tools\waf-tools\f_ti_arm_cgt.py", line 1172, in run self.generator.bld.fatal( File "E:\01_Repos\07_FoxBMS\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Context.py", line 261, in fatal raise self.errors.ConfigurationError(msg,ex=ex) waflib.Errors.ConfigurationError: Extracted version from git repo (1.1.0) does not match version defined in waf (1.1.1).

after going back to the version 1.1.0 i'm able to build the binaries.
Probably there is a small typo in some configs or scripts for WAF?

Kind regards.

Error(s) in MXM driver: balancing control

suspect, there are two mistakes in the balancing control driver of the mxm driver.
both are located in:
mxm_17852.c

1st: line 408:
pState->batteryCmdBuffer.msb &= ((uint8_t)1u << 7u); /* set CBRESTART bit */
because the Bit CBRESTART is active high, it should be set. actually the highByte of MXM_REG_BALSWCTRL is getting zeroed out by the command and the timeout-restart-bit is not set. also see the datasheet, page 310 and page 311 for CBRESTART
-> pState->batteryCmdBuffer.msb |= 1<<7;

2nd: line 468:
pState->batteryCmdBuffer.lsb = 0x0EU; -> enable balancing switches for a minimum amount of time.
i would suggest to change to 0xEEu or even 0xFEu to bring the balancing duty to 93,75% or even its maximum if possible between measurements (not sure, EE works fine for me).

after this two changes the balancing driven by the max17852 works.
the alternating balancing scheme between even and odd cells could be seen as well (works).

SOA - Battery Pack Overcurrent

Packovercurrent is being checked for Cell Current Limit Violation at line 335 in <soa.c>.
Wouldn't the pack current be much greater than Cell Current Limit.
Also there exists a function for Pack current limit violation however was not able to find the usage for it.

Cellvoltage Invalid flag

While running gui after connecting all firmware with source code we are recieving cellvoltage invalid flag, will you please suggest the solution.
Regards
candata
candata2

SBCS does not power the MCU

Greetings FoxBMS team,

So I got foxbms master board manufactured from eurocircuit. I also got the debugger and setup the softwares and environment. Today, I powered the master but the MCU 3.3V or the PER 5V LED does not light up. I have diagnosed with DMM that the SBCS does get the 12V from VSUP 30 but somehow does not output the 3.3V required to run the MCU. As such the master is not working for me. I would be extremely grateful if you can help me find what went wrong. Thank you so much!

Slave card MC33775A

Dear Foxbms Team,
We are applying 14 cell voltages in slave cards MC33775A.
TPL low signal applied as an input signals through interface MC33664A in Pin no 45 and 46. but TPL High as an output do not give any output signals in pin no. 47 and 48.

Regards
Prahlad

Error when using gui.bat

File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\runpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\runpy.py", line 147, in _get_module_details
return get_module_details(pkg_main_name, error)
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\runpy.py", line 111, in get_module_details
import(pkg_name)
File "d:\BMS_code_workspace\battery_management_system\fox_bms\tools\gui\fgui_init
.py", line 64, in
resp = html.request(FOXBMS_DOC_URL, "HEAD")
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\site-packages\httplib2_init
.py", line 1725, in request
(response, content) = self.request(
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\site-packages\httplib2_init
.py", line 1441, in _request
(response, content) = self.conn_request(conn, request_uri, method, body, headers)
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\site-packages\httplib2_init
.py", line 1363, in conn_request
conn.connect()
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\site-packages\httplib2_init
.py", line 1155, in connect
self.sock = self._context.wrap_socket(sock, server_hostname=self.host)
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\ssl.py", line 1040, in _create
self.do_handshake()
File "C:\Users\Akhilesh\miniconda3\envs\2023-02-fennec-fox\lib\ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)

Cell Voltage Transmission Code Fix

Hello, there is an issue in lines 76 & 77 of the can_cbs_tx_voltage.c file, particularly regarding the start bits. Cell voltage 2 has the start bit for cell voltage 3 and cell voltage 3 overwrites cell voltage 0. The correct start bits to correctly line up with the dbc file are 11, 30, 33, 52.

conda environment no longer installable

There is currently an unresolved bug when trying to create the conda environment on Windows (conda_env_win32.yaml).
This bug revealed to happen since ca. 2 weeks; before installing the environment has worked with any issues for more than a year.

Bug: The pip install process exits with an unresolvable dependency error. As all dependencies are exactly pinned, it is currently unknown why this happens.

Once we have figured out a way to work around this, we will post it here.

Manufacturing FoxBMS master

Greetings FoxBMS ppl,

I would like to know if there is a PCB manufacturer recommended by FoxBMS (in germany). I am trying to get the foxbms master manufactured for a project but the manufacturer I know seems to be taking too long (14 weeks+). I would be very grateful for the recommendation. Thank you for your time!

Programming the SBC chip results in smoke

Greetings,

So I am running the SBC chip in emulated mode with the voltages written in the schematic of the master board. When I remove the debug pin, the part BUK9K13-60EX sizzles and some smoke comes out. After that I am thrown out of test mode from Flexgui. I don't really understand what could be the issue.

Facing Issue while re-installation

 Iam facing an error with the software installation of the "foxbms", I followed the steps for installation in the given sequence and it was working good in the past. Now it just started to pop an error in the building process as below:

      ""C:\Users\Kumar\Documents\foxbms-2>tools\utils\cmd\run-python-script.bat tests\env\packages_test.py -f tests\env\conda_env_win32.json Traceback (most recent call last): File "C:\Users\Kumar\Documents\foxbms-2\tests\env\packages_test.py", line 51, in import pathlib ModuleNotFoundError: No module named 'pathlib'""

                  I tried many ways solving the problem. But the end result was the same, struggling for the "pathlib" library to recognize. It couldn't build the project.
0011

Difference between variants

Hello!
Can someone please tell me what is the difference between Foxbms master variants? I by mistake ordered the production variant. Does that make any difference? Would it still work as intended? Thank you so much for the help.

No flashing capabilities?

In foxbms 1 master, you could directly flash the binary code on the MCU without any debugger. Is there a similar case for foxbms 2 as well? As far as I can see, the only way to download the code onto the master board is to use an expensive debugger.

Static to Dynamic assignment of database memory

/**

  • @brief Number of parallel strings in the battery pack
  • @details For details see
  •      <a href="../../../../introduction/naming-conventions.html" target="_blank">Naming Conventions</a>.
    
  •      Implementation detail: The number of parallel strings cannot exceed
    
  •      #GEN_REPEAT_MAXIMUM_REPETITIONS unless the implementation of the
    
  •      repetition macro is adapted.
    
  • @ptype uint
    */
    #define BS_NR_OF_STRINGS (1u)

/* safety check: due to implementation BS_NR_OF_STRINGS may not be larger than GEN_REPEAT_MAXIMUM_REPETITIONS */
#if (BS_NR_OF_STRINGS > GEN_REPEAT_MAXIMUM_REPETITIONS)
#error "Too large number of strings, please check implementation of GEN_REPEAT_U()."
#endif

/**

  • @brief number of modules in a string
  • @details For details see
  •      <a href="../../../../introduction/naming-conventions.html" target="_blank">Naming Conventions</a>.
    
  • @ptype uint
    */
    #define BS_NR_OF_MODULES_PER_STRING (1u)

/**

  • @brief number of cells per module
  • @details number of cells per module, where parallel cells are
  •      counted as one cell block.
    
  •      For details see
    
  •      <a href="../../../../introduction/naming-conventions.html" target="_blank">Naming Conventions</a>.
    
  • @ptype uint
    */
    #define BS_NR_OF_CELL_BLOCKS_PER_MODULE (18u)

Currently database structures are statically allocated, we should allocate them dynamically. This would help to have single compiled code for all requirements. User can configure it using GUI.

Let me know if you find this feature useful, can contribute by writing base layer for it.

out of bounds

src/app/driver/afe/nxp/mc33775a/nxp_mc33775a.c line 549
Code:
uint16_t uid[3u] = {0};
...
for (uint8_t j = 0u; j <= 3u; j++) {
n775_state->n775Data.uid[n775_state->currentString][i - 1u] |= ((uint64_t)uid[j]) << (16u * j); // uid[j] out of bounds
}

Source files for foxbms-2

Are you planning on offering the Altium project for the fox BMS 2 Master? The only thing I can find at the moment is a PDF of the schematics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.