Ivan Ivan

[Newbie question] StdPeriph driver and HAL driver

Discussion created by Ivan Ivan on Aug 9, 2017
Latest reply on Aug 9, 2017 by Clive One

I have been writing code for stm32 MCUs for almost a 4 months. I have noticed that there are 2 different libraries for stm32: StdPeriph (it has no prefix, like stm32f7xx_gpio.c) and HAL (I mention here packages based on HAL, such as subroutines with BSP prefix).

But now I have got a little question: How do these libraries relate? Are these different approaches? Do StdPeriph and HAL claim the same abstraction level in code ecosystem brought by MCD Team? Experienced people do not trust to HAL library, they prefer StdPeriph library (the one which is without prefix). I find that code of HAL library is perfectly documented and quite clear (learned a couple of C programming tricks while walking through code) and it is possible to perform complex tasks with it in a couple of days instead of months.

Does HAL library include StdPeriph library? Do they solve same task?