2015-12-29 08:02 AM
Hi
I just begin in STM32L0. I using my board for dev an USB example base STM32L053R8. And I have a confused about USB connect and disconnect. I run a test case based on STM32L053R8_NUCLEO_USB for test. And I don't want USB host detect USB device till I call function USBD_Start at the code below. But the Host still detect my USB device. I have check the bit DPPU (BCDR register). It is still disable. I can not Image what is the reason /* Init Device Library */ USBD_Init(&USBD_Device, &HID_Desc, 0); /* Register the HID class */ USBD_RegisterClass(&USBD_Device, &USBD_HID); while (1); /* Start Device Process */ USBD_Start(&USBD_Device);Thank for help. Kevin #stm32l0-usb-disconnect-connect2015-12-30 06:52 AM
Likely, you are working on STM32Cube_FW_L0_V1.1.0?
And then, the stack code doesn't enable on-chip pull-up resistor until USBD_Start() is called. Does your ''dev board'' have an external fixed pull-up? Tsuneo