Hello,
During testing we found that whenever in system off mode, the CPU wakes from VBUS rising. As expected. We then do a vibration to notify the user the USB cable was inserted, and go back to system off mode after that. Now when we remove the usb cable again, the cpu is woken again. With RESETREAS indicating that VBUS was the single cause. We clear the reset reason register after each boot with
nrf_power_resetreas_clear(nrf_power_resetreas_get());
Is this expected behavior? And if so, is there any way to see which reason it was, removal or insertion? Currently I quickly tried this check NRF_POWER->USBREGSTATUS == 3 But that doesn't seem to work.
We use the power management module and we use the nRF52840. Our device is battery powered trough VDDH. VBUS powers a charging IC which feeds into VBAT which is connected to VDDH. We use DCDC mode on both regulators. The chip variant is QI-AAD0.