That is an excellent question. After reading the statements more
carefully it seems ST reserves the right for none-portability:

"...
The HAL and LL are complementary and cover a wide range of applications 
requirements:
* The HAL offers high-level and feature-oriented APIs, with a
  high portability level. They hide the MCU and peripheral complexity
  to end-user.
* The LL offers low-level APIs at registers level, with
  better optimization but less portability. They require deep knowledge
  of the MCU and peripherals specifications.
..."

When they talk about family compatibility they continue to use terms
like "high" and either both APIs are mentioned or none at all (just
talking about STM32Cube in general).
The only time there seems to be a difference is in the global STM32Cube
introduction page:

"...
STM32Cube embedded software libraries, including:

    The HAL hardware abstraction layer, enabling portability between different 
STM32 devices via standardized API calls
    The Low-Layer (LL) APIs, a light-weight, optimized, expert oriented set of 
APIs designed for both performance and runtime efficiency
    A collection of Middleware components, like RTOS, USB library, file system, 
TCP/IP stack, Touch sensing library or Graphic Library (depending on the MCU 
series)
..."

Personally I've never seen a difference or discrepancy - if there was
an applicable LL api it worked for all mcu's. But that might say more
about my experience with their devices than about the real portability
of the LL.


On Wed, 28 Mar 2018 06:50:35 -0300
Fabio Utzig <[email protected]> wrote:

> On Tue, Mar 27, 2018, at 3:45 PM, markus wrote:
> > Hey Miguel,
> > 
> > as you can tell - still causing trouble ;)
> > 
> > I should have mentioned that both APIs, LL (low level) and HAL (high
> > level) are provided by ST Microelectronics and are part of their
> > SDKs.
> > 
> > Although the LL API is called "low level" it is still portable
> > between the different STM32 processor families. The big advantage
> > is that it is stateless, doesn't require big data structures, and
> > allows finer control.  
> 
> Yes, feel free to use it! Btw, is there any explicit "contract" where
> it is mentioned that they will always be portable across different
> families?

Reply via email to