Post History
So is a HAL really just a collection of functions that when called set/reset specific register bits for my specific microcontroller? The HAL created by ST for the STM32 is a relatively thin wr...
#3: Post edited
- > So is a HAL really just a collection of functions that when called set/reset specific register bits for my specific microcontroller?
- The HAL created by ST for the STM32 is a relatively thin wrapper around registers. Most functions access a register (or a few related registers) and perform some useful low-level operation for the caller.
The STM32 HAL library (plus the STM32cubeMX) is for the entire STM32 family, not just a specific microcontroller. If you need to move the calling code to a different STM32 microcontroller (say from an F4 to a G4), it should be able to call the HAL generated for that other microcontroller. (Generally. There may be exceptions, for example the ADC code for F0 isn't compatible with F4, G4, and most of the rest STM32.)- > If so, is it really necessary to call it a HAL?
- If you want to access registers directly, you can do that without a HAL.
- In my case STM32 HAL and CubeMX saved a lot of time, accounting for the time which I've spent learning the HAL.
- *p.s.*
- At some point you'll also come across the term Board Support Package (BSP).
- > So is a HAL really just a collection of functions that when called set/reset specific register bits for my specific microcontroller?
- The HAL created by ST for the STM32 is a relatively thin wrapper around registers. Most functions access a register (or a few related registers) and perform some useful low-level operation for the caller.
- The STM32 HAL library (plus the STM32cubeMX) is for the entire STM32 family, not just a specific microcontroller. If you need to move the calling code to a different STM32 microcontroller (say from an F4 to a G4), your calling code should be able to call the HAL generated for that other microcontroller, generally. (There may be exceptions, for example the ADC code for F0 isn't compatible with F4, G4, and most of the rest STM32.)
- > If so, is it really necessary to call it a HAL?
- If you want to access registers directly, you can do that without a HAL.
- In my case STM32 HAL and CubeMX saved a lot of time, accounting for the time which I've spent learning the HAL.
- *p.s.*
- At some point you'll also come across the term Board Support Package (BSP).
#2: Post edited
- > So is a HAL really just a collection of functions that when called set/reset specific register bits for my specific microcontroller?
- The HAL created by ST for the STM32 is a relatively thin wrapper around registers. Most functions access a register (or a few related registers) and perform some useful low-level operation for the caller.
It's for the entire STM32 family, and not just you specific microcontroller. If you need to move the calling code to a different STM32 microcontroller (say from an F4 to a G4), it should be able to call the HAL generated for that other microcontroller. (Generally. There may be exceptions, for example the ADC code for F0 isn't compatible with F4, G4, and most of the rest STM32.)- > If so, is it really necessary to call it a HAL?
- If you want to access registers directly, you can do that without a HAL.
In my case STM32 HAL and STM32cubeMX saved a lot of time, accounting for the time which I've spent learning the HAL.- *p.s.*
- At some point you'll also come across the term Board Support Package (BSP).
- > So is a HAL really just a collection of functions that when called set/reset specific register bits for my specific microcontroller?
- The HAL created by ST for the STM32 is a relatively thin wrapper around registers. Most functions access a register (or a few related registers) and perform some useful low-level operation for the caller.
- The STM32 HAL library (plus the STM32cubeMX) is for the entire STM32 family, not just a specific microcontroller. If you need to move the calling code to a different STM32 microcontroller (say from an F4 to a G4), it should be able to call the HAL generated for that other microcontroller. (Generally. There may be exceptions, for example the ADC code for F0 isn't compatible with F4, G4, and most of the rest STM32.)
- > If so, is it really necessary to call it a HAL?
- If you want to access registers directly, you can do that without a HAL.
- In my case STM32 HAL and CubeMX saved a lot of time, accounting for the time which I've spent learning the HAL.
- *p.s.*
- At some point you'll also come across the term Board Support Package (BSP).
#1: Initial revision
> So is a HAL really just a collection of functions that when called set/reset specific register bits for my specific microcontroller? The HAL created by ST for the STM32 is a relatively thin wrapper around registers. Most functions access a register (or a few related registers) and perform some useful low-level operation for the caller. It's for the entire STM32 family, and not just you specific microcontroller. If you need to move the calling code to a different STM32 microcontroller (say from an F4 to a G4), it should be able to call the HAL generated for that other microcontroller. (Generally. There may be exceptions, for example the ADC code for F0 isn't compatible with F4, G4, and most of the rest STM32.) > If so, is it really necessary to call it a HAL? If you want to access registers directly, you can do that without a HAL. In my case STM32 HAL and STM32cubeMX saved a lot of time, accounting for the time which I've spent learning the HAL. *p.s.* At some point you'll also come across the term Board Support Package (BSP).
