T-Som OTG mode not working as expected

I am trying to enable OTG power on the T-Som to provide 5.1 volts when powered from battery.

Looking at the documentation, it looks like this should work:

void enable_boost()
{
    PMIC pmic(true);
    pmic.begin();
    pmic.enableOTG();
}

However when I actually do this, I only get 5 volts for about 700 milliseconds on the PMIC pin, even if there is no load attached, then it goes back to the battery voltage minus 300 mV. I am using a completely blank example program using manual mode. I also have a periodic reset in my code, so that enable_boost() gets called after unplugging the USB cable.

OTG mode is not supported. There's a call in the bq24195 API to enable it because it the register to enable it exists in the chip, but the supporting hardware required to use it is not present on any Particle device.

If that is the case, why does the T-Som data sheet say this:

PMID

This pin is the output of the internal boost regulator of the PMIC that can source 5.1VDC from the battery in OTG (On The Go) mode. This feature is useful when your circuitry needs a 5V source from the module when powered by the battery alone.

Actual OTG mode is not supported. The PMID pin can theoretically be used, however we do not recommend doing so. The documentation has been clarified.

The problem with PMID is that if VIN exceeds 5.1 VDC, PMID follows the input voltage, so you also need to add a regulator if using PMID as the voltage will be unpredictable.

On the Tracker SoM there's already a 5V boost converter connected to CAN_5V. You should use that instead as that's what it's intended for and it does not use PMID.

2 Likes

Also it's impossible to use the PMID boost converter unless you disable the system power manager and implement the same functionality in your code. The reason is that OTG is controlled by the CHG_CONFIG bits in the Power-On Configuration Register. However, the same bit field also has the enable and disable charging bit.

The system power manager will enable and disable charging, and each time it does this, it will clear the OTG setting, which is why it's getting turned off for you.