cancel
Showing results for 
Search instead for 
Did you mean: 

HAL vs standard peripheral library

hosweetim
Associate II
Posted on December 30, 2014 at 15:10

I just got STM32F4 discovery board, and i was reading the manual about the sample application and I got confused with 2 driver libraries provided by STM

What is the difference between HAL in (STM32Cube_FW_F4_V1.3.0 folder) and Standard peripheral library (STM32F4-Discovery_FW_V1.1.0 folder)

Just version different?
3 REPLIES 3
Posted on December 30, 2014 at 17:12

Just version different?

Different paradigm/abstraction.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
hosweetim
Associate II
Posted on December 31, 2014 at 03:10

What do you mean by that? Do you mind elaborate more? 

I see the src files, both are providing the same functionalities ( but i could see that in the HAL driver, it has more (eg: ethernet,usb support and etc)

So which is recommended or better?

Thanks!

Posted on December 31, 2014 at 04:38

What do you mean by that?

They approach a different problem, in a different direction?

Do you mind elaborate more?

I'd really rather not. Please try one of the half dozen or more identically titled topics.

So which is recommended or better?

Are you trying to drive nails or screws? You're asking the wrong question.

What's right for you might be different for me. If you like hardware a lot, program at a register level, if you like to code relatively quickly and cleanly with a thin but robust and stable abstraction use the SPL, if you want others to supply all the functionality and understanding and tie you to their vision of the universe with a thick, deep abstraction then use HAL/Cube.

On the other hand ST is pretty committed to the HAL/Cube path, and it would offer the easiest migration path to their Cortex-M7 parts

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..