I just try to understand how the .ioc(cubemx) file respond to the configuration i set into my MCU and when i enable a peripheral lets say usart or whatsoever, it has to generate the code associated with setting the corresponding pins allocated to that specific peripheral(usart) but when i check the code i cant find the section where it does (i tested for a gpio and set it as output and the cubemx just generated the code (HAL_GPIO_Init) )!! how does it work? enter image description here enter image description here

Where is the code associated with the Pin configuration?

1

There are 1 answers

1
pmacfarlane On BEST ANSWER

Have a look in Core/Src, you should see a file called stm32f1xx_hal_msp.c or similar.

It will have a function in it called HAL_UART_MspInit(). This configures the GPIO pins used by your UART.