Is there a way in code to determine whether the Wisblock is being powered by USB port or the battery? For example, is there an IO pin that would indicate the power source?
I would like to do deep sleep when battery powered, but when USB powered, I would like to enable other features that draw more power.
From the Wisblock datasheet, it appears 3.3V is connected to the VBAT_SX pin, and this pin is NOT connected to the battery input, so if there’s some way to read this pin, I think a “high” level would indicate that the board is operating on USB power and a “low” would indicate battery operation. But I don’t know how to read this pin. Am I on the right track?