Skip to main content
Visitor II
December 9, 2020
Solved

Where are peripherals initialized?

  • December 9, 2020
  • 1 reply
  • 1290 views

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?

    This topic has been closed for replies.
    Best answer by Yohann M.

    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

    1 reply

    Yohann M.Answer
    ST Employee
    December 9, 2020

    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

    FGeig.1Author
    Visitor II
    December 9, 2020

    Hi @Yohann M.​ 

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