2020-08-22 04:11 AM
i want to know which drivers require less space(small HEX FILE) and good optimization HAL or LL driver?
Solved! Go to Solution.
2020-08-22 04:34 AM
Yes, HAL takes much more code space and is terribly buggy and ineffective. And LL is useless, because it is just a register/bit redefinition and doubles the amount of information one has to learn. Using it one has to look at LL code and translate LL function names to register/bit names back and forth all the time to find them in reference manual. LL is not so terrible, but it's not very effective either, because mostly every bit is set with a separate RMW (read-modify-write) operation, while with direct register access it can be done with a single RMW in a single C code line.
2020-08-22 04:34 AM
Yes, HAL takes much more code space and is terribly buggy and ineffective. And LL is useless, because it is just a register/bit redefinition and doubles the amount of information one has to learn. Using it one has to look at LL code and translate LL function names to register/bit names back and forth all the time to find them in reference manual. LL is not so terrible, but it's not very effective either, because mostly every bit is set with a separate RMW (read-modify-write) operation, while with direct register access it can be done with a single RMW in a single C code line.
2020-08-22 05:26 AM
HAL definitely produces larger code than LL, which produces larger code than direct access.
FLASH space is typically not a concern unless you're developing on a chip with 64kB or less of RAM.