Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
46 views

En - stm32 Embedded Software Offering

STM32Cube is STMicroelectronics' embedded software offering for STM32 microcontrollers. It provides three levels of abstraction: 1. Middleware stacks for functions like USB, TCP/IP, graphics. 2. A Hardware Abstraction Layer (HAL) with common APIs for high portability across the STM32 family. 3. Low-Layer (LL) APIs for direct register access, optimized for size and speed. LL can be used with HAL for hybrid applications. STM32Cube aims to simplify development for STM32 with full peripheral support and middleware while allowing optimization through different levels of abstraction.

Uploaded by

sreejith s
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

En - stm32 Embedded Software Offering

STM32Cube is STMicroelectronics' embedded software offering for STM32 microcontrollers. It provides three levels of abstraction: 1. Middleware stacks for functions like USB, TCP/IP, graphics. 2. A Hardware Abstraction Layer (HAL) with common APIs for high portability across the STM32 family. 3. Low-Layer (LL) APIs for direct register access, optimized for size and speed. LL can be used with HAL for hybrid applications. STM32Cube aims to simplify development for STM32 with full peripheral support and middleware while allowing optimization through different levels of abstraction.

Uploaded by

sreejith s
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

STM32 Embedded Software

Overview
STM32 Embedded Software Offer 2
Abstraction
Level

Virtual Machines
with partners
.Net, Java

IS2T, Oracle, Mountaineer,


.…

Mbed Core
« C » partners
Micrium, SEGGER,
STM32Cube HAL HCC, ….
Standard Peripheral
Libraries

STM32Cube LL
STM32Snippets

STM32 Device STM32 Series and/or STM32 Series STM32 Family Cortex-M based Any MCU Beyond MCU
-specific Device-specific -specific -specific MCUs world
f.i.: STM32F072 f.i.: STM32F1 -specific
Portability Level
ST Offering. Free
Partners Offer
3

Focus on ST’s Offer (Free)


STM32Snippets 4

• What is it ?
• A collection of code examples, directly based on STM32 peripheral registers, available in documentation and as
softtware bundles

• Targe Audience
• low level embedded system developers, typically coming from an 8 bit background, used to assembly or C with little
abstraction

• Features: • Limitations:
• Highly Optimized • Specific to STM32 devices, not portable directly between
• Register Level Access series

• Small code expressions • Not matching complex peripherals such as USB

• Closely follows the reference manual • Lack of abstraction means developers must understand
peripheral operation at register level
• Debugging close to register level
• Available (today) on STM32 L0 and F0 series

Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
+++ +
Standard Peripheral Libraries (SPL) 5

• What is it ?
• Collection of C Libraries covering STM32 peripherals

• Target Audience
• Embedded systems developers with procedural C background. All existing STM32 customer base prior to the
STM32Cube launch, willing to keep same supporting technology for future projects, and same STM32 series.

• Features: • Limitations:
• Average optimization, fitting lots of situations • Specific to certain STM32 series.
• No need for direct register manipulation • No common HAL API prevents application portability between series
• 100% coverage of all peripherals • Middleware libraries may not be unified for each series
• Easier debugging of procedural code • Doesn’t support forward STM32 series starting with STM32 L0, L4
• Extensions for complex middleware such as and F7
USB/TCP-IP/Graphics/Touch Sense

Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
++ ++ + ++ +++
STM32Cube - Embedded software 6

Introduction
• What is it ?
• Full featured packages with drivers, USB, TCP/IP, Graphics, File system and RTOS
• Set of common application programming interfaces, ensuring high portability inside
whole STM32 family
• Set of APIs directly based on STM32 peripheral registers
• Set of initialization APIs functionally similar to the SPL block peripheral initialization
functions
STM32Cube
• Target Audience STM32Cube STM32Cube
HAL LL APIs
• Hardware Abstraction Layer (HAL) APIs: embedded system developers with a strong
structured background. New customers looking for a fast way to evaluate STM32 and
easy portability
• Low-Layer (LL) APIs: low level embedded system developers, typically coming from an
8-bit background, used to assembly or C with little abstraction. Stronger focus on
customers migrating from the SPL environment.
STM32Cube - Embedded software 7

Architecture overview
• Three entry points for the user application:
User code
• Middleware stacks
• HAL APIs STM32Cube Embedded Software packages
• LL APIs

• Possible concurrent usage of HAL and LL


• Limitation: LL cannot be used with HAL for the same
peripheral instance. Impossible to run concurrent processes
on the same IP using both APIs, but sequential use is STM32Cube HAL
allowed
• Example of hybrid model: STM32Cube LL APIs
• Simpler static peripheral initialization with HAL
• Optimized runtime peripheral handling with LL calls Hardware
STM32Cube - Embedded software 8

HAL APIs
• Features:
• High level and functional abstraction
• Easy port from one series to another
• 100% coverage of all peripherals
• Integrates complex middleware such as USB/TCP-IP/Graphics/Touch Sense/RTOS
• Can work with STM32CubeMX to generate initialization code
STM32Cube
• Limitations: STM32Cube
HAL
STM32Cube
LL APIs
• May be challenging to low level C programmers in the embedded space.
• Higher portability creates bigger software footprints or more time spent executing
adaptation code

Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
+++ + ++ +++ +++
STM32Cube - Embedded software 9

