how to detect usb is connected at startup ?
i am using stm32l072XX
I am using USB msc mode
found below functions to detect connection and disconnection of usb in file usbd_core.c
usbd_LL_suspend(***)
usbd_LL_resume(***)
they work properly when i insert or remove usb cable(i have added print statement in both functions)(connected one end to microcontroller and other to pc)
but when i keep usb cable connected and then power on the microcontroller, these functions are not called and my code doesn't knows that usb is connected.
usb is still working as i can see in my computer(get a mass storage device), but the code in microcontroller doesn't knows it as i am watching above two functions only to detect.
How to find at startup itself that USB is connected ?
