Skip to main content
parth kothiya
Associate III
Mar 10, 2022 3:27 AM UTC
Solved

Which driver having lower execution time HAL or LL?

Which driver is faster from HAL or LL so cpu can perform other important tasks.

​

For example to read & write gpio

​Using HAL driver,

Using LL driver,

Using direct access MCU resistor.​

This topic has been closed for replies.
TDK
TDKBest answer
Mar 10, 2022 3:39 AM UTC

Direct register access will always be the fastest.

"If you feel a post has answered your question, please click ""Accept as Solution""."

4 replies

TDK
TDKBest answer
Mar 10, 2022 3:39 AM UTC

Direct register access will always be the fastest.

"If you feel a post has answered your question, please click ""Accept as Solution""."
parth kothiya
Associate III
Mar 10, 2022 4:06 AM UTC

Can we use both drivers in same application code writing using HAL + LL + Direct access MCU resistor all of this?​

TDK
Mar 10, 2022 4:31 AM UTC
Yes. A little silly to do so, however. Need to ensure the HAL state machine doesn’t get disturbed but your other code.
"If you feel a post has answered your question, please click ""Accept as Solution""."
S.Ma
Principal
Mar 10, 2022 3:56 AM UTC

You just described the list in increasing achievable performance level. Apart from this, maybe not all the code requires to be best performance...