MSP432 ARM Timer Programming

Slides:



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

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.
Programmable Interval Timer
Dr A Sahu Dept of Computer Science & Engineering IIT Guwahati.
8253/54 Timer Section /54 Timer Description and Initialization
Programmable Interval Timer Prepared By: Prof. M. B. Salunke SITS, Narhe, Pune - 41.
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.
P Fig. 6-1, p. 193 Fig. 6-2, p. 193 Fig. 6-3, p. 195.
Block Diagram of 4518 Dual BCD Counter The 4518 Dual BCD Counter has two BCD counters. Each counter is similar to the other. Each counter has a master.
8254 Programmable Interval Timer
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
ARM Timers.
System Clocks.
8254 SOFTWARE PROGRAMMABLE TIMER/COUNTER
Timers ELEC 330 Digital Systems Engineering Dr. Ron Hayne
ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes.
Timers.
Senior Project Presentation: Designers: Shreya Prasad & Heather Smith Advisor: Dr. Vinod Prasad May 6th, 2003 Internal Hardware Design of a Microcontroller.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
FIGURE 11-1 Bit assignments for the Timer Control, Mask, and Flag Register Peter Spasov Microcontroller Technology: The 68HC11, Fourth Edition Copyright.
1 68HC11 Timer Chapter HC11 Timer Subsystem Several timing functions: Basic timing Basic timing Real time interrupts Real time interrupts Output.
8254 Timer.
1 68HC11 Timer HC11 or HC12: Chapter HC11 Timer Subsystem  Several timing functions: Basic timing Basic timing Real time interrupts Real time.
Digital Electronics.
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.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
8255 Programmable Peripheral Interface
16F877A.
Why are Timer Functions Important?
Lecture 10: TI MSP430 Timers and Capture Modes
Timers and Event Counters
ECE 3430 – Intro to Microcomputer Systems
TI ARM I/O Programming Chapter 2
PWM and DC Motor Control
Refer to Chapter 10 in the reference book
Programmable Interval Timer
FIGURE 5.1 Block diagram of sequential circuit
Programmable Interval Timer
Programmable Interval Timer 8254 LECTURE 3
Refer to Chapter 3 in the reference book
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
ADC, DAC, and Sensor Interfacing
Interrupt and Exception Programming
Interrupt and Exception Programming
8254 Timer and Counter (8254 IC).
PWM and DC Motor Control
Atmel ARM Timer Programming
Generic Array Logic (GAL)
8051 Timers / Counters It has two timers Timer 0 and Timer 1.
Timers.
Programmable Interval timer 8253 / 8254
STM Arm Timer Programming
CHAPTER 4 COUNTER.
Programmable Interval timer 8253 / 8254
Programmable Peripheral Interface
UNIT 19 PWM 로봇 SW 교육원 조용수.
Reference Chapter 7 Moris Mano 4th Edition
Programmable Interval Timer
Timers Chapter 2.
Presentation transcript:

MSP432 ARM Timer Programming Chapter 5 MSP432 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

System Tick Timer Internal Structure

RCGCTimer (Timer Run Mode Clock Gating Control)

The Relation Between TnR, TnMATCHR, and TnMRIS

GPTMRIS

Timer Enable (TnEN)

GPTM Control Register

GPTM Configuration Register

GPTMTAMR (GPTM Timer A Mode)

TAMR Bits of GPTMTAMR Mode D1 D0 Mode Name Reserved 1 one-shot Mode 2 Reserved 1 one-shot Mode 2 Periodic Mode 3 Capture Mode

The role of GPTMTnR

Counting in One Shot Mode

Prescaler

the pin designation for 16/32-bit Timer block 0 to 5   TimerA Pins TimerB Timer0 T0CCP0 PB6 or PF0 T0CCP1 PB7 or PF1 Timer1 T1CCP0 PB4 or PF2 T1CCP1 PB5 or PF3 Timer2 T2CCP0 PB0 or PF4 T2CCP1 PB1 Timer3 T3CCP0 PB2 T3CCP1 PB3 Timer4 T4CCP0 PC0 T4CCP1 PC1 Timer5 T5CCP0 PC2 T5CCP1 PC3

