Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error(s) in MXM driver: balancing control #9

Open
Virtex7 opened this issue Jun 17, 2022 · 1 comment
Open

Error(s) in MXM driver: balancing control #9

Virtex7 opened this issue Jun 17, 2022 · 1 comment

Comments

@Virtex7
Copy link

Virtex7 commented Jun 17, 2022

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).

@foxBMS
Copy link
Owner

foxBMS commented Jun 23, 2022

Dear @Virtex7,

many thanks for the report. We will have a look at this and come back, as soon as we have news.

Best regards,
The foxBMS Team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants