Skip to main content
omid hamdi
Associate III
August 1, 2017
Question

usb cub mx

  • August 1, 2017
  • 1 reply
  • 440 views
Posted on August 01, 2017 at 11:55

HI

ON STM32f cubmx mass storage device i need understanding device connect to pc or not 

please help me how can write program for

understand cable is connect or not 

    This topic has been closed for replies.

    1 reply

    Vangelis Fortounas
    Associate II
    August 1, 2017
    Posted on August 01, 2017 at 13:59

    Hello!

    Need more details about your hardware or your configuration..

    In general 

    hyour_device, is your initialised USB handle

    Check if..

    if(hyour_device.dev_state == USBD_STATE_CONFIGURED)

    If is TRUE means that device is connected to Host machine  and cofigured properly.