cancel
Showing results for 
Search instead for 
Did you mean: 

Resources for switching from HAL and low-level libraries.

federico.massimi
Associate III

Hi, I've been having fun with SMT32s (CubeMX  Truestudio) for a while. Now I would like to try to switch from HAL libraries to low level ones, and maybe stop using CubeMX and write the code directly by hand.

Someone can recommend me online resource, book or tutorial that I can follow. I searched on Internet, but I found practically nothing, only general guides on ARM core or very in-depth texts (not for beginners).

Thanks in advance.

3 REPLIES 3
Imen.D
ST Employee

Hello @federico.massimi​ ,

I recommend you to refer to the User Manual "Description of STM32XX HAL and low-layer drivers" related to the family that you are using.

Example: UM1725 Description of STM32F4 HAL and low-layer drivers.

This kind of user manual meets your needs, as it details each device peripheral driver: configuration structures, functions on HAL and LL drivers.

There is mainly the STM32CubeXX MCU firmware (for each serie) with various:

  • Reference Templates for LL API that can be used to build any firmware application (provides inclusion of all LL drivers, definition of LEDs and user button, clock configuration)
  • Examples_LL, use only the LL drivers that run exclusively on Nucleo board.

Hope my answer helps you to move forward!

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Basically you have to start from scratch. Do blinky, then learn to set up clicks, then timers, serial devices, DMA, etc.

RM is your best friend.

You may want to avoid LL, as it's basically just renamed registered, with the added bonus that you don't have the documentation to them so have to translate to RM terminology anyway.

YMMV

JW

TDK
Guru

Strongly agree with @Community member​ here. Skip LL all together and program registers directly. The reference manual is an excellent source of information on how things operate at the register level. But you'll need to ditch CubeMX if you want to do this, which you may or may not be comfortable with.

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