STM Arm Timer Programming

Slides:



Advertisements
Similar presentations
ECE/CS-352: Embedded Microcontroller Systems The Silicon Laboratories C8051F020 Enhanced 8051 Part 5 Other Subsystems.
Advertisements

Interrupts, Low Power Modes and Timer A (Chapters 6 & 8)
More fun with Timer/Counters
4-1 Timers Timers can be used for  timing  event counting  pulse width measurement  pulse generation  frequency multiplication There are 8 Timers.
Microcontroller Programming II MP6-1
EET 2261 Unit 10 Enhanced Capture Timer  Read Almy, Chapter 20.  Homework #10 and Lab #10 due next week.  Quiz next week.
ATtiny2313 Timers/Counters CS-423 Dick Steflik. What Do You Use Timers For? Timing of events (internal or external)‏ Scheduling Events Measuring the width.
5-1 Timer/Counters In many microprocessor systems we need to:  count logic pulses  measure the frequency of signals  measure the period of pulses 
8254 Modes Made by: Ryan wahab (8) Modes Gate is low the count will be paused Gate is high Will continue counting Mode 0: An events counter.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
16-Bit Timer/Counter 1 and 3 Counter/Timer 1,3 (TCNT1, TCNT3) are identical in function. Three separate comparison registers exist. Thus, three separate.
ENEE 440 Chapter Timer 8254 Register Select The 8254 timer is actually 3 timers in one. It is an upgraded version of the 8253 timer which was.
ECE 371- Unit 11 Timers and Counters (“Stop Watches and Alarm Clocks”)
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
ARM Timers.
System Clocks.
MS_uC / fue1 / V TIMx - Timer Programming Microcontroller TIMx - Timer Autumn term 2012.
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Unit 10.2 Timer Examples. Example – Music Generation Channel 6 – Set up as a timer Output to Generate Square Waves Channel 4 – Set up as a timer Output.
Timer Peripherals.
1 ARM University Program Copyright © ARM Ltd 2013 Timer Peripherals.
ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes.
Lecture 11: TI MSP430 Timers Compare Modes
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
1 68HC11 Timer Chapter HC11 Timer Subsystem Several timing functions: Basic timing Basic timing Real time interrupts Real time interrupts Output.
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
8254 Timer.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
Lecture 22: LM3S9B96 Microcontroller – SysTick and General-Purpose Timers.
Basic Counters: Part I Section 7-6 (pp ).
#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.
C Examples 6. Download Links MPLAB IDE dsPIC30F4011/4012 Data Sheet dsPIC30F Family Reference Manual MikroC MikroC Manual MikroC Quick Reference.
1 68HC11 Timer. 2 68HC11 Timer Subsystem Several timing functions: Basic timing Basic timing Real time interrupts Real time interrupts Output compare.
16-Bit Timer/Counter 1 and 3
EET 2261 Unit 13 Enhanced Capture Timer
Why are Timer Functions Important?
Lecture 10: TI MSP430 Timers and Capture Modes
V.V.P. ENGINEERING COLLEGE,RAJKOT
ECE 3430 – Intro to Microcomputer Systems
PWM and DC Motor Control
Programmable Interval Timer 8254 LECTURE 3
AVR Addressing Modes Subject: Microcontoller & Interfacing
MSP432 ARM Timer Programming
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
Freescale ARM Timer Programming
8-bit Timer/Counter0 with PWM
ECE 3430 – Intro to Microcomputer Systems
EMT 348: Microcontroller Timer/counter
ECE 3430 – Intro to Microcomputer Systems
PWM and DC Motor Control
STM Arm I/O Programming
8254 Timer and Counter (8254 IC).
SPI Protocol and DAC Interfacing
PWM and DC Motor Control
Atmel ARM Timer Programming
UART Serial Port Programming
ADC, DAC, and Sensor Interfacing
Timers.
MSP432 ARM Timer Programming
8-bit Timer/Counter2 with PWM and Asynchronous Operation
UNIT 19 PWM 로봇 SW 교육원 조용수.
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
ECE 3430 – Intro to Microcomputer Systems
MCO556 Timer System Exercise.
Timer/Counter Timer/Counter 0 Timer/Counter 1 Timer/Counter 2 8 bit
Timers Chapter 2.
Presentation transcript:

STM Arm Timer Programming Chapter 5 STM Arm Timer Programming

A 3-bit Counter

An 8-bit up-counter stages

An 8-bit down-counter stages

Counting Events Using a Counter

Using Counter as a Timer

Capturing

System Tick Timer Internal Structure

STCTRL (System Tick Control)

System Tick Counting

STRELOAD vs. STCURRENT

STMF466RE Arm timers

STM32F4xx Timer Prescale Options

RCC_APB1ENR Register is used to enable timer clock

RCC_APB2ENR Register is used to enable timer clock

Some of the STM32F4xx Timer Registers

CR1 (Control 1) Register

Some of the CR1 register bits

TIMxSR Register

TIMx_SR (Staus) Register UIF Bit

TIMx counter (TIMx_CNT)

TIMx auto-reload register (TIMx_ARR)

TIM2_CNT counter counting for 32-bit

TIMx prescaler (TIMx_PSC)

TIMx Options for Prescaler

CNT, ARR and Compare registers (CCR) with Waveform Output

TIMx capture/compare registers (TIMx_CCRy)

TIMx_CCMR1 for output option

TIMx_CCMR2 for output option OCxCE: Output compare x clear enable OCxM: Output compare x mode The OCxM bits in TIMx_CCMRy register are used to decide the output operation. Here are the options for output pin: 000: Frozen 001: Set output to active HIGH level when TIMx_CNT=TIMx_CCRy. 010: Set output to inactive LOW level when TIMx_CNT=TIMx_CCRy. 011: Toggle when TIMx_CNT=TIMx_CCRy. 100: Forced LOW. 101: Forced HIGH. 110: PWM mode 1. (See Chapter 11) 111: PWM mode 2. (See Chapter 11)   OCxPE: Output compare x preload enable CCxS: Capture/Compare x selection This bit-field defines the direction of the channel (input/output) as well as the used input. 00: CCx channel is configured as output

TIMx_CCER (TIMx capture/compare enable register)

MODER Register is used to select alternative pin functions

GPIOx_AFRL Register

STMF466RE Alternative Function Table for Ports A and B (See Appendix B for other Ports)

TIM_CCER Register (Notice the input capture)

TIMx_CCMR1 and TIMx_CCMR2 (register details are shown in the last section)

Inputing Signal

Messuring Period and Puls Width

Counting Pulses