Electronics > Microcontrollers

[Stm32] Am I the only one not using HAL?

(1/19) > >>

Hi everyone
I'm an avionics technician, so embedded systems are not my field of work, but it's a hobby that I started with 8 bits MCU's a few years ago, and now I made the jump to the STM32 world. The transition was smooth because I knew about MCU and C language, so it was a logical step for me to code using registers (Hard coding) and I'm quite happy, because within a few months a coded my own library for an LCD, a Graphic LCD (monochrome), a rotary encoder  a keypad and so on using Keil uvision  (no HAL). Lately,  I wanted to make the integrated LCD on the discovery 429 work and didn't have the time to go all the datasheet, but I couldn't find any single library for the ILI9341 chipset  not using HAL. So, my question, am I the only one not using HAL ? Do I have to write all the libraries by myself?

No you're not. There is an ongoing debate on using HALs/vendor libraries or doing without them. This is a frequently debated question here.

But certainly, if you're doing without the HAL, you'll have to write a lot yourself, and will find fewer resources online.
IIRC, someone here, ataradov, has examples of doing just that for the STM32 on github. He will chime in if he reads this.

Sal Ammoniac:
You're not alone. I use STM32 parts quite often and have never used the HAL or LL drivers. I write all my own code from scratch.

There is libopenCM3 also used in the book "Beginning STM32, Developing with FreeRTOS, libompenCM3 and GCC" by Warren Gay.

ISBN-13 (pbk): 978-1-4842-3623-9
ISBN-13 (electronic): 978-1-4842-3624-6

Unfortunately LibopenCM3 does not seem to get much development and not very many processors are supported.

I have also seen a several attempts based around C++ templates. Including by David Ledger (I think that's his name, The David who was an intern on the EEVBlog) See:    

And "Jeenode" which




You are not alone :)

I too use STM32 devices without HAL and LL. Sure you have to do a lot of the work yourself, but that is hobby :-DD

Also prefer to use plain C without the standard libraries. This way you have all the control. But that is me, a work horse who started programming in assembler and does not need the fancy pansy stuff.

Trying to search through code generated with the STM cube crap is a dragon and I found it is quicker to just read the programmers manual and figure it out on your own then dig through the pile of shit the code generator created.


[0] Message Index

[#] Next page

There was an error while thanking
Go to full version