How to determine power source for Wisblock? whether it's USB or battery powered?

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?

Thank you.

There is no easy way to do this but to hook directly on the VBUS trace.

Btw, you should look at the base board instead of the core.

To check VBUS, you need to solder directly on its trace. That’s the only way to know if there is an input voltage coming from the USB port.

May I recommend adding a through-hole pad for this purpose if developers need it.