FR FAMILY MB91460 PULSE FREQUENCY MODULATOR 32-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

Similar documents
FR FAMILY MB91460 PROGRAMMABLE PULSE GENERATOR 32-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

Jasmine Memory Calculations MB87P2020-A

F²MC-16FX FAMILY ALL SERIES PROGRAMMABLE PULSE GENERATOR 16-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

F²MC-16FX FAMILY ALL SERIES PROGRAMMABLE PULSE GENERATOR 16-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

MB86R12 Emerald-P. Application Note Clock Setup. Fujitsu Semiconductor Europe GmbH

MB86297A Carmine Video Capture Unit Colour Conversion

FLEXRAY SK-91F467-FLEXRAY USING SPI ON SK-91F467- FLEXRAY 32-BIT MICROCONTROLLER APPLICATION NOTE. Fujitsu Microelectronics Europe Application Note

F²MC-8L/16LX FAMILY MB90340 SPI COMMUNICATION TO EXTERNAL ADC. (for MAX1286) 8/16-BIT MICROCONTROLLER APPLICATION NOTE

GRAPHICS CONTROLLERS SPRITE ENGINE PERFORMANCE MB88F332 'INDIGO' APPLICATION NOTE GRAPHICS COMPETENCE CENTER

GRAPHICS CONTROLLERS INDIGO SOUND GENERATOR

F²MC-8L/8FX/16LX/FR FAMILY

Fujitsu Microelectronics Europe Application Note MCU-AN E-V10 FR FAMILY MB91460 FLASH ERASE & PROGRAMMING TIMES APPLICATION NOTE

EMA-MB91F467B-NLS144M08B

FR FAMILY MB91460, MB91360 COMPARISON OF FLASH PROGRAMMING+ERASE, MB91F467D&MB91F362A APPLICATION NOTE

F²MC-8FX/16LX/16FX/FR FAMILY LIN CONFORMANCE TEST

TRACE APPLICATION NOTE VERSION MB86R01 'JADE' & GREENHILLS TOOLCHAIN. Fujitsu Microelectronics Europe Application Note

MB88F332 'Indigo' MB88F333 'Indigo-L' APIX Layout Recommendations

EMA-MB91F467C-NLS-144M08

F²MC-8FX/16LX/16FX/FR FAMILY BLDC DRIVE WITH THE PPG

Fujitsu Microelectronics Europe User Guide FMEMCU-UG MB96300 FAMILY HEADER BOARD MB FX-120P-M21 USER GUIDE

EMA-MB91F467B-LS144M08B

EMC Design Guide. F²MC-16LX Family

Fujitsu Microelectronics Europe Application Note FMEMCU-AN F²MC-16LX FAMILY 16-BIT MICROCONTROLLER ALL SERIES LIN-UART APPLICATION NOTE

FUJITSU APIX DEVICES APIX FIR SET UP REV 1.0 APPLICATION NOTE GRAPHICS COMPETENCE CENTER. Fujitsu Semiconductor Europe Application Note

R_ Driving LPC1500 with EPSON Crystals. Rev October Document information. Keywords Abstract

AN Energy Harvesting with the NTAG I²C and NTAG I²C plus. Application note COMPANY PUBLIC. Rev February Document information

15 Amp Digital High Frequency PWM Motor Speed Controller SPD-315-D and SPD-315-DS

TED-Kit 2, Release Notes

GRAPHICS CONTROLLERS APIX PCB-DESIGN GUIDELINE

10 Amp Digital PWM Motor Speed Controller CV-2110-HD and CV-2110-HDS

AN High-performance PCB antennas for ZigBee networks. Document information. Keywords

RUSH G1 MECHANICAL KEYBOARD PRODUCT MANUAL V.14

Technical Support, End User License & Warranty Information

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

OM29110 NFC's SBC Interface Boards User Manual. Rev May

Instruction Sheet REB SERIES. Rotating Sliding Base REB18

TN LPC1800, LPC4300, MxMEMMAP, memory map. Document information

40 Amp Digital Bidirectional PWM Motor Controller with Regenerative Braking BIDIR-340-DR

Instruction Sheet SNE SERIES. Cable Chase

GTM-IP. Application Note AN012 ATOM Flexible PWM generation. Date: (Released ) Robert Bosch GmbH Automotive Electronics (AE)

Gypsy Statement of Limited Warranty. Part 1 General Terms

AN MIFARE Plus Card Coil Design. Application note COMPANY PUBLIC. Rev April Document information

AT15291: Migrating QTouch Designs from SAM D MCUs to SAM C MCUs. Scope. Features. QTouch APPLICATION NOTE

