Hi,
I use a i.MX RT105x microcontroller with USB OTG configured as Virtual COM Port device.
How can I detect in my application whether my PC is connected to the uC or not?
Is there a way to read the state of the VBUS pin (without connecting it to a GPIO)?
Thanks.
Solved! Go to Solution.
Hello Gianluca Panetta,
I recommend you refer to the example dev_cdc_vcom_freertos from the SDK. In this example, we detect when the host is connected and configured with the following statements.
if ((1 == s_cdcVcom.attach) && (1 == s_cdcVcom.startTransactions))
Have a great day,
Victor
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------
Hello Gianluca Panetta,
I recommend you refer to the example dev_cdc_vcom_freertos from the SDK. In this example, we detect when the host is connected and configured with the following statements.
if ((1 == s_cdcVcom.attach) && (1 == s_cdcVcom.startTransactions))
Have a great day,
Victor
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------