cancel
Showing results for 
Search instead for 
Did you mean: 

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.

SAMIN.1
Associate III
 
7 REPLIES 7

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

> 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".

I am working on a project, whose input and output changes after every 2us, and 90Mhz is the minimum required frequency. Is HALL or LL libraries can perform this task?

You have to try.

JW

Perhaps.

But a 2us/500kHz application cycle will not work, neither Cube/HAL, nor LL or direct register access.

i am using 168Mz stm32f4vgt6 MCU.

specifically, I want to study or seek a course regarding MCU. however, I am confused to go for bare metal programming or for HAL and LL structure for my project which required a very high speed. Mostly, work on A/D, D/A, SPI, SDC, and counter.

SAMIN.1
Associate III

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?