Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All.

Slides:



Advertisements
Similar presentations
Freescale Semiconductor Confidential and Proprietary Information. Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All.
Advertisements

Augusto Panecatl Technical Information and Customer Support
Trackmate Nathan Beste, Justin Flair, Arzhang Badiozamani, Evan Graves ECE 189 A/B Spring 2013.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Chapter 7 – Registers.
1 Lab 3 Objectives  Case study: “Hello world” program on motes  Write you first program on mote.
TM Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
EET 2261 Unit 10 Enhanced Capture Timer  Read Almy, Chapter 20.  Homework #10 and Lab #10 due next week.  Quiz next week.
Slide 1 Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are.
Introduction of Holtek HT-46 series MCU
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective.
External & internal Interrupts. Interrupt Sources There are 21 different interrupts and each one has its own vector located in a predefined location at.
TM Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective.
TM Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
TM Freescale, the Freescale logo, AltiVec, C-5, CodeTest, CodeWarrior, ColdFire, C-Ware, mobileGT, PowerQUICC, StarCore, and Symphony are trademarks of.
TM Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobileGT, PowerQUICC, QorIQ,
ECE 371- Unit 11 Timers and Counters (“Stop Watches and Alarm Clocks”)
ARM Timers.
M Semiconductor Products Sector Computer Operating Properly Module Detail Slide #1 of 7 Tutorial Introduction PURPOSE -To explain how to configure and.
Department of Electrical Engineering, National Taiwan Ocean University Pulse Width Modulation 4/25/2013 Richard Kuo Assistant Professor.
Microcontroller based system design Asst. Prof. Dr. Alper ŞİŞMAN.
ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes.
Firmware Storage : Technical Overview Copyright © Intel Corporation Intel Corporation Software and Services Group.
Type presentation name here in slide master © 2007 SDL. Company Confidential. Forward-looking information is based upon multiple assumptions and uncertainties.
TM Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective.
Freescale Semiconductor. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
TM Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. All other product or service names are the.
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
Click to add Presentation Title Arial 32, 5 line max title space line 3, title space line 4, title space line 5 Presenter Title Organization Insert your.
Blue Coat and the Blue Coat logo are trademarks of Blue Coat Systems, Inc., and may be registered in certain jurisdictions. All other product or service.
Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All.
Chapter 5 - Interrupts.
MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective.
MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective.
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other product or service names are the property of their respective.
Lecture 22: LM3S9B96 Microcontroller – SysTick and General-Purpose Timers.
Place your image on top of this gray box. If no graphic is applicable, delete gray box and notch-out behind gray box, from the Title Master MOTOROLA and.
#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.
M Semiconductor Products Sector Low Voltage Inhibit Module Slide #1 of 3 Tutorial Introduction PURPOSE -To explain how to configure and use the Low Voltage.
HCS12 Technical Training Module 15 – Break Module Slide 1 MOTOROLA and the Stylized M Logo are registered in the US Patent & Trademark Office. All other.
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.
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.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective.
Why are Timer Functions Important?
Lecture 10: TI MSP430 Timers and Capture Modes
Presenter Title Organization
V.V.P. ENGINEERING COLLEGE,RAJKOT
By: Team Short Circuit;
RX Watchdog Timer (WDT)
AVR Addressing Modes Subject: Microcontoller & Interfacing
Presenter Name Title Organization.
RX Compare Match Timer (CMT)
RX 8-Bit Timer (TMR) 4/20/2011 Rev. 1.00
Freescale ARM Timer Programming
Timer/Counter Modified from Dr. Lam Phung’s Slides.
Interrupts in C Programs
Access Online Mobile App Demo
Architectural Overview
Baremetal C Programming for Embedded Systems
UNIT 19 PWM 로봇 SW 교육원 조용수.
Example 18 Pulse Train Using Interrupts
MCO556 Timer System Exercise.
Presentation transcript:

Freescale Semiconductor Confidential and Proprietary Information. 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 TM AW60 Low Level Driver Design Training Freescale Semiconductor Inc

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 1 Agenda Timer/PWM Module (TPM)  TPM Block Diagram  Overview of TPM Functionality  Architectural Components  Modes of Operation  Architectural Components Interface Demo Code  Implement PWM and CPWM on the AW60 EVB.

