SlideShare a Scribd company logo
1 of 20
STM32 Systick
Md Rayhan Tanvir
Directory
SysTick Introduction
1
SysTick Function description
2
SysTick Basic operations
3
SysTick Introduction
SysTick Introduction
The System Tick Timer (SysTick) generates interrupt requests on a regular basis.
This allows an OS to carry out context switching to support multiple tasking.
SysTick Introduction
ARM
Cortex-M3
Timer
On-Chip
peripherals
JTAG
SWD
CPU
SysTick
NVIC
Chips from different
manufacturers
NVIC
ARM
Cortex-M3 Kernel
Nested Vector
Interrupt
Controller
SysTick is a 24-bit system clock
counter, down counting mode, it
belongs to ARM Cortex-M3 kernel
NVIC in a functional unit, often used
for operating system clock timing.
Without operating system, the Systick can
be used as a general timer/counter
JTAG & SWD
 Serial Wire Debug (SWD) is a 2-pin (SWDIO/SWCLK) electrical alternative
JTAG interface that has the same JTAG protocol on top.
SWD uses an ARM CPU standard bi-directional wire protocol.
 Joint Test Action Group (JTAG) is an
electronics industry association formed in
1985 for developing a method of verifying
designs and testing printed circuit
boards after manufacture.
NVIC (Nested Vector
Interrupt Controller)
 Asynchronous interrupts don’t wait for previous
ones to be handled - if you’re handling the last
one when a new one comes along, you either
ignore it or you have a CPU that can nest them
and handle it when you finish the current one
(or preserve the current state and handle the
new one - it depends on priority).
Downcounting
TI
Cortex-M3
NXP
Cortex-M3
TI
Cortex-M3
SysTick Introduction
Operating system code porting
Using Timers as System Clock
Can't be Carried
directly.
Can be carried
directly
µC/OS-II
Operating
NXP
Cortex-M3
µC/OS-II
Operating
Use SysTick as System Clock
SysTick Introduction
 Systick timers can be used for other purposes in
addition to operating systems: as a alarm, for
measuring time.
 Note that when the processor is called to stop
during debugging (Halt), the Systick timer will
also be suspended.
Directory
SysTick Introduction
1
SysTick Function description
2
SysTick Basic operations
3
SysTick Registers
SysTick can be configured through the 4 registers:
SysTick Structure Diagram
FLAG
RELOAD
CURRENT
0
ENABLE TICKINT
CLKSOURCE
0
1
Reload value register
Current Value Registers
Control and Status registers
Clock Interrupt
Register description
 SysTick Control and Status registers (SysTick_CSR)
COUNTFLAG CLKSOURCE TICKINT ENABLE
bit0
bit1
bit2
bit16
Counter flag bit
0: Read zeroing
1: The counting value is
reduced from 1 to 0
Clock source Selection bit
0: External reference clock-HCLK/8
1: Kernel clock-HCLK
0: No interruption
1: Allow interrupt
Interrupt Enable
bit
Counter enables bit
0: Prohibition
1: Enable
Count values from 1 to 0
triggers an Interrupt.
The bit will automatically
clear 0 after reading;
can be used for query
mode timing
SysTick Clock source
SysTick's clock
source can be
HCLK/8 or
HCLK
specifically
which can be
selected by
configuring
control and
status registers
(CTRL).
0
 Current Value Registers (SysTick_VAL)
