Question
Bug when I plug a USB device
Posted on April 01, 2016 at 16:05
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 :
Hi,
I'm facing trouble when I try to connect a USB device (whatever it is) to myhttp://www.st.com/web/en/catalog/tools/PF260320
. 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.Mode = GPIO_MODE_OUTPUT_PP;
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 ?
#usb #stm32f411re