3 MCU Memory Io Mapped Structure
3 MCU Memory Io Mapped Structure
com
BIHE university
• CMSIS
• Cortex Microcontroller Software Interface Standard
• Support for creating reusable software components
for ARM Cortex-M based systems
• Low level (LL)
• Hardware Abstraction Layer (HAL)
CMSIS\Documentati
This documentation
on\Core
CMSIS-Core (Cortex-M) header files (for
CMSIS\Core\Include
example core_cm3.h, core_cmInstr.h, etc.)
Arm reference implementations of Cortex-M
Device
devices
Device\_Template_V CMSIS-Core Device Templates for extension
endor by silicon vendors
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:
o Highly Optimized o Specific to STM32 devices, not portable directly
o Register Level Access between series
o Small code expressions o Not matching complex peripherals such as USB
o Closely follows the o Lack of abstraction means developers must
reference manual understand peripheral operation at register level
o Debugging close to o Available (today) on STM32 L0 and F0 series
register level
What is it ?
Collection of C Libraries covering STM32 peripherals
Targe 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:
o Average optimization, fitting lots of o Specific to certain STM32 series.
situations o No common HAL API prevents
o No need for direct register application portability between series
manipulation o Middleware libraries may not be unified
o 100% coverage of all peripherals for each series
o Easier debugging of procedural code o Doesn’t support forward STM32 series
o Extensions for complex middleware starting with STM32 L0, L4 and F7
such as
o USB/TCP-IP/Graphics/Touch Sense
Electronics Department, HCMUT 13
STM32Cube
www. Micro Digital Ed. com
BIHE university
What is it ?
o Full featured packages with drivers, USB, TCP/IP,
Graphics, File system and RTOS
o Set of common application programming interfaces,
ensuring high portability inside whole STM32 family
o Set of APIs directly based on STM32 peripheral
registers
o Set of initialization APIs functionally similar to the SPL
block peripheral initialization functions
What is it ?
o 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
o 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 .
Features:
o High level and functional abstraction
o Easy port from one series to another
o 100% coverage of all peripherals
o Integrates complex middleware such as USB/TCP-IP/Graphics/Touch
Sense/RTOS
o Can work with STM32CubeMX to generate initialization code
Limitations:
o May be challenging to low level C programmers in the embedded
space.
o Higher portability creates bigger software footprints or more time spent
executing adaptation code
Features:
o Highly Optimized o Peripheral block initialization APIs
✓ Initialization, de-initialization and
o Register Level Access default initialization routines SPL-Like
o Small code expressions functionally speaking
o Closely follows the reference manual ✓ More optimized than SPL, fitting lots
o Debugging close to register level of situations
✓ No need for direct register
o Can work with STM32CubeMX to generate manipulation
o Initialization code for STM32L0/F0/F3/L4 ✓ Easier debugging of procedural code
Limitations:
o Specific to STM32 devices, not portable directly between series
o Not matching complex peripherals such as USB
o Lack of abstraction for runtime means developers must understand peripheral
operation at register level
o Peripheral block initialization APIs have the same limitations as the SPLs (except
availability considerations)
Limitation:
o 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
allowed
• Stm32yyxx_ll_ppp.h:
– Unitary functions for direct
register access
• Stm32yyxx_ll_ppp.h:
– Init functions
– Conceptual compatible with
SPL libraries
o Most of ppp peripherals have their own pairs of stm32xxxx_ll_ppp.c and .h files