Register description
The current value register displays the current value of the SysTick
counter. Every 1 system clock cycles, the value minus 1, when the
count is reduced to 0, can produce interrupts and load the values of
the reload value registers.
0x000003
Count Flag bit
COUNTFLAG
Interrupt
Current Value Registers
Reload Value Registers
0x000003
0x000002
0x000001
0x000000
0x000003
0x000003
1
0x000000
Any value
Write any value to zero and
cause the sign to be zeroed.
Directory
SysTick Introduction
1
SysTick Function description
2
SysTick Basic operations
3
SysTick How to Run
Select Clock Source
Set Reload values
Enable SysTick interruption
Enable SysTick counter
CTRL—>CLKSOURCE
When the count value is reduced from 1 to 0,
the interrupt is generated
Start Counter & Start Countdown
RELOAD=(SysClock * Timing time) -1
Empty Current Value Registers Automatically load reload values when the count is 0
SysTick How to Run
CURRENT
FLAG
0x000003
RELOAD
0x000000
0
ENABLE TICKINT
CLKSOURCE
0
1
Clock Interrupt
Select Kernel Clock
1 Set Reload values
2
Enable interruption
3
Enable counter
4
0x000003
0x000002
0x000000
0x000001
1
Interrupt
1 1
4 STM32's SysTick.ppt

More Related Content

What's hot

Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Mahmoud Sadat
 
8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripherals8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripheralsamrutachintawar239
 
VLSI
VLSI VLSI
VLSI So Ma
 
Arm cortex-m4 programmer model
Arm cortex-m4 programmer modelArm cortex-m4 programmer model
Arm cortex-m4 programmer modelMohammed Gomaa
 
Tips & Tricks for Motion with S7 1500 CPU
Tips & Tricks for Motion with S7 1500 CPUTips & Tricks for Motion with S7 1500 CPU
Tips & Tricks for Motion with S7 1500 CPUDMC, Inc.
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessorsobhadevi
 
Xilinx virtex 7 fpga - Semester Presentation
Xilinx virtex 7 fpga - Semester PresentationXilinx virtex 7 fpga - Semester Presentation
Xilinx virtex 7 fpga - Semester PresentationMuhammad Muzaffar Khan
 
Jtag presentation
Jtag presentationJtag presentation
Jtag presentationklinetik
 
2. block diagram and components of embedded system
2. block diagram and components of embedded system2. block diagram and components of embedded system
2. block diagram and components of embedded systemVikas Dongre
 
List of microcontroller 8051 projects
List of microcontroller 8051 projectsList of microcontroller 8051 projects
List of microcontroller 8051 projectsSushil Mishra
 
Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture amrutachintawar239
 
Memory Organisation in embedded systems
Memory Organisation in embedded systemsMemory Organisation in embedded systems
Memory Organisation in embedded systemsUthraSowrirajan1
 
communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemsRaghunath reddy
 
Programming logic controllers (plc) seminar
Programming  logic controllers (plc) seminarProgramming  logic controllers (plc) seminar
Programming logic controllers (plc) seminarmanish gharte
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.pptDr.YNM
 

What's hot (20)

Introduction to AVR Microcontroller
Introduction to AVR Microcontroller Introduction to AVR Microcontroller
Introduction to AVR Microcontroller
 
8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripherals8051,chapter1,architecture and peripherals
8051,chapter1,architecture and peripherals
 
VLSI
VLSI VLSI
VLSI
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
MicroC/OS-II
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
 
Arm cortex-m4 programmer model
Arm cortex-m4 programmer modelArm cortex-m4 programmer model
Arm cortex-m4 programmer model
 
Tips & Tricks for Motion with S7 1500 CPU
Tips & Tricks for Motion with S7 1500 CPUTips & Tricks for Motion with S7 1500 CPU
Tips & Tricks for Motion with S7 1500 CPU
 
microcontroller vs microprocessor
microcontroller vs microprocessormicrocontroller vs microprocessor
microcontroller vs microprocessor
 
Xilinx virtex 7 fpga - Semester Presentation
Xilinx virtex 7 fpga - Semester PresentationXilinx virtex 7 fpga - Semester Presentation
Xilinx virtex 7 fpga - Semester Presentation
 
Jtag presentation
Jtag presentationJtag presentation
Jtag presentation
 
2. block diagram and components of embedded system
2. block diagram and components of embedded system2. block diagram and components of embedded system
2. block diagram and components of embedded system
 
