Lecture 22: LM3S9B96 Microcontroller – SysTick and General-Purpose Timers.

Slides:



Advertisements
Similar presentations
1 Homework Reading –Intel 8254 Programmable Interval Timer (PIT) Data Sheet Machine Projects –Continue on MP3 Labs –Continue in labs with your assigned.
Advertisements

PROGRAMMABLE PERIPHERAL INTERFACE -8255
More fun with Timer/Counters
Programmable Interval Timer
Introduction of Holtek HT-46 series MCU
Refer to Chapter 6, 9 in the reference book
MS_uC / dnd / V TIM - Timer Programming Microcontroller TIM - Timer Autumn term K Byte Burst Flash 64K or 96K Byte SRAM 256K or 512K Byte.
ATtiny2313 Timers/Counters CS-423 Dick Steflik. What Do You Use Timers For? Timing of events (internal or external)‏ Scheduling Events Measuring the width.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Lecture 19: Case Study: An Implementation of Cortex-M3 – the LM3S9B96
Lecture 21: LM3S9B96 Microcontroller – System Control.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – System Control Refer to Chapter 6 in the reference book “Stellaris® LM3S9B96 Microcontroller.
Lecture 27: LM3S9B96 Microcontroller – Inter- Integrated Circuit (I 2 C) Interface.
Cortex-M3 Debugging System
Lecture 26: LM3S9B96 Microcontroller – Universal Asynchronous Receivers/Transmitters.
8254 Programmable Interval Timer
Lecture 29: LM3S9B96 Microcontroller – Pulse Width Modulator (PWM)
8254 Counter/Timer Counter Each of the three counter has 3 pins associated CLK: input clock frequency- 8 MHz OUT GATE: Enable (high) or disable.
ARM Timers.
Lecture 23: LM3S9B96 Microcontroller - Interrupts.
8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER
MS_uC / fue1 / V TIMx - Timer Programming Microcontroller TIMx - Timer Autumn term 2012.
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Timer Peripherals.
1 ARM University Program Copyright © ARM Ltd 2013 Timer Peripherals.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
Lecture 25: LM3S9B96 Microcontroller – Watchdog Timer.
Timers.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – Universal Asynchronous Receivers/Transmitters Refer to Chapter 13 in the reference book “Stellaris®
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
Timer Timer is a device, which counts the input at regular interval (δT) using clock pulses at its input. The counts increment on each pulse and store.
CS-280 Dr. Mark L. Hornick 1 Atmel Timer/Counter System Most microcontrollers include some type of timer system Facilitates real-time monitoring and control.
Conclusion Speech. Content Organization Pronunciation Handwriting.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – Pulse Width Modulator (PWM) Refer to Chapter 21 in the reference book “Stellaris® LM3S9B96 Microcontroller.
8254 Timer.
INTRODUCTION TO PIC MICROCONTROLLER. Overview and Features The term PIC stands for Peripheral Interface Controller. Microchip Technology, USA. Basically.
Refer to Chapter 15 in the reference book
KyungHee Univ. 1-0 Parallel Input/Output Controller (PIO)
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – Watchdog Timers Refer to Chapter 11 in the reference book “Stellaris® LM3S9B96 Microcontroller.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – Interrupts Refer to Chapter 4 in the reference book “Stellaris® LM3S9B96 Microcontroller - DATA.
AT91 Power Management This training module describes the Power Management options provided by the AT91 family of microcontrollers. These options address.
Timers and Event Counters
V.V.P. ENGINEERING COLLEGE,RAJKOT
PWM and DC Motor Control
Refer to Chapter 5 in the reference book
Refer to Chapter 10 in the reference book
Programmable Interval Timer
Programmable Interval Timer
Programmable Interval Timer 8254 LECTURE 3
Refer to Chapter 3 in the reference book
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
RX Compare Match Timer (CMT)
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
Interrupt and Exception Programming
8-bit Timer/Counter0 with PWM
Interrupt and Exception Programming
8051 Timers Prof. Rajiv R Bhandari.
Timers.
MSP432 ARM Timer Programming
Programmable Interval timer 8253 / 8254
Programmable Interval timer 8253 / 8254
嵌入式微控制器编程 Embedded Microcontroller Programming
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Timer/Counter Timer/Counter 0 Timer/Counter 1 Timer/Counter 2 8 bit
Programmable Interval Timer
Timers Chapter 2.
Presentation transcript:

Lecture 22: LM3S9B96 Microcontroller – SysTick and General-Purpose Timers

Stellaris® LM3S9B96 Microcontroller Data Sheet Chapter System Timer (SysTick) Chapter 11 General-Purpose Timers

System Timer zCortex-M3 includes an integrated system timer, SysTick zProvides a simple, 24-bit clear-on-write, decrementing, wrap-on-zero counter zAn RTOS tick timer which fires at a programmable rate (for example, 100 Hz) and invokes a SysTick handler routine zA high-speed alarm timer using the system clock zA variable rate alarm or signal timer zA simple counter used to measure time to completion and time used

Functional Description zThe timer consists of three registers: zSysTick Control and Status Register: a control and status counter to configure its clock, enable the counter, enable the SysTick interrupt, and determine counter status zSysTick Reload Value Register: the reload value for the counter, used to provide the counter's wrap value zSysTick Current Value Register: the current value of the counter zNote: the SysTick Calibration Value Register, is not implemented in the Stellaris devices

Functional Description zWhen enabled, the timer counts down on each clock from the reload value to zero zReloads (wraps) to the value in the SysTick Reload Value register on the next clock edge, then decrements on subsequent clocks zClearing the SysTick Reload Value register disables the counter on the next wrap  When the counter reaches zero, the COUNTFLAG status bit is set (clears on reads)  Writing to the SysTick Current Value register clears the register and the COUNTFLAG status bit zOn a read from the SysTick Current Value register, the current value is the value of the register at the time the register is accessed zIf the core is in debug state (halted), the counter does not decrement

SysTick Control and Status Register

SysTick Reload Value Register zThe start value N can be between 1 and 0x00FF.FFFF, firing every N+1 clock. zFor example, if a tick interrupt is required every 100 clock pulses, 99 must be written into the RELOAD field

SysTick Current Value Register zThe SysTick Current Value Register contains the current value of the counter.

General-Purpose Timers zProgrammable timers can be used to count or time external events that drive the Timer input pins zThe Stellaris General-Purpose Timer Module (GPTM) contains four GPTM blocks zEach GPTM block provides two 16-bit timers/counters zcan be configured to operate independently as timers or event counters zor configured to operate as one 32-bit timer or one 32- bit Real-Time Clock (RTC)

Block Diagram

Initialization and Configuration zTo use the general-purpose timers, the peripheral clock must be enabled by setting the TIMER0, TIMER1, TIMER2, and TIMER3 bits in the RCGC1 register  If using any CCP pins, the clock to the appropriate GPIO module must be enabled via the RCGC2 register and configure the PMCn fields in the GPIOPCTL register to assign the CCP signals to the appropriate pins z32-Bit One-Shot/Periodic Timer Mode z32-Bit Real-Time Clock (RTC) Mode z16-Bit One-Shot/Periodic Timer Mode zInput Edge-Count Mode z16-Bit Input Edge Timing Mode z16-Bit PWM Mode