I wonder if the STM32F4 CubeMX peripheral HAL libraries saves the internal state of the peripherals OR if they are stateless? I am concerned about this because I want to know the possibility and safety of mixing the use of HAL libraries with direct register accesses at places where time-saving is more critical.
Answer
Look at the Low Level library (LL) this provides a much lighter weight wrapper around the registers.
You can generate the LL code from Cube by selecting LL from the advanced settings tab in the Project Manager section.
You should see a list of peripherals and be able to select HAL or LL. I have not had much joy in mixing HAL and LL so generally pick one or the other for every peripheral. As for the state held by each peripheral the best place to start looking is the reference manual Cheers.
No comments:
Post a Comment