List of microcontroller 8051 projects
List of microcontroller 8051 projectsList of microcontroller 8051 projects
List of microcontroller 8051 projects
 
Introduction to stm32-part2
Introduction to stm32-part2Introduction to stm32-part2
Introduction to stm32-part2
 
AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
 
Introduction to Embedded Architecture
Introduction to Embedded Architecture Introduction to Embedded Architecture
Introduction to Embedded Architecture
 
Memory Organisation in embedded systems
Memory Organisation in embedded systemsMemory Organisation in embedded systems
Memory Organisation in embedded systems
 
Power Gating
Power GatingPower Gating
Power Gating
 
communication interfaces-Embedded real time systems
communication interfaces-Embedded real time systemscommunication interfaces-Embedded real time systems
communication interfaces-Embedded real time systems
 
Programming logic controllers (plc) seminar
Programming  logic controllers (plc) seminarProgramming  logic controllers (plc) seminar
Programming logic controllers (plc) seminar
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 

Similar to 4 STM32's SysTick.ppt

Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptxgodfrey35
 
MicrocontrollersII.ppt
MicrocontrollersII.pptMicrocontrollersII.ppt
MicrocontrollersII.pptSatheeshMECE
 
introduction to Microcontrollers 8051.ppt
introduction to Microcontrollers 8051.pptintroduction to Microcontrollers 8051.ppt
introduction to Microcontrollers 8051.pptjaychoudhary37
 
embedded system introduction to microcontrollers
embedded system introduction to microcontrollersembedded system introduction to microcontrollers
embedded system introduction to microcontrollersBarER4
 
Stm32f303 rest and Clock contol
Stm32f303 rest and Clock contolStm32f303 rest and Clock contol
Stm32f303 rest and Clock contolPrem Sanil
 
An Overview of LPC2101/02/03
An Overview of LPC2101/02/03An Overview of LPC2101/02/03
An Overview of LPC2101/02/03Premier Farnell
 
ARM stacks, subroutines, Cortex M3, LPC 214X
ARM  stacks, subroutines, Cortex M3, LPC 214XARM  stacks, subroutines, Cortex M3, LPC 214X
ARM stacks, subroutines, Cortex M3, LPC 214XKarthik Vivek
 
Microcontrollers ii
Microcontrollers iiMicrocontrollers ii
Microcontrollers iiKumar Kumar
 
Tank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUTank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUJulio César Carrasquel
 
Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...researchinventy
 
Research Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and ScienceResearch Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and Scienceresearchinventy
 
8-Bit CMOS Microcontrollers with nanoWatt Technology
8-Bit CMOS Microcontrollers with nanoWatt Technology8-Bit CMOS Microcontrollers with nanoWatt Technology
8-Bit CMOS Microcontrollers with nanoWatt TechnologyPremier Farnell
 
04 Mcu Day Stellaris 8 12b Editado
04   Mcu Day   Stellaris 8 12b   Editado04   Mcu Day   Stellaris 8 12b   Editado
04 Mcu Day Stellaris 8 12b EditadoTexas Instruments
 
Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,Technogroovy
 
Embedded systems and robotics by scmandota
Embedded systems and robotics by scmandotaEmbedded systems and robotics by scmandota
Embedded systems and robotics by scmandotascmandota
 
Microprocessors and Microcontrollers.ppt
Microprocessors and Microcontrollers.pptMicroprocessors and Microcontrollers.ppt
Microprocessors and Microcontrollers.pptSaravanan Pazapughal
 
Atmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAtmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAlexTronciu
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_controlBhukya Mangu
 

Similar to 4 STM32's SysTick.ppt (20)

Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptx
 
MicrocontrollersII.ppt
MicrocontrollersII.pptMicrocontrollersII.ppt
MicrocontrollersII.ppt
 
introduction to Microcontrollers 8051.ppt
introduction to Microcontrollers 8051.pptintroduction to Microcontrollers 8051.ppt
introduction to Microcontrollers 8051.ppt
 
embedded system introduction to microcontrollers
embedded system introduction to microcontrollersembedded system introduction to microcontrollers
embedded system introduction to microcontrollers
 
Stm32f303 rest and Clock contol
Stm32f303 rest and Clock contolStm32f303 rest and Clock contol
Stm32f303 rest and Clock contol
 
An Overview of LPC2101/02/03
An Overview of LPC2101/02/03An Overview of LPC2101/02/03
An Overview of LPC2101/02/03
 
ARM stacks, subroutines, Cortex M3, LPC 214X
ARM  stacks, subroutines, Cortex M3, LPC 214XARM  stacks, subroutines, Cortex M3, LPC 214X
ARM stacks, subroutines, Cortex M3, LPC 214X
 
Microcontrollers ii
Microcontrollers iiMicrocontrollers ii
Microcontrollers ii
 
.........
..................
.........
 
Tank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCUTank water level & monitoring solution based on the STM32L476 MCU
Tank water level & monitoring solution based on the STM32L476 MCU
 
Embedded system
Embedded  systemEmbedded  system
Embedded system
 
Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...Research Inventy : International Journal of Engineering and Science is publis...
Research Inventy : International Journal of Engineering and Science is publis...
 
Research Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and ScienceResearch Inventy: International Journal of Engineering and Science
Research Inventy: International Journal of Engineering and Science
 
8-Bit CMOS Microcontrollers with nanoWatt Technology
8-Bit CMOS Microcontrollers with nanoWatt Technology8-Bit CMOS Microcontrollers with nanoWatt Technology
8-Bit CMOS Microcontrollers with nanoWatt Technology
 
04 Mcu Day Stellaris 8 12b Editado
04   Mcu Day   Stellaris 8 12b   Editado04   Mcu Day   Stellaris 8 12b   Editado
04 Mcu Day Stellaris 8 12b Editado
 
Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,Computer Science Training,IT Training,CS Training,Computer Training Institute,
Computer Science Training,IT Training,CS Training,Computer Training Institute,
 
Embedded systems and robotics by scmandota
Embedded systems and robotics by scmandotaEmbedded systems and robotics by scmandota
Embedded systems and robotics by scmandota
 
Microprocessors and Microcontrollers.ppt
Microprocessors and Microcontrollers.pptMicroprocessors and Microcontrollers.ppt
Microprocessors and Microcontrollers.ppt
 
Atmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheetAtmel microcontrollers-a tmega328-p_datasheet
Atmel microcontrollers-a tmega328-p_datasheet
 
Course material msp430-for_automatic_control
Course material msp430-for_automatic_controlCourse material msp430-for_automatic_control
Course material msp430-for_automatic_control
 

More from MdRayhanTanvir

Lesson 7 Switching Power Supply (Lecture 4).ppt
Lesson 7 Switching Power Supply (Lecture 4).pptLesson 7 Switching Power Supply (Lecture 4).ppt
Lesson 7 Switching Power Supply (Lecture 4).pptMdRayhanTanvir
 
Lesson 4 Operational Amplifiers (Lecture 2).ppt
Lesson 4 Operational Amplifiers (Lecture 2).pptLesson 4 Operational Amplifiers (Lecture 2).ppt
Lesson 4 Operational Amplifiers (Lecture 2).pptMdRayhanTanvir
 
Lesson 3 Microprocessors (Lecture 2).ppt
Lesson 3 Microprocessors (Lecture 2).pptLesson 3 Microprocessors (Lecture 2).ppt
Lesson 3 Microprocessors (Lecture 2).pptMdRayhanTanvir
 
