STM32F107RCT7, FS USB Problem
I am having trouble with USB-FS communication with STM32F107RCT7.
When the board is connected to the PC via microUSB, the PC does not even detect something is connected to the PC.
I know that the PC detects a new device via a pull-up resistor on either DP or DM lines. In my case there needs to be 3.3V on DP pin via an Internal Resistor inside the MCU.
Checked the voltage on DP, it is zero.
Tried to debug the issue in STMCubeIDE:
I found the function responsible for USB initialization: HAL_PCD_MspInit
But there were no pin initialization for DP or DM pins.
Throughout the whole project I could'tn find any initialization on DP or DM pins.
Added the following code in HAL_PCD_Mspinit
__HAL_RCC_GPIOA_CLK_ENABLE();
GPIO_InitStruct.Pin = USB_FS_DP_Pin|USB_FS_DM_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(USB_FS_DP_GPIO_Port, &GPIO_InitStruct);Still no 3.3V on DP pin.
I cheked the DP pin on nucleo F767ZI board. There is indeed 3.3V on DP pin.
MCU is driven 25MHz
Am I missing something, could there be a solution to my problem?



