Skip to content

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

@Virtex7

Description

@Virtex7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions