cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a single usable HAL Documentation for L4 series?

RFlec.1
Associate II

Hello!

I downloaded "Description of STM32L4 HAL and low-layer drivers UM1884" and am trying to learn how to program STM32 Microcontrollers, but the descriptions of the functions are lacking, to say the least. The document even refers to header files and reference manuals on some places. Are they serious? The function names themselves also are not in the Bookmarks tree of the PDF file. It reminds me a bit of a Microsoft Documentation of Analysis Services from 20 years ago.

Just an example: I'm trying to find out what it means if I configure a DMA Channel for sending via UART with a circular buffer. The HAL documentation by itself doesn't answer that question. It's really quite frustrating. The Arduino library for ESP32 is better documented. At least they have an online reference. The online reference I found for STM32 looks like it's at the very beginning.

Many Greetings!

Remo

4 REPLIES 4

"trying to learn how to program STM32 Microcontrollers"

Do you have experience with programming any other microcontroller(s) ?

Or with programming in general ?

"what it means if I configure a DMA Channel for sending via UART with a circular buffer"

That would be something to look-up in Reference Manual for the chip itself.

(yes, one could argue that rather defeats the object of a HAL - which should abstract you away from having to look-up details of the underlying hardware)

RFlec.1
Associate II

Yes I believe I have quite some programming experience. I even wrote some Code for STM32 with VisualGDB a long time ago without using any HAL or LL and just using Register Definitions like I also used for Atmel. I remember this being easier. At least you can do that with one single documentation. I wouldn't mind seeing a reference to the Reference Manual to go deeper with some subjects, but it completely defeats the purpose of a HAL if I can't use it with its own documentation. But what really ticked me off is in mentioned HAL documentation on page 321 under "DMA HAL driver macros list". No detailed explanation of the macros whatsoever and the Note: "You can refer to the DMA HAL driver header file for more useful macros". Seriously!?

This is a primarily user-driven forum with only casual ST presence. You may want to contact ST directly with your complaints. Maybe you'll be able to get a full refund... ;)

But consider the possibility that you simply missed Cube/HAL's point. It is primarily intended to make good impression by allowing rapid generation of code for typical problems (whichever they may be) by clicking in CubeMX. The clicky IDE is supposed to be self-explanatory, this you are not supposed to dig much deeper.

There's also a whole bunch of related videos and step by step tutorials, again mostly assuming at "typical usage". There are also third party materials, libraries, books, dealing with Cube/HAL. There are also further libraries/environments/whatnot building upon it, e.g. mbed, again aimed at arduinoish experience.

If you want something else, you may perhaps be better off avoiding Cube, especially since you are already somewhat familiar with the normal programming methods.

JW

What makes you so sure that CubeMX and HAL are just there to "look good"? Did you ever develop with the Cypress UI? In my opinion this is the future and not just a gimmick. And a good and free documentation together with development tools are the basis to educate future generations of developers. Every big company wants as many available developers for their systems as possible. Oracle and Microsoft learned this 20 years ago, when they began to offer their developer tools for free and when Microsoft began to up their game in documentation.