cancel
Showing results for 
Search instead for 
Did you mean: 

Where are peripherals initialized?

FGeig.1
Associate III

I am implementing a USBPD application, using the NUCLEO-G474RE example of x-cube-usbpdm1 (it is called TCPP01_Consumer).

The example works fine, but I am a bit confused as to where all the peripherals are initalized. The MX init functions are generated, but in the example project STM32CubeMX was configured to NOT generate a function call.

I have found the place where the ADC and the GPIO pins are initalized, however, I can't find out where UCPD1, DMA or LPUART1 are initalized.

I am quite sure that the init functions generated by STM32CubeMX are never called by the example code. Where are these peripherals initalized?

1 ACCEPTED SOLUTION

Accepted Solutions
Yohann M.
ST Employee

Dear @FGeig.1​ 

UCPD1 and LPUART1 initialization are done inside the different drivers:

It is why we don't need to use the initialization function generated by CubeMX.

Regards,

Yohann

View solution in original post

2 REPLIES 2
Yohann M.
ST Employee

Dear @FGeig.1​ 

UCPD1 and LPUART1 initialization are done inside the different drivers:

It is why we don't need to use the initialization function generated by CubeMX.

Regards,

Yohann

Hi @Yohann M.​ 

Thank you very much for your quick reply, makes perfect sense now!