Instruction Sheet D-CPU. Secure CPU Holder

UM Slim proximity touch sensor demo board OM Document information

UM OM29263ADK Quick start guide antenna kit COMPANY PUBLIC. Document information

UM DALI getting started guide. Document information

Instruction Sheet. VRS Series. Vertical Rackmount system for multiple cable/satellite receivers

IMPORTANT NOTICE: PLEASE READ CAREFULLY BEFORE INSTALLING THE SOFTWARE: THIS LICENCE AGREEMENT (LICENCE) IS A LEGAL AGREEMENT BETWEEN

TI Designs: Biometric Steering Wheel. Amy Ball TIDA-00292

Low Energy Timer. AN Application Note. Introduction

Questions? Call Toll-Free

AN NTAG21xF, Field detection and sleep mode feature. Rev July Application note COMPANY PUBLIC. Document information

MaxLite LED Self-Driven LiteBars

TOSHIBA Original CMOS 16-Bit Microcontroller. TLCS-900/H Series TMP95C061BFG TMP95C061BDFG. Semiconductor Company

Mini Receiver. Off Peak System Control. Operation & Installation Guide for Power Line Carrier WARRANTY. (Applicable to Software Version

PTN5100 PCB layout guidelines

AN NHS3xxx Temperature sensor calibration. Document information

RFTX-1 Installation Manual

16-Bit Hardware Pulse Width Modulator Data Sheet

PN7120 NFC Controller SBC Kit User Manual

UM Description of the TDA8029 I2C Demo Board. Document information

UM User manual for di2c demo board. Document information

Low Voltage Brushed Motor System

ES_LPC1114. Errata sheet LPC1114. Document information

AN PN7150X Frequently Asked Questions. Application note COMPANY PUBLIC. Rev June Document information

Where to Obtain More Information

TK 100 Probe Calibrator. Instruction Manual

AN Maximum RF Input Power BGU6101. Document information. Keywords Abstract

AN3332 Application note

Warranty Terms & Conditions

High-speed switching diode, encapsulated in a small SOT23 (TO-236AB) Surface-Mounted Device (SMD) plastic package.

AN11994 QN908x BLE Antenna Design Guide

Fiber Optic Expansion Interface

Preliminary Data Sheet!

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

Dual 4-bit static shift register

Table 1. Quick reference data Symbol Parameter Conditions Min Typ Max Unit I F forward current T j = 25 C V RRM

Using the USB Output Port to Charge a Device

The BioBrick Public Agreement. DRAFT Version 1a. January For public distribution and comment

HEF4014B. 1. General description. 2. Features and benefits. 3. Applications. 4. Ordering information. 8-bit static shift register

AN0026.1: EFM32 and EFR32 Wireless SOC Series 1 Low Energy Timer

AN Programming the PCA200x family of watch ICs. Document information

ER200 COMPACT EMERGENCY CRANK DIGITAL WEATHER ALERT RADIO OWNER S MANUAL

Table 1. Quick reference data Symbol Parameter Conditions Min Typ Max Unit I F forward current [1] ma V R reverse voltage V V RRM

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

In data sheets and application notes which still contain NXP or Philips Semiconductors references, use the references to Nexperia, as shown below.

BAS21GW. 1. General description. 2. Features and benefits. 3. Applications. 4. Quick reference data

TIDA Test Report 1/4/2016. TIDA Test Report 1/4/2016

High-speed switching in e.g. surface-mounted circuits

Single Schottky barrier diode

The Frequency Divider component produces an output that is the clock input divided by the specified value.

SSR V-12C. Industrial Switching Applications: Hellroaring Technologies, inc. P.O. Box 1521, Polson, Montana 59860

TCK106AF, TCK107AF, TCK108AF

TLP206A TLP206A. Measurement Instrument Data Acquisition Programmable Control. Pin Configuration (top view) Internal Circuit

BT D. 1. General description. 2. Features and benefits. 3. Applications. 4. Quick reference data. 4Q Triac

BAT54W series. 1. Product profile. 2. Pinning information. Schottky barrier diodes. 1.1 General description. 1.2 Features and benefits

TC4011BP,TC4011BF,TC4011BFN,TC4011BFT

SSR-150xxx-40VL-12P-xC-xxxCS

Transcription:

Fujitsu Microelectronics Europe Application Note MCU-AN-300065-E-V10 FR FAMILY 32-BIT MICROCONTROLLER MB91460 PULSE FREQUENCY MODULATOR APPLICATION NOTE

Revision History Revision History Date 2008-06-05 V1.0, First draft, HPi Issue This document contains 14 pages. MCU-AN-300065-E-V10-2 - Fujitsu Microelectronics Europe GmbH

Warranty and Disclaimer Warranty and Disclaimer To the maximum extent permitted by applicable law, Fujitsu Microelectronics Europe GmbH restricts its warranties and its liability for all products delivered free of charge (eg. software include or header files, application examples, target boards, evaluation boards, engineering samples of IC s etc.), its performance and any consequential damages, on the use of the Product in accordance with (i) the terms of the License Agreement and the Sale and Purchase Agreement under which agreements the Product has been delivered, (ii) the technical descriptions and (iii) all accompanying written materials. In addition, to the maximum extent permitted by applicable law, Fujitsu Microelectronics Europe GmbH disclaims all warranties and liabilities for the performance of the Product and any consequential damages in cases of unauthorised decompiling and/or reverse engineering and/or disassembling. Note, all these products are intended and must only be used in an evaluation laboratory environment. 1. Fujitsu Microelectronics Europe GmbH warrants that the Product will perform substantially in accordance with the accompanying written materials for a period of 90 days form the date of receipt by the customer. Concerning the hardware components of the Product, Fujitsu Microelectronics Europe GmbH warrants that the Product will be free from defects in material and workmanship under use and service as specified in the accompanying written materials for a duration of 1 year from the date of receipt by the customer. 2. Should a Product turn out to be defect, Fujitsu Microelectronics Europe GmbH s entire liability and the customer s exclusive remedy shall be, at Fujitsu Microelectronics Europe GmbH s sole discretion, either return of the purchase price and the license fee, or replacement of the Product or parts thereof, if the Product is returned to Fujitsu Microelectronics Europe GmbH in original packing and without further defects resulting from the customer s use or the transport. However, this warranty is excluded if the defect has resulted from an accident not attributable to Fujitsu Microelectronics Europe GmbH, or abuse or misapplication attributable to the customer or any other third party not relating to Fujitsu Microelectronics Europe GmbH. 3. To the maximum extent permitted by applicable law Fujitsu Microelectronics Europe GmbH disclaims all other warranties, whether expressed or implied, in particular, but not limited to, warranties of merchantability and fitness for a particular purpose for which the Product is not designated. 4. To the maximum extent permitted by applicable law, Fujitsu Microelectronics Europe GmbH s and its suppliers liability is restricted to intention and gross negligence. NO LIABILITY FOR CONSEQUENTIAL DAMAGES To the maximum extent permitted by applicable law, in no event shall Fujitsu Microelectronics Europe GmbH and its suppliers be liable for any damages whatsoever (including but without limitation, consequential and/or indirect damages for personal injury, assets of substantial value, loss of profits, interruption of business operation, loss of information, or any other monetary or pecuniary loss) arising from the use of the Product. Should one of the above stipulations be or become invalid and/or unenforceable, the remaining stipulations shall stay in full effect Fujitsu Microelectronics Europe GmbH - 3 - MCU-AN-300065-E-V10

Contents Contents REVISION HISTORY... 2 WARRANTY AND DISCLAIMER... 3 CONTENTS... 4 1 INTRODUCTION... 5 1.1 Key Features... 5 2 PULSE FREQUENCY MODULATOR... 6 2.1 Block Diagrams... 6 2.2 Registers... 7 2.2.1 Control status register (P0TMCSR, P1TMCSR)... 7 2.2.2 16-bit Counter Register (P0TMR, P1TMR)... 8 2.2.3 16-bit Reload Register (P0TMRLR, P1TMRLR)... 8 2.2.4 Port function register (PFRxx, EPFRxx)... 8 2.3 PFM Counter Operation... 8 2.3.1 Reload Counter Operation... 8 2.3.2 PFM Operation and Setting... 9 2.4 Calculation... 10 3 SOFTWARE EXAMPLE... 11 3.1 Basic Functionality of the PFM... 11 4 ADDITIONAL INFORMATION... 12 LIST OF FIGURES... 13 LIST OF TABLES... 14 MCU-AN-300065-E-V10-4 - Fujitsu Microelectronics Europe GmbH

Chapter 1 Introduction 1 Introduction The PFM is used to generate pulses of a short duration in a long period. This is an alternative to using PWM signals in some applications. The 16-bit pulse frequency modulator consists of two 16-bit down-counters, two 16-bit reload registers, prescalers for generating the internal count clocks and control/status registers. 1.1 Key Features Two independent programmable 16-bit down-counters generating low and high pulses The input clock (count clock) can be selected from prescaled internal clocks (the peripheral clock (CLKP) divided by 2/8/32/64/128) separately for each counter. The mark level and output waveform can be inverted. Fujitsu Microelectronics Europe GmbH - 5 - MCU-AN-300065-E-V10

Chapter 2 Pulse Frequency Modulator 2 Pulse Frequency Modulator THE BASIC FUNCTIONALITY OF PULSE FREQUENCY MODULATOR IS EXPLAINED 2.1 Block Diagrams Figure 2-1 shows the internal block diagram of a Pulse Frequency Modulator. Figure 2-1: PFM Block Diagram MCU-AN-300065-E-V10-6 - Fujitsu Microelectronics Europe GmbH

Chapter 2 Pulse Frequency Modulator 2.2 Registers 2.2.1 Control status register (P0TMCSR, P1TMCSR) Controls the operation mode, shows the status of the reload counter and interrupts for the 16-bit reload. Only change the value of bits other than UF and TRG when CNTE = "0". Bit No. Name Explanation Value Operation 15 - Reserved - Always set to 0 14 INV counter 0 high level, counter 1 low 0 The output signal inversion level bit counter 0 low level, counter 1 high 1 level 13 - Reserved - Always set to 0 000 CLKP / 2 1 12-10 CSL2, CSL1, CSL0 The count clock select bits 001 CLKP / 2 3 010 CLKP / 2 5 011 resaved 100 Clock disabled 101 CLKP / 2 6 110 CLKP / 2 7 111 Clock disabled 9 - Reserved - Always set to 0 0 Setting prohibited 8 MD1 Mode Bit 1 Necessary for PFM operation 7-5 - Reserved - Always set to 010 The count operation stops when 0 an underflow occurs due to 4 RELD underflow This bit enables reload operations. 3 INTE Interrupt request enable bit 2 UF Underflow flag 1 CNTE Counter count enable bit 0 TRG Software trigger bit 1 0 1 0 1 The counter operates in reload mode Interrupt request is generated when the UF bit changes to "1". no interrupt requests are generated Read: No counter underflow Write: Clears the Flag Read: Counter underflow occurred Write: No effect 0 stops count operation 1 sets the counter to wait for a trigger 0 Write: No effect 1 Write: Software trigger applied Table 2-1: P0TMCSR and P1TMCSR Fujitsu Microelectronics Europe GmbH - 7 - MCU-AN-300065-E-V10

Chapter 2 Pulse Frequency Modulator 2.2.2 16-bit Counter Register (P0TMR, P1TMR) Reading this register reads the count value of the 16-bit down counter. Its initial value is indeterminate. Always read this register using 16-bit data transfer instructions Output Compare Unit 2.2.3 16-bit Reload Register (P0TMRLR, P1TMRLR) The 16-bit reload register stores the initial count value. Its initial value is indeterminate. Always write to this register using 16-bit data transfer instructions. 2.2.4 Port function register (PFRxx, EPFRxx) To enable PFM output one should enable its corresponding port function register. Please refer data sheet of corresponding device for more information 2.3 PFM Counter Operation 2.3.1 Reload Counter Operation This section describes the operations of the 16-bit reload counter The Peripheral Clock (CLKP) divided by 2, 8, 32, 64 or 128 can be selected as the clock source when operating the counter from an internal clock. Writing "1" to both the CNTE and TRG bits in the control status register enables and starts counting simultaneously. One clock cycle (CLKP divided by 2/8/32/64 or 128) is required from the counter start trigger Figure 2-2 Counter activation and operation timing An underflow occurs when the counter value changes from 0000H to FFFFH. Therefore, an underflow occurs after "reload register setting + 1" counts. If the RELD bit in the control register is "1" when the underflow occurs, the contents of the reload register are loaded into the counter and counting continues. When RELD is "0", counting stops with the counter at FFFFH. The UF bit in the control register is set when the underflow occurs. If the INTE bit is "1" at this time, an interrupt request is generated. MCU-AN-300065-E-V10-8 - Fujitsu Microelectronics Europe GmbH

Chapter 2 Pulse Frequency Modulator 2.3.2 PFM Operation and Setting Figure 2-3 Underflow Operation Timing This section describes the following operations of the 16-bit pulse frequency modulator (combining the functionality of both reload counters). The underflow output of reload counter channel 0 is connected internally to the trigger input reload counter channel. The underflow output of reload counter channel 1 is connected internally to the trigger input of reload counter channel 0. Both counters must be set up with RELD = 0. Counter 0 should then be started by software trigger TRG = 1. By starting counter 0 a high level is generated at the output. At the underflow condition of counter 0, counter 1 is automatically reloaded and started by the internal trigger (falling edge, set MOD1 = 1 for both counters) and a low level is generated at the output. At the underflow condition of counter 1, counter 0 is automatically reloaded and started by the internal trigger and a high level is generated at the output. Interrupts can be set up on underflow condition of counter 0, counter 1 or both. The interrupts of counter 0 and counter 1 are combined together (logical OR). The default output is low level if both CNTE = 0, and both INV = 0. Fujitsu Microelectronics Europe GmbH - 9 - MCU-AN-300065-E-V10

2.4 Calculation PULSE FREQUENCY MODULATOR (PFM) Chapter 2 Pulse Frequency Modulator If we need to generate a following waveform with T High = 20ms and T Low = 100ms T High T Low We can calculate T High as, T High = (P0TMRLR + 1) * (1/ (CLKP/ P0TMCSR: CTS)) Let us assume CLKP is 16MHz and P0TMCSR: CTS is B 010 Than, T High = (P0TMRLR + 1) * (1/ (16MHz/32)) I.e. P0TMRLR = (20ms / (2NS)) + 1 = 10001 Similarly, T Low = (P1TMRLR + 1) * (1/ (CLKP/ P1TMCSR: CTS)) Let us assume P1TMCSR: CTS is B 101 Than, T Low = (P0TMRLR + 1) * (1/ (16MHz/64)) I.e. P0TMRLR = (100ms / (4NS)) + 1 = 25001 MCU-AN-300065-E-V10-10 - Fujitsu Microelectronics Europe GmbH

Chapter 3 Software Example 3 Software Example EXAMPLE FOR PULSE FREQUENCY MODULATOR 3.1 Basic Functionality of the PFM The following example shows how to set up the Pulse Frequency Modulator. /* THIS SAMPLE CODE IS PROVIDED AS IS AND IS SUBJECT TO ALTERATIONS. FUJITSU */ /* MICROELECTRONICS ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR */ /* ELIGIBILITY FOR ANY PURPOSES. */ /* (C) Fujitsu Microelectronics Europe GmbH */ /*---------------------------------------------------------------------------*/ void InitPFM(void) { PFR16_D6 = 1; EPFR16_D6 = 1; P0TMRLR = 0x2711; P0TMCSR_INV = 0; P0TMCSR_CSL = 2; P0TMCSR_MOD1 = 1; P0TMCSR_RELD = 0; P0TMCSR_INTE = 1; P0TMCSR_UF = 0; P0TMCSR_CNTE = 1; P1TMRLR = 0x61A9; P1TMCSR_INV = 0; P1TMCSR_CSL = 5; P1TMCSR_MOD1 = 1; P1TMCSR_RELD = 0; P1TMCSR_INTE = 1; P1TMCSR_UF = 0; //Reload Register //default level //CLKP / 2^5 //PFM operation //Count operation stops when an underflow occurs //Interrupt enabled // Clear underflow flag //sets the counter to wait for a trigger //Reload Register //default level //CLKP / 2^6 //PFM operation //Count operation stops when an underflow occurs //Interrupt enabled // Clear underflow flag P1TMCSR_CNTE = 1; //sets the counter to wait for a trigger P0TMCSR_TRG = 1; //TRG applies a software trigger } interrupt void PFMIRQHandler (void) { } if(p0tmcsr_uf == 0) { P0TMCSR_UF = 0; } else if(p1tmcsr_uf == 0) { P1TMCSR_UF = 0; } else { P1TMCSR_UF = 0; P0TMCSR_UF = 0; } Fujitsu Microelectronics Europe GmbH - 11 - MCU-AN-300065-E-V10

Chapter 4 Additional Information 4 Additional Information Information about FUJITSU Microcontrollers can be found on the following Internet page: http://mcu.emea.fujitsu.com/ The software examples related to this application note is: 91460_PFM It can be found on the following Internet page: http://mcu.emea.fujitsu.com/mcu_product/mcu_all_software.htm MCU-AN-300065-E-V10-12 - Fujitsu Microelectronics Europe GmbH

List of Figures List of Figures Figure 2-1: PFM Block Diagram... 6 Figure 2-2 Counter activation and operation timing... 8 Figure 2-3 Underflow Operation Timing... 9 Fujitsu Microelectronics Europe GmbH - 13 - MCU-AN-300065-E-V10

List of Tables List of Tables Table 2-1: P0TMCSR and P1TMCSR... 7 MCU-AN-300065-E-V10-14 - Fujitsu Microelectronics Europe GmbH