This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G5117: VBUS scan by COMP0 In TinyUSB

Part Number: MSPM0G5117
Other Parts Discussed in Thread: LP-MSPM0G5187

We are developing a USB client device using the MSPM0G5117.
We are using the LP-MSPM0G5187 LaunchPad development kit and the USB (TinyUSB) library provided by TI.

According to the application note "USB Design with MSPM0 MCUs" (sdaa280.pdf) and the LP-MSPM0G5187 LaunchPad schematic, it appears that the COMP0 pin is mapped to the VBUS detection function, as folowing.

b2ddf59e-43b0-4604-89a1-0f9f2f8c4306.pngrapture_20260917190342.png

Since our device is self-powered, we believe that detection of the USB host VBUS supply is required. Could you please confirm whether the VBUS detection function has been implemented?

In addition, could you please clarify whether the TinyUSB library can operate correctly without VBUS detection?

Thank you for your support.

  • Dear TI team,

    We would like to follow up on the matter below. Could you please provide us with an update on the current status? Thank you for your support.

    BR.

  • Dear TI Team,
    This is a gentle reminder regarding the topics below.
    Could you please share any updates?
    Best regards,
  • Dear Toshio,

    COMP0-based VBUS detection is not implemented in the standard TI TinyUSB board support reviewed in MSPM0 SDK 2.11.00.07. The board initialization does not configure COMP0 for VBUS monitoring, and the USB device driver calls dcd_connect() during initialization without checking COMP0. The schematic shows hardware available for VBUS sensing; firmware must configure and use it. See the TI board initialization and USB driver initialization.

    TinyUSB can enumerate and communicate without COMP0 monitoring while connected to a powered host. However, a self-powered USB device still requires VBUS-controlled attachment. USB 2.0 Sections 7.1.5.1 and 7.2.1 require the data-line pull-up to stop supplying current when VBUS is absent. Successful enumeration alone does not demonstrate correct self-powered disconnect behavior. See the USB 2.0 specification.

    For your application:

    • Use COMP0, an ADC, or another suitable detector to monitor host VBUS.

    • Gate initial USB attachment until VBUS is valid, and remove the D+ pull-up when VBUS disappears.

    • Integrate unplug handling with the stack’s connection state. TinyUSB provides tud_connect() and tud_disconnect(), but tud_disconnect() alone only controls the physical connection; it does not reset the stack’s mounted state. The initialization-time connection must also be addressed.

    On the LP-MSPM0G5187, J23 is unpopulated by default. It connects the divided VBUS signal to PB21/COMP0_IN0+, so that connection must be populated when using this sensing circuit. J22 is for supplying VBUS in host mode and should remain open for your device-mode setup. See the LaunchPad guide, Table 2-1.

    Brian

  • Dear Brian,

    Thank you very much for taking the time to answer my questions.
    My questions are now completely cleared, and I truly appreciate your very detailed and thoughtful explanation. Your clear guidance helped me understand the topic much better.


    Thank you again for your support and patience. I greatly appreciate your assistance.
    Best regards,