~aleteoryx/muditaos

3d0e2352893ae3cdcc1eaeed08b94d4173a6b10d — Wojtek Rzepecki 5 years ago 9cc5b47
[EGD-6321] Fix max usb current

Setting proper value of
max USB current
1 files changed, 4 insertions(+), 4 deletions(-)

M module-bsp/board/rt1051/bsp/battery-charger/battery_charger.cpp
M module-bsp/board/rt1051/bsp/battery-charger/battery_charger.cpp => module-bsp/board/rt1051/bsp/battery-charger/battery_charger.cpp +4 -4
@@ 32,8 32,8 @@ namespace bsp::battery_charger
        constexpr std::uint8_t VSYS_MIN              = 0x80; // 3.6V
        constexpr std::uint8_t CHARGE_TARGET_VOLTAGE = 0x1D; // 4.35V

        constexpr std::uint8_t MAX_CHARGE_CURRENT  = 0x30; // 1600mA -> 1C
        constexpr std::uint8_t FAST_CHARGE_CURRENT = 0x0A; // 500mA
        constexpr std::uint8_t MAX_USB_CURRENT     = 0x0F; // 500mA
        constexpr std::uint8_t FAST_CHARGE_CURRENT = 0x09; // 450mA

        constexpr std::uint16_t nominalCapacitymAh = 1600;



@@ 215,9 215,9 @@ namespace bsp::battery_charger
                LOG_ERROR("Charge target voltage write fail");
            }

            value = MAX_CHARGE_CURRENT;
            value = MAX_USB_CURRENT;
            if (chargerWrite(Registers::CHG_CNFG_09, value) != kStatus_Success) {
                LOG_ERROR("Maximum charge current write fail");
                LOG_ERROR("Maximum usb current write fail");
            }

            value = FAST_CHARGE_CURRENT;