Detecting USB Power on VBUS pin

I am using a nrf52833 with NCS and was wondering if there are events I can subscribe to (or polling if events don't exist) that will notify me when USB power is connected/plugged in ? This would have to detect the USB power supplied to the device (on the VBUS pin). I can detect when a device is connected using CDC to the nrf52833, but this doesn't solve the issue when a power supply is powering the device (no CDC communications).

Thanks in advance.

Parents
  • Hi

    Yes, there are two VBUS detection events you can use. We have the USBDETECTED event and USBREMOVED event that gets reported when a rising or decreasing voltage on VBUS is detected. When n VBUS rises into its valid range, the software is notified through a USBDETECTED event. A USBREMOVED event is sent when VBUS goes below its valid range. Use these events to implement the USBD start-up sequence described in the USBD chapter of the nRF52833 product specifigation.

    Best regards,

    Simon

Reply
  • Hi

    Yes, there are two VBUS detection events you can use. We have the USBDETECTED event and USBREMOVED event that gets reported when a rising or decreasing voltage on VBUS is detected. When n VBUS rises into its valid range, the software is notified through a USBDETECTED event. A USBREMOVED event is sent when VBUS goes below its valid range. Use these events to implement the USBD start-up sequence described in the USBD chapter of the nRF52833 product specifigation.

    Best regards,

    Simon

Children
Related