GPIO Pin Initilization for USB Port
I Created a New Project for the Following MCU's
- STM32L072CZY
- STM32F103C8T6
- STM32F401RE
I enabled the USB as Device and Also Selected Virtual Com Port as the Middleware and Generated the Project.
Upon Loading the Respective Projects to the MCU's The USB Ports were Identified as Virtual Com Port(Serial Port) on Windows OS. Thereby Confirming Device is rightly Configured and Identified on the Host System.
On Inspecting the Code in Detail, Neither in any of the Functions mentioned below, Do I see the Pin Assignment of PA11 and PA12 done. i.e. GPIO Mode, GPIO Speed, GPIO Alternating Functions, etc.
- USBD_Init
- USBD_LL_Init
- HAL_PCD_Init
- HAL_PCD_MspInit
So Where Exactly are the Pins Assigned for their roles in the MX Generated Code. or what am I missing in my Understanding?
If the same is generated for lets say UART/SPI, Such Assignments are Done in HAL_UART_MspInit() Fn. respectively.
