cancel
Showing results for 
Search instead for 
Did you mean: 

What method do most people use for start programming STM32 MCU?

WPong.1
Associate II

1.Assembly language

2.C language without HAL

3.C language with HAL

And why you choose that method ?

7 REPLIES 7
Javier1
Principal

3, because the code i make doesnt need to be the fastest or the most memory efficient.

So im using C with HAL (also the code is 90%reusable from chip to chip, and plenty of tutorials)

we dont need to firmware by ourselves, lets talk

The terrible performance is only a secondary "feature" of HAL. The main one is being broken and not being fixed.

Piranha
Chief II

C with my own drivers, libraries and abstraction layers. Also a sane 3rd party code like FreeRTOS, lwIP, TinyUSB and such. Why? Because with it's impossible to develop a reliable device with HAL. And creating a flexible platform with it is also a nightmare, because the HAL developers are stuck at an Arduino level.

S.Ma
Principal

Well it's hard to learn everything at once. Examples and community will work around the C with HAL and CubeMX, CubeIDE if using gcc free toolchain. Your 2 key PDF will be reference manual and datasheet. When you aim at making an end product sold to customer, you own 100% of the future possible bugfixes. At that point you may end up with your personnalized HAL or own drivers or LL for perf critical code sections.

QSHAO.1
ST Employee

3.C language with HAL.

I think it's best way to start STM32 FW development as HAL is good at HW driver level and you may benefit from this point.

Sco
ST Employee

It seems better to choose "3", because it is somewhat easier.

EXUE.2
ST Employee

it is better to select ​3.C language with HAL for a new learner:

  1. the HAL library file is generated by C language.
  2. the HAL provide the affluent resource for driver module, it it easy for a new learner to create one simple project to understand how the MCU work.
  3. there are many demo project which also based C language and HAL, it is a good example for new learner.