Skip to main content
chenlijun1999
Associate II
April 18, 2019
Solved

Are HAL_ppp_MspInit functions the only place to initialize low level resources?

  • April 18, 2019
  • 2 replies
  • 781 views

Hi everybody.

I'm met several scenarios in which the use of HAL_PPP_MspInit

would be too constraining.

A typical example is when I'm making a reusable library that needs

some peripheral. If I initialize the low level resources for the peripherals

used by the library in HAL_PPP_MspInit functions, then the application code

won't be able to use them anymore.

I've always initialized the low level resource before calling HAL_PP_Init and

it has always worked. But I would like to have your confirm that I'm doing is legitimated.

This topic has been closed for replies.
Best answer by Tesla DeLorean

Yes is it reasonable and legitimate to do clock and pin initialization elsewhere prior to usage.

2 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
April 18, 2019

Yes is it reasonable and legitimate to do clock and pin initialization elsewhere prior to usage.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
chenlijun1999
Associate II
April 19, 2019

Thank you very much for the answer!