You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code he assumes that the FET CONTROL subcommand argument is organized the same way as FET STATUS
register. This assumption is WRONG - the argument is organized as FET CONTROL register!!!!
/**
* @brief Switch the specified MOSFET(s) on (Non specified will be blocked).
*
* @param dev Pointer to the device structure for the driver instance.
* @param switches MOSFET(s) to switch on (See BQ769x2_SWITCH_*).
*
* @return 0 for success or negative error code otherwise.
*/
BQ769x2_API int bq769x2_enable_switches(const struct bq769x2 *dev,
uint8_t switches)
{
uint8_t fet_control;
int err;
fet_control = ~switches & 0x0f;
err = bq769x2_subcmd_write_u1(dev, BQ769X2_SUBCMD_FET_CONTROL,
fet_control);
return err == 0 ? 0 : -EIO;
}
bms-firmware/drivers/bms_ic/bq769x2/bq769x2.c
Lines 833 to 861 in 8f6a949
The code he assumes that the FET CONTROL subcommand argument is organized the same way as FET STATUS
register. This assumption is WRONG - the argument is organized as FET CONTROL register!!!!
See:
https://e2e.ti.com/support/power-management-group/power-management/f/power-management-forum/1453973/bq76952-possible-error-in-technical-reference-manual-concerning-fet-control/5577692#5577692
The text was updated successfully, but these errors were encountered: