TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names.

Slides:



Advertisements
Similar presentations
Augusto Panecatl Technical Information and Customer Support
Advertisements

4-1 Timers Timers can be used for  timing  event counting  pulse width measurement  pulse generation  frequency multiplication There are 8 Timers.
TM Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
Read Chapter 3 (David E. Simon, An Embedded Software Primer)
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
ARM Timers.
A Simple Tour of the MSP430. Light LEDs in C LEDs can be connected in two standard ways. Active high circuit, the LED illuminates if the pin is driven.
System Clocks.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Computer System Overview Chapter 1. Operating System Exploits the hardware resources of one or more processors Provides a set of services to system users.
M Semiconductor Products Sector Computer Operating Properly Module Detail Slide #1 of 7 Tutorial Introduction PURPOSE -To explain how to configure and.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
Lecture 25: LM3S9B96 Microcontroller – Watchdog Timer.
Interrupts By Ryan Morris. Overview ● I/O Paradigm ● Synchronization ● Polling ● Control and Status Registers ● Interrupt Driven I/O ● Importance of Interrupts.
ECS642U Embedded Systems Cyclic Execution and Polling William Marsh.
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Conclusion Speech. Content Organization Pronunciation Handwriting.
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All.
The Cortex-M3 Embedded Systems: LM3S9B96 Microcontroller – Watchdog Timers Refer to Chapter 11 in the reference book “Stellaris® LM3S9B96 Microcontroller.
TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names.
TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names.
TIMERS.
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
EET 2261 Unit 13 Enhanced Capture Timer
Embedded Microcontroller Systems
Application Case Study Security Camera Controller
An Interrupt is either a Hardware generated CALL (externally derived from a hardware signal) OR A Software-generated CALL (internally derived from.
Basic Computer Organization and Design
COURSE OUTCOMES OF Microprocessor and programming
68HC11 Interrupts & Resets.
MPC8360 Micro Controllers Lab 7 - DMA Fall , 2010.
Timer and Interrupts.
Refer to Chapter 5 in the reference book
Chapter 11: Inter-Integrated Circuit (I2C) Interface
UNIT – Microcontroller.
Direct Memory address and 8237 dma controller LECTURE 6
Refer to Chapter 10 in the reference book
Microprocessor Systems Design I
COMP2121: Microprocessors and Interfacing
AVR Addressing Modes Subject: Microcontoller & Interfacing
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Introduction of microprocessor
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
Computer System Overview
Lab 5 – Interrupts vs Polling
RX Compare Match Timer (CMT)
RX Data Transfer Controller (DTC)
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
Chapter 8 I/O.
Timer/Counter Modified from Dr. Lam Phung’s Slides.
Programmable Interval timer 8253 / 8254
Processor Fundamentals
8-bit Timer/Counter2 with PWM and Asynchronous Operation
전자의료시스템 및 실습 System Configuration/Interrupt
Chapter 8 I/O.
Programmable Interval timer 8253 / 8254
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
EECE.3170 Microprocessor Systems Design I
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
EECE.3170 Microprocessor Systems Design I
Chapter 8 I/O.
Computer System Overview
The RealTek timer-count
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Lab 4 – Timers and Polling Fall, 2010 MPC8360 Micro Controllers

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Objectives ► Getting familiar with the MPC8360 Timers Block. ► Getting to know the Polling mechanism

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc IMMRBAR - I nternal M emory M ap R egisters B ase A ddress R egister

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc QUICC Engine Timers (GTM) ► The global timer module in the QUICC Engine (GTM) includes four identical 16-bit general-purpose timers. E300 Core QUICC Engine Timers 0x10_0000 0x0440

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Timers Block Diagram

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Configuration Register (GTCFR1) Offset 0x RWRW PCASBCMSTP2RST2GM2GM1STP1RST1 ResetAll Zeros The Actual Address Of any Register in the timers block is: IMMRBAR QUICC Engine Offset Timers Offset Register Offset For Example the actual address of GTCFR: +0x0010_00000xE000_0000+0x0000_ x0000_0000 = 0xE010_0440

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Configuration Register (GTCFR1) Offset 0x RWRW PCASBCMSTP2RST2GM2GM1STP1RST1 ResetAll Zeros RST1 Reset timer 1 0 Reset the timer 1, including GTMDR1, GTRFR1, GTCNR1, GTCPR1 and GTEVR1 (a software reset is identical to an external reset). 1Enable the corresponding timer if the STP1 bit is cleared

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Configuration Register (GTCFR1) Offset 0x RWRW PCASBCMSTP2RST2GM2GM1STP1RST1 ResetAll Zeros STP1 Stop timer 1 0Normal operation 1Reduce power consumption of the corresponding timer. This bit stops all clocks to the timer 1 ….

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Counter Register (GTCNR1) Offset 0x1C 015 RWRW CNV ResetAll Zeros

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Counter Register (GTCNR1) Offset 0x1C 015 RWRW CNV ResetAll Zeros CNV Counter Value Corresponding timer’s 16-bit read/write up-counter value.

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Reference Register (GTRFR1) Offset 0x RWRW TRV ResetAll Ones

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Reference Register (GTRFR1) Offset 0x RWRW TRV ResetAll Ones TRV Timeout Reference Value 16-bit timeout reference value for the corresponding timer. Set to all ones by reset.

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Event Register (GTEVR1) Offset 0x RWRW REFCAP ResetAll Zeros

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Event Register (GTEVR1) Offset 0x RWRW REFCAP ResetAll Zeros REF Output Reference Event 0No event 1The counter has reached the GTRFRx[TRV] value.

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Prescale Register (GTPSR1) Offset 0x RWRW PPS ResetAll Zeros

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Prescale Register (GTPSR1) Offset 0x RWRW PPS ResetAll Zeros PPS Primary Prescaler Bits The primary prescaler is programmed to divide the clock input to corresponding timer by values from 1 to 256. The value 0x00 divides the clock by 1 and 0xFF divides the clock by 256.

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Mode Registers (GTMDR1) Offset 0x RWRW SPSCE OMORIFRRICLKGE ResetAll Zeros

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Mode Registers (GTMDR1) Offset 0x RWRW SPSCE OMORIFRRICLKGE ResetAll Zeros SPS Secondary Prescaler Value The secondary prescaler is programmed to divide the clock input to corresponding timer by values from 1 to 256. The value 0x00 divides the clock by 1 and 0xFF divides the clock by 256.

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Mode Registers (GTMDR1) Offset 0x RWRW SPSCE OMORIFRRICLKGE ResetAll Zeros FRR Free run/restart mode 0 Free run. The timer count continues to increment after the reference value is reached 1Restart. The timer count is reset immediately after the reference value is reached.

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Global Timers Mode Registers (GTMDR1) Offset 0x RWRW SPSCE OMORIFRRICLKGE ResetAll Zeros ICLK Input clock source for the timer 01Internal QUICC Engine reference clock. 10Internal “slow go” clock (divided by 16 QUICC Engine reference clock).

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc The LED ► On the MPC8360 board we have a LED (small red light), that is controlled via a register which is located at address 0xF800_0008. ► To Turn the LED on write ‘0’ to bit number 14. ► To Turn the LED off write ‘1’ to bit number 14. ► There is a second LED which controlled by bit number 13

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc I/O  I/O is how humans interact with computers  I/O gives computers long-term memory. External devices I/O

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Polling  actively sampling the status of an external or internal device by a client program.  CPU does nothing other than check the status of the device until it is ready (Busy Waiting)  Polling can be scheduled between several devices. E300 CORE Mouse Printer Timers External device Internal device Polling

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Polling why we need it?  A way to connect many types of devices to the Microcontroller.  A way to control external and internal devices, respond to them and transfer data in the exact time and speed.

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Polling Example : void asm Timers_Polling { whlie (1) { if (Timer_Counter_Value==0x5) { Action; } Busy waiting Device is ready

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc General Notes ► Make sure to bring the codes you have written in previous labs. ► Please READ the exercise before you start working on it !! ► The High-Score table has nothing to do with your grades

TM Freescale Confidential Proprietary Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc Quick Overview