Low-Layer APIs
• Features:
• Highly Optimized • Peripheral block initialization APIs
• Register Level Access • Initialization, de-initialization and
default initialization routines
• Small code expressions
• SPL-Like functionally speaking
• Closely follows the reference manual
• More optimized than SPL, fitting
• Debugging close to register level lots of situations
• Can work with STM32CubeMX to generate • No need for direct register STM32Cube
initialization code for STM32L0/F0/F3/L4. manipulation STM32Cube STM32Cube
More to com soon • Easier debugging of procedural HAL LL APIs

code
• Limitations:
• Specific to STM32 devices, not portable directly between series
• Not matching complex peripherals such as USB
• Lack of abstraction for runtime means developers must understand peripheral operation at register level
• Peripheral block initialization APIs have the same limitations as the SPLs (except availability considerations)

Optimization
Portability Easy Readiness Hardware coverage
(Memory & Mips)
+ +++ + ++ ++
ST Embedded software offer – Comparison 10

Optimization Hardware
Offer Portability Easy Readiness
(Memory & Mips) coverage

STM32Snippets +++ +

Standard Peripheral
++ ++ + ++ +++
Library
HAL
STM32Cube +++ + ++ +++ +++
APIs

LL APIs + +++ + ++ ++
ST Embedded software offer – Positioning 11
Abstraction
Level

STM32Cube Embedded Software packages


Libraries, released independently
STM32Cube Middleware level

USB FAT
TCP/I
TCP/I USB FAT Host / Gfx File RTOS Touch
RTOS P
P Host / File Touch Device Sys.
Device Gfx Sys.

STM32Cube HAL
(Hardware Abstraction Layer)
Standard Peripheral Libraries

STM32Cube LL
(Low-Layer APIs)
STM32Snippets

Portability Level
STM32 Device STM32 Series
STM32 Family (HAL)
-specific -specific
f.i.: STM32F072 f.i.: STM32F1 STM32 Series and/or
Device-specific (LL)
Availability 12

Available for STM32


Offer

STM32Snippets Now N.A. N.A. N.A. N.A. N.A. N.A. Now N.A. N.A.

Standard Peripheral
Now Now Now Now Now N.A. N.A. N.A. Now N.A.
Library

STM32Cube HAL Now Now Now Now Now Now Now Now Now Now

STM32Cube LL Now Now Now Now Now Now 2018 Now Now Now
What solution to choose ? An FAQ 13

1. I want to use a small footprint MCU, what should I use?


Abstraction has a cost. Therefore, if you need to take benefit from every single bit of memory, STM32Snippets or
STM32Cube LL will be the best choice.

2. I come from 8-bit MCU world, what should I use?


If you prefer direct register manipulation then the STM32Snippets or STM32Cube LL would be a good starting point.
However, if you prefer structure ‘C’ level programming, then we recommend using the STM32Cube HAL or SPL.

3. I today use SPL on STM32F103. Should I switch to STM32Cube?


If you intend to use only MCUs that are part of the same series in the future (in this case STM32 F1 series), then you
should remain using SPL.
If you plan to use different STM32 series in the future then we recommend considering STM32Cube as this will make it
much easier to move between series.

4. I need a mix of portability and optimization. What can I do?


You can use STM32Cube HALs and replace some of the calls with your specific optimized implementations, thus keeping
maximum portability and isolating areas that are not portable, but optimized.
HALs and LL being partially usable concurrently (no possible concurrent runtime HAL and LL processes for the same
peripheral), it is also possible to use a hybrid HAL and LL implementation to get the same advantages as mentioned
above.
Migrating between offers 14

To

From STM32Snippets SPL STM32Cube

Easy within same STM32 series HAL API: No simple migration path.
Ex: Between STM32F072 and STM32F030 Application must be rewritten
No simple migration path. Application must
STM32Snippets
be rewritten
Almost not possible between Low-Layer API: Easy within same STM32
different series series
Ex: Between STM32F072 and STM32L053 Ex: Between STM32F072 and STM32F030

Easy within same STM32 series HAL API: No simple migration path.
Ex: Between STM32F401 and STM32F429 Application must be rewritten
Standard Peripheral Some (but not all) SPL functions
Library (SPL) can be replaced with Snippets
Difficult between different STM32 series LL API: functionally equivalent functions vs
Ex: Between STM32F100 and STM32F407 SPL peripheral initialization functions

Some (but not all) HAL functions No simple migration path. Application must
STM32Cube HAL API HAL: Yes, across all STM32 families
can be replaced with Snippets be rewritten
embedded
software LL calls equivalent to snippets SPL block peripheral initialization functions LL API: Difficult between different STM32
package LL API when addressing the exact same have functionally equivalent functions in series
peripheral LLs Ex: Between STM32F407 and STM32L476
Thank you 15

/STM32 @ST_World community.st.com

www.st.com/stm32embeddedsoftware

You might also like