Lesson 11 The mobile telephone system (II) (Lecture 6).ppt
Lesson 11 The mobile telephone system (II) (Lecture 6).pptLesson 11 The mobile telephone system (II) (Lecture 6).ppt
Lesson 11 The mobile telephone system (II) (Lecture 6).pptMdRayhanTanvir
 
Lesson 10 The mobile telephone system (I) (Lecture 5).ppt
Lesson 10 The mobile telephone system (I) (Lecture 5).pptLesson 10 The mobile telephone system (I) (Lecture 5).ppt
Lesson 10 The mobile telephone system (I) (Lecture 5).pptMdRayhanTanvir
 
Lesson 28 Signal Sources (Lecture 14).ppt
Lesson 28 Signal Sources (Lecture 14).pptLesson 28 Signal Sources (Lecture 14).ppt
Lesson 28 Signal Sources (Lecture 14).pptMdRayhanTanvir
 
Lesson 27 Choosing a Real-Time Operating System.ppt
Lesson 27 Choosing a Real-Time Operating System.pptLesson 27 Choosing a Real-Time Operating System.ppt
Lesson 27 Choosing a Real-Time Operating System.pptMdRayhanTanvir
 
Lesson 6 Analog to Digital Converters (Lecture 3).ppt
Lesson 6 Analog to Digital Converters (Lecture 3).pptLesson 6 Analog to Digital Converters (Lecture 3).ppt
Lesson 6 Analog to Digital Converters (Lecture 3).pptMdRayhanTanvir
 
Lesson 5 Low-pass Filters (Lecture 3).ppt
Lesson 5 Low-pass Filters (Lecture 3).pptLesson 5 Low-pass Filters (Lecture 3).ppt
Lesson 5 Low-pass Filters (Lecture 3).pptMdRayhanTanvir
 
Lesson 2 Memory Devices.ppt
Lesson 2 Memory Devices.pptLesson 2 Memory Devices.ppt
Lesson 2 Memory Devices.pptMdRayhanTanvir
 
Lesson 1 VLSI Technology.ppt
Lesson 1 VLSI Technology.pptLesson 1 VLSI Technology.ppt
Lesson 1 VLSI Technology.pptMdRayhanTanvir
 
2 STM32's Interrupts.pptx
2 STM32's Interrupts.pptx2 STM32's Interrupts.pptx
2 STM32's Interrupts.pptxMdRayhanTanvir
 

More from MdRayhanTanvir (14)

Lesson 7 Switching Power Supply (Lecture 4).ppt
Lesson 7 Switching Power Supply (Lecture 4).pptLesson 7 Switching Power Supply (Lecture 4).ppt
Lesson 7 Switching Power Supply (Lecture 4).ppt
 
Lesson 4 Operational Amplifiers (Lecture 2).ppt
Lesson 4 Operational Amplifiers (Lecture 2).pptLesson 4 Operational Amplifiers (Lecture 2).ppt
Lesson 4 Operational Amplifiers (Lecture 2).ppt
 
Lesson 3 Microprocessors (Lecture 2).ppt
Lesson 3 Microprocessors (Lecture 2).pptLesson 3 Microprocessors (Lecture 2).ppt
Lesson 3 Microprocessors (Lecture 2).ppt
 
Lesson 11 The mobile telephone system (II) (Lecture 6).ppt
Lesson 11 The mobile telephone system (II) (Lecture 6).pptLesson 11 The mobile telephone system (II) (Lecture 6).ppt
Lesson 11 The mobile telephone system (II) (Lecture 6).ppt
 
Lesson 10 The mobile telephone system (I) (Lecture 5).ppt
Lesson 10 The mobile telephone system (I) (Lecture 5).pptLesson 10 The mobile telephone system (I) (Lecture 5).ppt
Lesson 10 The mobile telephone system (I) (Lecture 5).ppt
 
Lesson 28 Signal Sources (Lecture 14).ppt
Lesson 28 Signal Sources (Lecture 14).pptLesson 28 Signal Sources (Lecture 14).ppt
Lesson 28 Signal Sources (Lecture 14).ppt
 
