Skip to main content
SAMIN.1
Associate III
March 25, 2021
Question

Is it better to create all the libraries or do the programming from scratch or rather use the HAL and LL libraries for all the projects? I am using stm32f407 discovery board.

  • March 25, 2021
  • 2 replies
  • 1323 views

..

This topic has been closed for replies.

2 replies

waclawek.jan
Super User
March 25, 2021

There is no "better".

Cube/HAL is designed to generate code rapidly for "typical" applications by clicking in CubeMX. If your application falls into these "typical" cases, it's a win; otherwise you'll need to bend the code to your needs, and that may be then harder than expected as you'll need to gain deep understanding for both the STM32 and Cube/HAL.

Cube/LL is mostly just renaming the STM32's resources, so you'll learn things twice.

For direct register access ST provides little to no support https://community.st.com/s/ideazone#0873W000000KyjfQAC .

The choice is yours.

JW

Ozone
Principal
March 25, 2021

> The choice is yours.

Exactly.

I might add, the old SPL is still available for download for the F40x MCUs, and for the F407 discovery board.

The examples are much simpler to understand, coming without the restricting Cube framework.

They are much better suited as starting point for a direct-register-acces project.

You will need to get accustomed to studying the MCU reference manuals, though.

But you need to do that anyway, if your project leaves the narrow path of "typical use cases".

SAMIN.1
SAMIN.1Author
Associate III
March 27, 2021

As I have not use HAL or LL libraries. I just wanted to know, if a built-in HAL library is enough to do all types of projects on the STM microcontroller or not?