cancel
Showing results for 
Search instead for 
Did you mean: 

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

chenlijun1999
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions

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
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

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
Up vote any posts that you find helpful, it shows what's working..
chenlijun1999
Associate II

Thank you very much for the answer!