Lesson 27 Choosing a Real-Time Operating System.ppt
Lesson 27 Choosing a Real-Time Operating System.pptLesson 27 Choosing a Real-Time Operating System.ppt
Lesson 27 Choosing a Real-Time Operating System.ppt
 
Lesson 6 Analog to Digital Converters (Lecture 3).ppt
Lesson 6 Analog to Digital Converters (Lecture 3).pptLesson 6 Analog to Digital Converters (Lecture 3).ppt
Lesson 6 Analog to Digital Converters (Lecture 3).ppt
 
Lesson 5 Low-pass Filters (Lecture 3).ppt
Lesson 5 Low-pass Filters (Lecture 3).pptLesson 5 Low-pass Filters (Lecture 3).ppt
Lesson 5 Low-pass Filters (Lecture 3).ppt
 
Lesson 2 Memory Devices.ppt
Lesson 2 Memory Devices.pptLesson 2 Memory Devices.ppt
Lesson 2 Memory Devices.ppt
 
Lesson 1 VLSI Technology.ppt
Lesson 1 VLSI Technology.pptLesson 1 VLSI Technology.ppt
Lesson 1 VLSI Technology.ppt
 
2 STM32's Interrupts.pptx
2 STM32's Interrupts.pptx2 STM32's Interrupts.pptx
2 STM32's Interrupts.pptx
 
3 STM32's ADC.ppt
3 STM32's ADC.ppt3 STM32's ADC.ppt
3 STM32's ADC.ppt
 
6 STM32's USART.ppt
6 STM32's USART.ppt6 STM32's USART.ppt
6 STM32's USART.ppt
 

Recently uploaded

Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxNANDHAKUMARA10
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxSCMS School of Architecture
 
Compressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI ApplicationsCompressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI ApplicationsMFatihSIRA
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)ChandrakantDivate1
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptxJIT KUMAR GUPTA
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORTanishkaHira1
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...ronahami
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...ssuserdfc773
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptamrabdallah9
 
Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...
Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...
Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...dannyijwest
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxpritamlangde
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Payal Garg #K09
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptjigup7320
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Ramkumar k
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...HenryBriggs2
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxMustafa Ahmed
 

Recently uploaded (20)

Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Compressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI ApplicationsCompressing and Sparsifying LLM in GenAI Applications
Compressing and Sparsifying LLM in GenAI Applications
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)Introduction to Artificial Intelligence ( AI)
Introduction to Artificial Intelligence ( AI)
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSORINTERRUPT CONTROLLER 8259 MICROPROCESSOR
INTERRUPT CONTROLLER 8259 MICROPROCESSOR
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Passive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.pptPassive Air Cooling System and Solar Water Heater.ppt
Passive Air Cooling System and Solar Water Heater.ppt
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...
Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...
Cybercrimes in the Darknet and Their Detections: A Comprehensive Analysis and...
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
Unsatisfied Bhabhi ℂall Girls Ahmedabad Book Esha 6378878445 Top Class ℂall G...
 
Adsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) pptAdsorption (mass transfer operations 2) ppt
Adsorption (mass transfer operations 2) ppt
 
Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)Theory of Time 2024 (Universal Theory for Everything)
Theory of Time 2024 (Universal Theory for Everything)
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 

