Skip to main content
Visitor II
October 14, 2020
Question

Resources for switching from HAL and low-level libraries.

  • October 14, 2020
  • 3 replies
  • 998 views

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.

    This topic has been closed for replies.

    3 replies

    Technical Moderator
    October 14, 2020

    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

    Super User
    October 14, 2020

    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

    Super User
    October 14, 2020

    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.