AnsweredAssumed Answered

Bug when I plug a USB device

Question asked by Quentin on Apr 1, 2016
Latest reply on Apr 4, 2016 by Quentin
I'm facing trouble when I try to connect a USB device (whatever it is) to my NUCLEO-F411RE. As I plug it, my program is stuck here :

Here is a little connection diagram :
The LP2980 is a linear regulator. Its ground is connected with the ST's one. The ST32 is powered by the micro-usb (U5V so).

This is how I configure my GPIOs into usb_conf.c :
GPIO_InitStruct.Pin = (GPIO_PIN_11 | GPIO_PIN_12);
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
Then I set PA6 to have 3.3V.

Has Anyone a idea about this ?