Freescale Semiconductor Confidential and Proprietary Information. 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 TM Timer/PWM Module (TPM)

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 3 TPM Block Diagram

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 4 TPM Function Overview

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 5 Architectural Components

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 6 Modes of Operation Mode, Edge and Level Selection

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 7 Architectural Components Interface Operation LevelFunction Name Module Levelchar TPM_Init(TPMConfig* TPMCfg); Module Events 1.void isr_TMR1_OV(void); 2.void isr_TMR2_OV(void); Channel Level 1. char TPMChnl_Init(TPMChnlConfig* TPMChnlCfg); 2. char InputCapture(UCHAR IC_Chnl,UCHAR IC_Mode,void (*CaptureEvent)(void)); 3. char OutputCompare(UCHAR OC_Chnl,UCHAR OC_Mode,UINT ChnlVal,void (*CompareEvent)(void)); 4. char PWM(UCHAR PWM_Chnl,UCHAR PWM_Mode,UINT ChnlVal,void (*PWMEvent)(void)); 5. char CPWM(UCHAR CPWM_Chnl,UCHAR CPWM_Mode,UINT ChnlVal,void (*CPWMEvent)(void)); Channel Events 1.void isr_TMR1_Chnl0(void); 2.void isr_TMR1_Chnl1(void); 3.void isr_TMR1_Chnl2(void); 4.void isr_TMR1_Chnl3(void); 5.void isr_TMR1_Chnl4(void); 6.void isr_TMR1_Chnl5(void); 7.void isr_TMR2_Chnl0(void); 8.void isr_TMR2_Chnl1(void);

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 8 TPM module configuration structure typedef struct TPMConfig_t { UCHAR TPM; UCHAR CPWMS; UCHAR ClkSrc; UCHAR Prescaler; UINT reg_TPMMOD; void (*TPMEvent)(void); }TPMConfig; Note: void (*TPMEvent)(void) is the function pointer pointing to user application space associated to the TPM interruption. Structure MembersDescription UCHAR TPMTPM module selection bit, 1: TPM1, 2 : TPM2 UCHAR CPWMSCPWM select bit, 1:CPWMS,0:other functions UCHAR ClkSrcTPM clock source select UCHAR Prescalerprescaler of TPM UINT reg_TPMMODthe variable in flash to store the configuration of TPMMODH:L void (*TPMEvent)(void) the function pointer points to the events invoked upon the interruption of TPM

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 9 TPM channel configuration structure typedef struct TPMChnlConfig_t { UCHAR Channel; UCHAR Mode; UINT reg_TPMCnV; void (*ChnlEvent)(void); }TPMChnlConfig; Structure MembersDescription UCHAR ChannelTPM channel selection, refer to the tpm_drv.h UCHAR ModeChannel mode selection, refer to the tpm_drv.h UINT reg_TPMCnVChannel value will pass to the register of TPMCnV void (*ChnlEvent)(void) Function pointer points to the events invoked upon the interruption of corresponding channel Note: void (*ChnlEvent)(void) is the function pointer pointing to user application associated to the corresponding TPM channel interruption.

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 10 Demo Code of TPM void main(void) { UCHAR icgmode,pt,re; EnableInterrupts; //enable interrupts /* include your code here */ /*GPIO test code */ pt = GPIO_InitPort(PORTA,&paconfig); pt = PTAD; pt = GPIO_SetPin(PORTA,PIN4); pt = PTAD; /*ICG test code*/ ICG_Init(&icgconfig); icgmode = Get_ICG_Mode(); /*TPM test code*/ re = TPM_Init(&tpm1cfg); //tpm1 module initialization re = PWM(CHNL10,CPWM_CO,200,NULL); //edge-aligned pwm,clear output on compare for(;;) { __RESET_WATCHDOG(); /* feeds the dog */ } /* loop forever */ /* please make sure that you never leave this function */ }

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 11 PWM Wave Capture

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 12 CPWM Wave Capture

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 13 Thanks

TM Freescale Semiconductor Confidential and Proprietary Information. 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 Slide 14 Freescale Semiconductor Confidential and Proprietary Information. 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