I’m in the process of migrating my firmware to device-os 2.0.1. Everything has gone well, except now I’ve got a problem with reading the PMIC status register. In code prior to 2.0.1, my Boron would return a proper state at each read. Something like 52, 116, 4, etc. Now, I am only getting this information once in a while, with most queries returning 0. My device does not have a lipo plugged in, so 0 is an impossible state.
My original code:
powerSystemStatus = (uint8_t)pmic.getSystemStatus();
Updated code for new docs info:
pmic.lock();
powerSystemStatus = (uint8_t)pmic.getSystemStatus();
pmic.unlock();
I query this value every 1-2 seconds. Is there something that has changed in device-os that would be causing this?