Hi all,
I am working with uVision5, Windows 10 and MK60FN1M0VMD12 (microcontroller)
I have implemented an USB as a virtual COM on my project and all work fine. When I load my program I am able to connect/disconnect the USB from my PC (host) and the communication is good in all the scenarios, but when I power off my board and I try to connect my USB again to the PC, I have a message that the PC doesn't recognized the USB port.
I have tried to update the drivers of the USB (done), and it doesn't work.
I have tried to manage the power management of the PC (done), and it doesn't work.
I have checked that the routine of connect/disconnect USB is working good. (When I power off the board, the USB is disconnected to the PC).
When I connect the USB to the PC I do the following routine:
USBD_Initialize((uint8_t) USB_DEVICE_ID); USBD_Connect((uint8_t) USB_DEVICE_ID);
And when I disconnect the USB to the PC I do the following routine:
USBD_Disconnect((uint8_t) USB_DEVICE_ID); USBD_Uninitialize((uint8_t) USB_DEVICE_ID);
All is good until I power off the board and try to connect again the USB to my PC.
The UART module works in all scenarios, so I suspect that I am forgetting something on the initialize/uninitialize routine.
Thanks all!
Hi javierrobledo,
it seems that there is a lot more going on in your program then USB :-).
You are welcome.
Best regards, Milorad