4 STM32's SysTick.ppt

  • 2. Directory SysTick Introduction 1 SysTick Function description 2 SysTick Basic operations 3
  • 4. SysTick Introduction The System Tick Timer (SysTick) generates interrupt requests on a regular basis. This allows an OS to carry out context switching to support multiple tasking.
  • 5. SysTick Introduction ARM Cortex-M3 Timer On-Chip peripherals JTAG SWD CPU SysTick NVIC Chips from different manufacturers NVIC ARM Cortex-M3 Kernel Nested Vector Interrupt Controller SysTick is a 24-bit system clock counter, down counting mode, it belongs to ARM Cortex-M3 kernel NVIC in a functional unit, often used for operating system clock timing. Without operating system, the Systick can be used as a general timer/counter
  • 6. JTAG & SWD  Serial Wire Debug (SWD) is a 2-pin (SWDIO/SWCLK) electrical alternative JTAG interface that has the same JTAG protocol on top. SWD uses an ARM CPU standard bi-directional wire protocol.  Joint Test Action Group (JTAG) is an electronics industry association formed in 1985 for developing a method of verifying designs and testing printed circuit boards after manufacture.
  • 7. NVIC (Nested Vector Interrupt Controller)  Asynchronous interrupts don’t wait for previous ones to be handled - if you’re handling the last one when a new one comes along, you either ignore it or you have a CPU that can nest them and handle it when you finish the current one (or preserve the current state and handle the new one - it depends on priority).
  • 9. TI Cortex-M3 NXP Cortex-M3 TI Cortex-M3 SysTick Introduction Operating system code porting Using Timers as System Clock Can't be Carried directly. Can be carried directly µC/OS-II Operating NXP Cortex-M3 µC/OS-II Operating Use SysTick as System Clock
  • 10. SysTick Introduction  Systick timers can be used for other purposes in addition to operating systems: as a alarm, for measuring time.  Note that when the processor is called to stop during debugging (Halt), the Systick timer will also be suspended.
  • 11. Directory SysTick Introduction 1 SysTick Function description 2 SysTick Basic operations 3
  • 12. SysTick Registers SysTick can be configured through the 4 registers:
  • 13. SysTick Structure Diagram FLAG RELOAD CURRENT 0 ENABLE TICKINT CLKSOURCE 0 1 Reload value register Current Value Registers Control and Status registers Clock Interrupt
  • 14. Register description  SysTick Control and Status registers (SysTick_CSR) COUNTFLAG CLKSOURCE TICKINT ENABLE bit0 bit1 bit2 bit16 Counter flag bit 0: Read zeroing 1: The counting value is reduced from 1 to 0 Clock source Selection bit 0: External reference clock-HCLK/8 1: Kernel clock-HCLK 0: No interruption 1: Allow interrupt Interrupt Enable bit Counter enables bit 0: Prohibition 1: Enable Count values from 1 to 0 triggers an Interrupt. The bit will automatically clear 0 after reading; can be used for query mode timing
  • 15. SysTick Clock source SysTick's clock source can be HCLK/8 or HCLK specifically which can be selected by configuring control and status registers (CTRL).
  • 16. 0  Current Value Registers (SysTick_VAL) Register description The current value register displays the current value of the SysTick counter. Every 1 system clock cycles, the value minus 1, when the count is reduced to 0, can produce interrupts and load the values of the reload value registers. 0x000003 Count Flag bit COUNTFLAG Interrupt Current Value Registers Reload Value Registers 0x000003 0x000002 0x000001 0x000000 0x000003 0x000003 1 0x000000 Any value Write any value to zero and cause the sign to be zeroed.
  • 17. Directory SysTick Introduction 1 SysTick Function description 2 SysTick Basic operations 3
  • 18. SysTick How to Run Select Clock Source Set Reload values Enable SysTick interruption Enable SysTick counter CTRL—>CLKSOURCE When the count value is reduced from 1 to 0, the interrupt is generated Start Counter & Start Countdown RELOAD=(SysClock * Timing time) -1 Empty Current Value Registers Automatically load reload values when the count is 0
  • 19. SysTick How to Run CURRENT FLAG 0x000003 RELOAD 0x000000 0 ENABLE TICKINT CLKSOURCE 0 1 Clock Interrupt Select Kernel Clock 1 Set Reload values 2 Enable interruption 3 Enable counter 4 0x000003 0x000002 0x000000 0x000001 1 Interrupt 1 1