Timers alternate pin assignment Timer Pin I/O pin How to use peripheral function on the pin T0CCP0 PB6 GPIOB->AFSEL =0x40 (0100 0000 binary) PF0 GPIOF->AFSEL =0x01 (0000 0001 binary) T0CCP1 PB7 GPIOB->AFSEL =0x80 (1000 0000 binary) PF1 GPIOF->AFSEL =0x02 (0000 0010 binary) T1CCP0 PB4 GPIOB->AFSEL =0x10 (0001 0000 binary) PF2 GPIOF->AFSEL =0x04 (0000 0100 binary) T1CCP1 PB5 GPIOB->AFSEL =0x20 (0010 0000 binary) PF3 GPIOF->AFSEL =0x08 (0000 1000 binary) T2CCP0 PB0 GPIOB->AFSEL =0x40 (0000 0001 binary) PF4 GPIOF->AFSEL =0x10 (0001 0000 binary) T2CCP1 PB1 GPIOB->AFSEL =0x02 (0000 0010 binary) T3CCP0 PB2 GPIOB->AFSEL =0x04 (0000 0100 binary) T3CCP1 PB3 GPIOB->AFSEL =0x08 (0000 1000 binary) T4CCP0 PC0 GPIOC->AFSEL =0x01 (0000 0001 binary) T4CCP1 PC1 GPIOC->AFSEL =0x02 (0000 0010 binary) T5CCP0 PC2 GPIOC->AFSEL =0x04 (0000 0100 binary) T5CCP1 PC3 GPIOC->AFSEL =0x08 (0000 1000 binary) WT0CCP0 PC4 GPIOC->AFSEL =0x10 (0001 0000 binary) WT0CCP1 PC5 GPIOC->AFSEL =0x20 (0010 0000 binary) WT1CCP0 PC6 GPIOC->AFSEL =0x40 (0100 0000 binary) WT1CCP1 PC7 GPIOC->AFSEL =0x80 (1000 0000 binary) WT2CCP0 PD0 GPIOD->AFSEL =0x01 (0000 0001 binary) WT2CCP1 PD1 GPIOD->AFSEL =0x02 (0000 0010 binary) WT3CCP0 PD2 GPIOD->AFSEL =0x04 (0000 0100 binary) WT3CCP1 PD3 GPIOD->AFSEL =0x04 (0000 1000 binary) WT4CCP0 PD4 GPIOD->AFSEL =0x10 (0001 0000 binary) WT4CCP1 PD5 GPIOD->AFSEL =0x20 (0010 0000 binary) WT5CCP0 PD6 GPIOD->AFSEL =0x40 (0100 0000 binary) WT5CCP1 PD7 GPIOD->AFSEL =0x80 (1000 0000 binary)

Timers pin assignment using GPIO_PCTL (Extracted from Table 23-5 of Tiva data sheet) Timer Pin I/O Pin How to select the timer function on the pin T0CCP0 PB6 GPIOB->PCTL=0x0700 0000 PF0 GPIOF->PCTL=0x0000 0007 T0CCP1 PB7 GPIOB->PCTL=0x7000 0000 PF1 GPIOF->PCTL=0x0000 0070 T1CCP0 PB4 GPIOB->PCTL=0x0007 0000 PF2 GPIOF->PCTL=0x0000 0700 T1CCP1 PB5 GPIOB->PCTL=0x0070 0000 PF3 GPIOF->PCTL=0x0000 7000 T2CCP0 PB0 GPIOB->PCTL=0x0000 0007 PF4 GPIOF->PCTL=0x0007 0000 T2CCP1 PB1 GPIOB->PCTL=0x0000 0070 T3CCP0 PB2 GPIOB->PCTL=0x0000 0700 T3CCP1 PB3 GPIOB->PCTL=0x0000 7000 T4CCP0 PC0 GPIOC->PCTL=0x0000 0007 T4CCP1 PC1 GPIOC->PCTL=0x0000 0070 T5CCP0 PC2 GPIOC->PCTL=0x0000 0700 T5CCP1 PC3 GPIOC->PCTL=0x0000 7000 WT0CCP0 PC4 GPIOC->PCTL=0x0007 0000 WT0CCP1 PC5 GPIOC->PCTL=0x0070 0000 WT1CCP0 PC6 GPIOC->PCTL=0x0700 0000 WT1CCP1 PC7 GPIOC->PCTL=0x7000 0000 WT2CCP0 PD0 GPIOD->PCTL=0x0000 0007 WT2CCP1 PD1 GPIOD->PCTL=0x0000 0070 WT3CCP0 PD2 GPIOD->PCTL=0x0000 0700 WT3CCP1 PD3 GPIOD->PCTL=0x0000 7000 WT4CCP0 PD4 GPIOD->PCTL=0x0007 0000 WT4CCP1 PD5 GPIOD->PCTL=0x0070 0000 WT5CCP0 PD6 GPIOD->PCTL=0x0700 0000 WT5CCP1 PD7 GPIOD->PCTL=0x7000 0000

Input Edge Time Capturing

Counting in Input Edge-Time Mode

Measuring Period and Pulse Width

Counter Diagram

Counting in the Input Edge-Count Mode