Tracker SoM stuck in TrackerFuelGauge::init() after OTA


My tracker SoM (running a custom Tracker One firmware) was stuck after an OTA and the status led was breathing white which indicates WI-FI off mode. The board was offline so the only thing I could do was manually reset the board after which it started up normally with the new software. Redoing the same update afterwards cause no issue. Since in the final product we don't have access to the reset button this could be a big problem.

The last lines I could see in the logs where:

From this I suppose the error occurs in the following piece of code in tracker.cpp:

void TrackerFuelGauge::init()
    // load model config when power on

        Notify DVOS to switch SOC bits.
        DVOS 3.3.0 and above
    auto cfg = System.getPowerConfiguration();
    //"## soc_bits == %d ##",cfg.socBitPrecision());
    if(model_config_lg18650_1S4P.bits == 19)
    {// 19 Bits
    {// 18 Bits


The message [ModelGauge] INFO: load model successfully comes from model_gauge.load_config();.

The next expected message that never comes is [ModelGauge] INFO: model verify success from verify_model();.

Any idea what cause this? Could it be because of the use of Wire without lock in some other part of the code?

It looks similar to this issue. There are two separate issues in that post, but it looks like they were able to work around the first issue, which looks most like what you are seeing.