Replies: 1 comment
-
I had the same problem and fixed it by commenting out autogenerated GPIO_InitTypeDef GPIO_InitStruct;
/* Configure USB FS GPIOs */
__HAL_RCC_GPIOA_CLK_ENABLE();
/* Configure USB D+ D- Pins */
GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12;
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* Configure VBUS Pin */
GPIO_InitStruct.Pin = GPIO_PIN_9;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* ID Pin */
GPIO_InitStruct.Pin = GPIO_PIN_10;
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
// Enable USB OTG clock
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
// STM32F401 doesn't use VBUS sense (B device); explicitly disable it
USB_OTG_FS->GCCFG |= USB_OTG_GCCFG_NOVBUSSENS;
USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSBSEN;
USB_OTG_FS->GCCFG &= ~USB_OTG_GCCFG_VBUSASEN; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Operating System
Windows 11
Board
Positive Point Atom stm32f429 development board
Firmware
Here's the link to the project: https://github.com/qwer-zxcv/stm32f429_usb_cdc_tinyusb Please help me out!
What happened ?
Initializing full speed usb cdc device has not been enumerated, no response from usb
How to reproduce ?
Download https://github.com/qwer-zxcv/stm32f429_usb_cdc_tinyusb工程编译固件到板子上可以复现
Debug Log as txt file (LOG/CFG_TUSB_DEBUG=2)
USBD init on controller 0, Highspeed = 0
sizeof(usbd_device_t) = 44
sizeof(dcd_event_t) = 12
sizeof(tu_fifo_t) = 12
sizeof(tu_edpt_stream_t) = 24
CDC init
guid, gsnpsid, ghwcfg1, ghwcfg2, ghwcfg3, ghwcfg4
0x00001200, 0x4F54281A, 0x00000000, 0x229DCD
20, 0x020001E8, 0x0FF08030
Fullspeed PHY init
Screenshots
No response
I have checked existing issues, dicussion and documentation
Beta Was this translation helpful? Give feedback.
All reactions