Aes Unit Ii
Aes Unit Ii
Aes Unit Ii
engineering
Course Title: AUTOMOTIVE EMBEDDED SYSTEMS
Course Type: SC (Professional Elective2)
Course Code: B22ENS521
Semester: V Faculty
UNIT: II Dr. A. RAGANNA,
Associate Professor
COURSE DETAILS
2. Study the principles of automotive sensors and interfacing techniques, design, model
and simulate interfacing systems with sensors.
4. Know the industry standard practices for ECU design for automotives, modeling and
analysis of application software for ECU design and development, design of ECUs for
automobiles, design of HIL and fault diagnostics.
COURSE OUTCOMES (CO’S)
On successful completion of this course; the student shall be able to:
BLOOM’S LEVEL OF THE COURSE OUTCOMES
COURSE ARTICULATION MATRIX
CONTENTS OF UNIT-II
Introduction to ARM Microcontroller
Architecture,
Memory Organization,
2. Andrew Sloss, ARM System Developer's Guide: Designing and Optimizing System
Software (The Morgan Kaufmann Series in Computer Architecture and Design).
3. Andrew N. SLoss, Dominic Symes, Chris Wright., ARM System Developer’s Guide.
REFERENCE BOOK:
5. Programming with STM32: Getting Started with the Nucleo-Board and C/C++ by
Donald Norris
COURSE RESOURCES AND READING REF
https://www.udemy.com/course/embedded-systems-bare-metal-programming/
https://www.youtube.com/playlist?list=PL0XvCDGTtp12wpZ9QyFNfsEs3DjJnJMuD
https://
www.edx.org/course/embedded-systems-essentials-with-arm-getting-started
https://
www.udemy.com/course/matlab-essentials-for-engineering-and-science-students/
https://www.udemy.com/course/matlabsimulink-biblego-from-zero-to-hero/
https://
www.udemy.com/course/model-based-development-mbd-for-automotive-using-sim
ulink/
https//www.udemy.com/course/matlab-simulink-and-stateflow/ https://
www.coursera.org/learn/matlab
https://in.mathworks.com/help/ecoder/ug/generating-code-using-embedded-coder.
JOURNALS/MAGAZINES / ADDITIONAL SOURCES
https://nptel.ac.in/courses/108/102/108102121/
WHAT IS MICROCONTROLLER?
A microcontroller is a single integrated circuit, commonly
with the following features: central processing unit –
ranging from small and simple 4-bit processors to
complex 32-bit or 64-bit processors.
o ARM7TDMI (ARM7 + 16 bit Thumb + JTAG Debug + fast Multiplier + enhanced ICE) (1994):
o One of the most important milestones for ARM in the microcontroller market was the release of the
ARM7TDMI core in 1994.
o This core became widely popular in embedded systems and microcontrollers due to its power
efficiency, performance, and versatility.
o It was adopted by companies like NXP, Texas Instruments, and STMicroelectronics, forming the
o Licensing Model:
o ARM’s licensing model, where ARM licenses its core designs to other manufacturers, was a key factor
in its rapid growth.
o Companies like STMicroelectronics, NXP, Texas Instruments, and Microchip used ARM cores to develop
their own microcontrollers.
o This approach allowed ARM to dominate the embedded systems market, as the licensed cores were
adopted in a wide range of industries including automotive, industrial automation, medical devices,
and IoT.
8. Register-Oriented Operations:
o RISC designs heavily emphasize the use of registers for computation. All arithmetic and
logic operations are performed using values stored in the processor’s registers, reducing
the reliance on slower memory operations.
9. Emphasis on Compiler Efficiency:
o The RISC philosophy assumes that complex operations should be handled by the
compiler, rather than the hardware.
o By breaking down complex operations into simpler instructions during compilation, the
processor can execute these instructions more efficiently.
o This allows the hardware to remain simple, while sophisticated optimization is handled by
the compiler, taking advantage of the processor’s features like pipelining.
ADVANTAGES OF RISC ARCHITECTURE
o It is a 32-bit processor
family that is designed
and developed by ARM
Holdings.
o One of the most
prominent features of
the ARM Cortex M
microcontroller is its
ability to reduce power
consumption while also
offering high
performance.
o It is also popular for its
affordability, reliability,
and scalability.
ARM CORTEX M- 3 ARCHITECTURE
o The Cortex-M3 is a 32-bit microprocessor.
o It has a 32-bit data path, a 32-bit register bank, and 32-bit memory interfaces.
o The processor has a Harvard architecture, which means that it has a separate instruction bus and
data bus.
o This allows instructions and data accesses to take place at the same time, and as a result of this,
the performance of the processor increases because data accesses do not affect the instruction
pipeline.
o This feature results in multiple bus interfaces on Cortex-M3, each with optimized usage and the
ability to be used simultaneously.
o However, the instruction and data buses share the same memory space (a unified memory
system).
o In other words, you cannot get 8 GB of memory space just because you have separate bus
interfaces.
o For complex applications that require more memory system features, the Cortex-M3 processor has
an optional Memory Protection Unit (MPU), and it is possible to use an external cache if it’s
ARM CORTEX-M3 FEATURES
1. 32-bit RISC Architecture:
o Based on the ARMv7-M architecture, the Cortex-M3 uses the Thumb-2 instruction set,
which combines 16-bit and 32-bit instructions, providing both high performance and code
efficiency.
2. High Performance and Efficiency:
o Operating at clock frequencies up to 100 MHz, the Cortex-M3 delivers a balance of
performance and energy efficiency, making it suitable for real-time applications.
o Its Harvard architecture separates instruction and data pathways, allowing simultaneous
access to memory and improving execution speed.
3. Low Power Consumption:
o Designed for energy-sensitive applications, the Cortex-M3 offers various power-saving
modes, including sleep and deep sleep modes.
o This helps extend the battery life in portable devices and reduces power usage in
industrial applications.
4. Interrupt Handling with NVIC:
o The Nested Vectored Interrupt Controller (NVIC) supports up to 240 interrupts with
configurable priorities.
o It allows fast and efficient interrupt processing, essential for real-time systems.
o Supports tail-chaining and late-arrival interrupts, which minimize the overhead in
ARM CORTEX-M3 FEATURES
1. Integrated Debugging Features:
o The Cortex-M3 includes integrated debugging capabilities with the use of Serial Wire Debug (SWD)
and JTAG interfaces.
o It supports real-time debugging and analysis through the Instrumentation Trace Macrocell (ITM) and
the Data Watchpoint and Trace (DWT) unit, allowing developers to trace the execution of their
programs.
2. Memory Protection Unit (MPU):
o The MPU provides memory region protection, preventing unauthorized access to specific memory
regions.
o This is particularly useful in embedded systems running an RTOS, where tasks need to be isolated
from each other for reliability and security.
3. Efficient Exception and Fault Handling:
o The Cortex-M3 has an efficient exception mechanism with a fixed 12-cycle latency for interrupt entry
and exit.
o It includes several fault handlers for detecting and managing errors like bus faults, memory
management faults, and usage faults, ensuring system robustness.
4. Bus Architecture:
o It uses the AMBA 3 (Advanced Microcontroller Bus Architecture) AHB-Lite for connecting the core to
high-speed peripherals and memory.
o This ensures that data is transferred efficiently between the core and external peripherals or
memory.
ARM CORTEX-M3 FEATURES
CONT..
1. Rich Set of Peripherals:
o ARM Cortex-M3 microcontrollers often come
with a wide range of on-chip peripherals,
which may include:
Timers and counters
Analog-to-Digital Converters (ADC)
Pulse Width Modulation (PWM)
UART, SPI, I2C interfaces for
communication
DMA (Direct Memory Access)) for efficient
data handling
2. Thumb-2 Instruction Set:
o Thumb-2 allows for both 16-bit and 32-bit
instructions, providing a good balance
between performance and code density.
o This helps reduce memory usage while still
maintaining high execution speed for more
complex operations.
Fig. The Relationship between the Thumb Instruction Set in
Thumb-2 Technology and the Traditional Thumb.
ARM CORTEX-M3 FEATURES
CONT..
1. Thumb-2 Instruction Set:
o Thumb (Thumb-1) uses 16-bit instructions to
reduce memory usage, making programs
smaller but with limited functionality compared
to full ARM instructions.
o Thumb-2 extends Thumb by introducing both
16-bit and 32-bit instructions, offering a balance
between code size and performance.
o It allows developers to use compact 16-bit
instructions for simple tasks and powerful 32-bit
instructions for complex operations, without
switching back to ARM mode.
o Thumb-2 is more flexible and performs better,
making it ideal for modern embedded systems
like the ARM Cortex-M series.
ARM CORTEX-M3 FEATURES CONT..
Applications:
Automotive Systems:
Consumer Electronics:
Medical Devices:
IoT Devices:
ARM CORTEX-M3 MEMORY ORGANIZATION
o The memory
organization of the ARM
Cortex-M3 is divided
into various regions to
support efficient
memory access and
operation.
o Example,
0x1000 : MOV R0, PC ; R0 = 0x1004
ARM CORTEX-M3 REGISTER
CONT..
1. SPECIAL REGISTERS
o The special registers in the
Cortex-M3 processor include the
following
i. Program Status registers
(PSRs)
ii. Interrupt Mask registers
(PRIMASK, FAULTMASK, and
BASEPRI)
iii. Control register (CONTROL)
o Special registers can only be
accessed via MSR and MRS
instructions; they do not have
memory addresses:
ARM CORTEX-M3 REGISTER CONT..
A. Program Status Register (PSR):
o The PSRs are subdivided into three status
registers:
1. Application Program Status register
(APSR)
2. Interrupt Program Status register (IPSR)
Table. Combined Program Status Registers (xPSR) in the Cortex-M3.
3. Execution Program Status register (EPSR)
o The three PSRs can be accessed together or
separately using the special register access
instructions MSR and MRS.
o When they are accessed as a collective item,
the name xPSR is used.
o You can read the PSRs using the MRS
instruction.
o You can also change the APSR using the MSR
instruction, but EPSR and IPSR are read-only.
o For example:
o If you compare this with the Current Program Status register (CPSR) in ARM7, you might find that some bit
fields that were used in ARM7 are gone.
o The Mode (M) bit field is gone because the Cortex-M3 does not have the operation mode as defined in ARM7.
Thumb-bit (T) is moved to bit 24.
o Interrupt status (I and F) bits are replaced by the new interrupt mask registers (PRIMASKs), which are separated
from PSR.
o For comparison, the CPSR in traditional ARM processors is shown in above Table. Current Program Status
Registers in Traditional ARM Processors.
1..
ARM CORTEX-M3 REGISTER
CONT..
Interrupt mask registers
o PRIMASK: Controls the disabling of all exceptions,
except the Non-Maskable Interrupt (NMI).
o It is useful for critical sections where you need to
ensure that no interrupt disrupts the execution.
o FAULTMASK: If set, it disables all exceptions,
including Hard Faults, but NMI can still occur.
o BASEPRI: It is used to mask interrupts of priority
levels below a certain threshold. It's useful for
allowing higher-priority interrupts while disabling
lower-priority ones.
1. Control Register (CONTROL):
o The CONTROL register determines the current
privilege level (privileged or unprivileged) and
which stack pointer (MSP or PSP) is currently in
use.
o CONTROL [0]: Sets the privilege level (0 for
privileged, 1 for unprivileged).
o CONTROL [1]: Determines the active stack
ARM CORTEX-M3 REGISTER SUMMARY
Register Description
R0-R12 General-purpose registers for holding variables and temporary data
R13 Stack Pointer (SP), points to the top of the current stack
R14 Link Register (LR), stores return addresses
R15 Program Counter (PC), holds the address of the next instruction
PSR Program Status Register, provides status and execution state
PRIMASK Primary Interrupt Mask, enables/disables interrupts
BASEPRI Interrupt priority mask, allows masking of lower-priority interrupts
FAULTMA
Fault Mask, enables/disables all exceptions except NMI
SK
CONTROL Controls stack pointer and privilege level
INSTRUCTION SET
What is an Instruction Set?
o An instruction set is like a list of commands the microcontroller understands.
o These commands are very basic but essential for making the system work. For example:
ADD: Adds two numbers.
SUB: Subtracts one number from another.
MOV: Moves data from one place to another.
o The Cortex-M3 uses Thumb-2 instructions, which come in two sizes: 16-bit and 32-bit.
This makes the processor very efficient because it can use small instructions for simple
tasks and larger instructions for more complex operations.
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
INSTRUCTION SET CONT..
Example:
1. LDR R0, [R1]; Load the value from memory address in R1 into R0
2. STR R2, [R3]; Store the value in R2 into the memory address in R3
INSTRUCTION SET CONT..
C. BRANCH INSTRUCTIONS
1. Branch instructions are used to change the flow of the program.
For example:
B: Unconditional branch (jump to another part of the program).
BL: Branch with link (used for function calls).
Example:
B next; Jump to the label "next" next:
MOV R0, #10; This instruction will be executed next
INSTRUCTION SET CONT..
D. CONTROL INSTRUCTIONS
1. These instructions control special processor functions, like entering low-power
mode:
WFI: Wait for interrupt (puts the processor in a low-power mode until an
interrupt occurs).
SVC: Supervisor call, used to request system-level services.
Example:
1. WFI; Enter low-power mode until an interrupt occurs
INSTRUCTION SET CONT..
E. BIT MANIPULATION INSTRUCTIONS
1. These instructions allow you to change individual bits in a register. This is
useful in embedded systems when controlling hardware:
AND: Perform a bitwise AND between two registers.
ORR: Perform a bitwise OR between two registers.
Example:
1. AND R0, R1, R2; Bitwise AND of R1 and R2, store result in R0
2. ORR R0, R0, R3; Bitwise OR of R0 and R3, store result in R0
INSTRUCTION SET CONT..
3. Instruction Format
In the ARM Cortex-M3, instructions can be 16-bit or 32-bit long:
16-bit instructions: These are shorter and take up less memory, making the code smaller.
32-bit instructions: These are more powerful and can do more complex tasks.
Example: simple program to add two numbers and store the result:
i. MOV R0, #5; Move the value 5 into R0
ii. MOV R1, #3; Move the value 3 into R1
iii. ADD R2, R0, R1; Add R0 and R1, store the result (8) in R2
iv. STR R2, [R3]; Store the result in memory location pointed by R3
o The ARM Cortex-M3 instruction set is designed to be simple, fast, and efficient.
o By learning these instructions, understand how to write programs that control real-world
devices, like robots, cars, or IoT devices.
o The balance of 16-bit and 32-bit instructions makes the Cortex-M3 ideal for applications
where performance and power efficiency are key.
o In practical terms, knowing how to use these instructions allows you to work with modern
embedded systems and optimize code for speed and energy consumption, skills highly
valuable in the embedded and automotive industries.
NVIC (NESTED VECTORED INTERRUPT
CONTROLLER)
What is the NVIC?
o The NVIC is a specialized piece of hardware
inside the ARM Cortex-M processor that
controls how the system handles interrupts.
o It supports nesting and vectoring, which makes
interrupt handling faster and more efficient.
Interrupts are signals sent by external devices
(like timers, sensors, or communication
modules) to the processor, requesting it to stop
its current task and respond to an event.
Nesting allows higher-priority interrupts to
interrupt the processing of lower-priority ones,
making sure the most urgent tasks get handled
first.
Vectoring refers to the automatic jump to the
right code (interrupt service routine or ISR)
when an interrupt occurs.
NVIC CONT..
Features of the NVIC
1. Supports Prioritized Interrupts:
o The NVIC allows each interrupt to be assigned a priority level.
o If two interrupts happen at the same time, the NVIC will process the higher-priority interrupt first.
o It also supports preemption, meaning higher-priority interrupts can "preempt" or interrupt the
processing of lower-priority ones.
2. Fast Response Time:
o The NVIC is tightly integrated with the Cortex-M processor, ensuring minimal delay when an interrupt
occurs.
o Once an interrupt happens, the NVIC immediately directs the processor to the correct interrupt
handler code.
3. Efficient Context Switching:
o The NVIC helps save and restore the processor’s state when switching between different interrupt
handlers, making sure the system can return to the task it was doing before the interrupt.
4. Low Power:
o The NVIC works well in low-power applications, as it can help the system quickly handle interrupts
and go back to a low-power state.
5. Supports up to 240 External Interrupts:
o The NVIC can handle multiple interrupt sources (up to 240 in the Cortex-M3), making it scalable for
complex embedded systems with many input/output devices.
NVIC CONT..
How Does the NVIC Work?
1. Interrupt Triggering:
o When an external event (like a button press, timer timeout, or communication event)
occurs, it generates an interrupt.
o The NVIC detects the interrupt and checks its priority.
2. Vectoring:
o The NVIC uses a vector table, a list of memory addresses where the code for handling
each interrupt is stored.
o The NVIC fetches the address from the vector table and directs the processor to run the
corresponding Interrupt Service Routine (ISR).
3. Handling Interrupts:
o The processor temporarily stops its current task and runs the ISR to handle the interrupt.
o Once the ISR finishes, the processor resumes the task it was working on.
4. Nested Interrupts:
o If a new, higher-priority interrupt occurs while handling a current interrupt, the NVIC
pauses the current ISR, handles the new interrupt, and then returns to the first one when
done. This is called interrupt nesting.
NVIC CONT..
Interrupt Priorities
We should understand the key NVIC registers involved in setting up and managing interrupts:
1. ISER (Interrupt Set-Enable Registers):
o These registers enable interrupts in the NVIC. Each bit corresponds to an interrupt.
2. ICER (Interrupt Clear-Enable Registers):
o These registers disable interrupts. Clearing the bit turns off the interrupt.
3. ISPR (Interrupt Set-Pending Registers):
o These registers indicate that an interrupt is pending (waiting to be processed).
4. ICPR (Interrupt Clear-Pending Registers):
o These registers clear the pending status of interrupts.
5. IPR (Interrupt Priority Registers):
o These registers set the priority for each interrupt.
NVIC CONT..
Interrupts/Exception
Handler Privileged MSP
handling
ADVANCED MICROCONTROLLER BUS
ARCHITECTURE
Advanced Microcontroller Bus Architecture (AMBA) is a widely adopted on-chip bus
architecture used for ARM processors, allowing peripheral designers to easily reuse designs
across multiple projects and providing plug-and-play interface for hardware developers to
improve time to market.
The Arm Advanced Microcontroller Bus Architecture (AMBA) is an open-standard, on-chip
interconnect specification for the connection and management of functional blocks in
system-on-a-chip (SoC) designs.
It facilitates development of multi-processor designs with large numbers of controllers and
components with a bus architecture.
Since its inception, the scope of AMBA has, despite its name, gone far beyond microcontroller
devices.
Today, AMBA is widely used on a range of ASIC and SoC parts including applications
processors used in modern portable mobile devices like smartphones.
AMBA is a registered trademark of Arm Ltd.[1]
Advanced Microcontroller Bus Architecture (AMBA) is a set of open standard protocols created
by ARM Holdings, widely used in System-on-Chip (SoC) designs.
The main goal of AMBA is to establish a scalable, flexible, and efficient communication
system for different components (like processors, memory, and peripherals) in an embedded
ADVANCED MICROCONTROLLER BUS ARCHITECTURE
CONT..
Why AMBA?
1. Modular Design: AMBA enables the integration of multiple IP blocks (like processors,
memory controllers, and peripherals) into a single chip.
2. Interoperability: Components designed using AMBA protocols by different vendors can
easily work together in SoC designs.
3. Scalability: AMBA protocols support various system complexities, ranging from simple
microcontroller-based designs to high-performance SoCs.
ADVANCED MICROCONTROLLER BUS ARCHITECTURE
CONT..
AMBA Architecture
AMBA defines several bus protocols to
address different performance and power
requirements within a SoC. The main buses
used in AMBA are:
1. Advanced High-Performance Bus (AHB):
o AHB is designed for high-performance,
high-bandwidth components.
o It supports features like burst transfers,
split transactions, and pipelined
operations.
o Suitable for connecting the CPU, memory
controllers, and DMA (Direct Memory
Access) controllers.
2. Advanced Peripheral Bus (APB):
o APB is optimized for low-power, low-
bandwidth peripherals.
o It has a simple interface, which reduces
the complexity of the design.
o Used for peripherals like UART, timers,
and GPIOs that don't need high-speed
ADVANCED MICROCONTROLLER BUS ARCHITECTURE
CONT..
1. Advanced eXtensible Interface (AXI):
o AXI is a more recent and flexible protocol.
o Supports high-performance features such as multiple outstanding transactions, out-of-
order data completion, and burst transactions.
o Ideal for connecting high-speed peripherals, such as GPUs, and for memory interfaces.
o AXI is commonly used in modern SoCs that require high bandwidth, such as in mobile
devices or multimedia systems.
2. AXI Coherency Extensions (ACE):
o A specialized extension of AXI to maintain cache coherency in multi-core systems.
o Essential in systems where multiple processors share memory, enabling efficient data
access across cores without data duplication.
ADVANCED MICROCONTROLLER BUS ARCHITECTURE
CONT..
How the AMBA Buses Work Together
•The different bus types in AMBA are typically organized hierarchically in an SoC:
1. High-Performance Communication:
o Components like CPUs, DMA controllers, and high-speed memory devices are connected
through the AHB or AXI bus, providing fast data transfers.
2. Low-Speed Peripherals:
o Low-bandwidth devices, such as general-purpose I/O (GPIO), timers, and UARTs, are
connected through the APB bus, optimizing power consumption and design simplicity.
ADVANCED MICROCONTROLLER BUS ARCHITECTURE
CONT..
AMBA Protocol Details
1. Advanced High-Performance Bus (AHB):
o Features: Pipelined transfers, single and burst transfers, multiple bus masters, high
throughput.
o Example: Used in memory controllers for fast access to RAM in automotive systems,
where real-time processing is required.
2. Advanced Peripheral Bus (APB):
o Features: Simple interface, low power consumption, suitable for low-latency and low-
bandwidth peripherals.
o Example: Controlling sensors or actuators in automotive systems, which don't need high-
speed communication but should be energy-efficient.
3. Advanced eXtensible Interface (AXI):
o Features: High-performance protocol supporting data bursts, out-of-order transactions,
and multiple masters.
o Example: Connecting GPUs, video processing units, or memory in systems requiring high
data throughput, such as in modern infotainment systems.
INTRODUCTION TO STM32H7XXX
MICROCONTROLLER
What is STM full form?
STM is an abbreviation which can have multiple full forms as
Short-term memory,
Software transactional memory
Synchronous transport module
Standard Time Management
Standard Test Method.
o 2017: First STM32H7 microcontrollers introduced, featuring a single Cortex-M7 core, clocked at up to
400 MHz, which was the highest-performing Cortex-M microcontroller at the time.
o 2018: The first dual-core STM32H7 models were released, combining a Cortex-M7 (up to 480 MHz)
and a Cortex-M4 (up to 240 MHz) in the same package. This innovation enabled offloading lower-
priority tasks to the M4 core, making the H7 series a versatile solution for complex, multi-tasking
embedded applications.
o 2019-2021: The STM32H7 series continued to evolve with higher clock speeds (up to 550 MHz),
enhanced security features (TrustZone, Secure Boot), and expanded memory options (up to 2 MB of
Flash memory).
o Single-core STM32H7: These chips contain only the Cortex-M7 core, focusing on applications where
high-performance is the primary requirement.
o Dual-core STM32H7: By combining Cortex-M7 and Cortex-M4 cores, these chips allow developers to
STM32H7XXX MICROCONTROLLER FEATURES
Powerful Core
Uses an ARM Cortex-M7 core running up to 550 MHz for high-speed processing.
Some versions have dual cores (Cortex-M7 and Cortex-M4), allowing efficient handling of
complex tasks.
Lots of Memory
Up to 2 MB of Flash memory (for storing programs) and 1 MB of RAM (for temporary data
storage).
External Memory Support: Interfaces for external memory devices like SDRAM, NOR Flash,
NAND Flash, and SRAM, allowing for larger memory capacity in more complex systems.
Advanced Communication
Ethernet, USB, CAN FD, SPI, UART, and I2C for connecting to networks and other devices.
Supports fast data transfer and communication with external peripherals.
Graphics and Multimedia
Has a built-in LCD display controller for graphical user interfaces (GUIs).
Includes features to handle camera input and image processing.
STM32H7XXX MICROCONTROLLER FEATURES CONT..
Analog Functions
Analog-to-digital converters (ADCs) to read sensor data.
Digital-to-analog converters (DACs) for generating audio signals or controlling analog
devices.
Real-Time Control
Includes timers for generating precise PWM signals (used in motor control, LED dimming,
etc.).
Integrated Real-Time Clock (RTC) to keep time even when the system is powered off.
Security Features
TrustZone technology for separating secure and non-secure code.
Secure Boot to ensure only trusted software runs on the microcontroller.
Built-in encryption for secure data handling.
Low Power Modes
Several power-saving modes to reduce energy consumption, making it good for battery-
operated devices.
Can maintain certain tasks (like timekeeping) while in low-power mode.
Easy Development
STM32XXX MICROCONTROLLER –ARCHITECTURE
ICode Bus: Connects the
instruction bus of the
Cortex™-M3 core to the
Flash memory instruction
interface. Instruction
fetches are performed on
this bus.
DCode Bus: Connects the
DCode bus (literal load
and debug access) of the
Cortex™-M3 core to the
Flash memory data
interface.
System Bus: Connects
the system bus of the
Cortex™-M3 core
(peripherals bus) to a bus
matrix which manages
the arbitration between
the core and the DMA
STM32XXX MICROCONTROLLER –ARCHITECTURE
DMA Bus: Connects the AHB
master interface of the DMA to
the bus matrix which manages
the access of CPU DCode and
DMA to the SRAM, Flash
memory and peripherals
Bus Matrix: Manages the
access arbitration between the
core system bus and the DMA
master bus. The arbitration
uses a round robin algorithm
AHB/APB Bridges (APB): The
two AHB/APB bridges provide
full synchronous connections
between the AHB and the two
APB buses
APB buses operate at full
speed (up to 24 MHz)
STM32XXX MICROCONTROLLER –ARCHITECTURE
Program memory, data
memory, registers and I/O
ports are organized within the
same linear 4-Gbyte address
space
Bytes are coded in memory in
little endian format
The lowest numbered byte
in a word is considered the
word’s least significant byte
and the highest numbered
byte, the most significant
Addressable memory space is
divided into 8 main blocks,
each of 512 MB
STM32XXX MICROCONTROLLER PIN DIAGRAM