VBUS pin is 5V but the VBUS BITS reads 00 . PIC32MZ2048EFM064
I have a board on which I use PIC32MZ as USB HOST, It works okay under normal power ON/OFF conditions. But since the device will be used in scenario where there is lots of power on/off fluctuations there are some worst cases where the USB initialization procedure will freeze at WAIT_FOR_BUS_ENABLE_COMPLETE at that point the USBOTG VBUS reads 00 instead of 11 while the VBUS pin on oscilloscope reads 5V.
I am using Harmony V2.06.
I will appreciate any hints to why VBUS pin reads 5V but VBUS register reads 0.