Presentation is loading. Please wait.

Presentation is loading. Please wait.

Renesas Electronics America Inc. Jeremy Brodt

Similar presentations


Presentation on theme: "Renesas Electronics America Inc. Jeremy Brodt"— Presentation transcript:

1 ID 027C: The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics
Renesas Electronics America Inc. Jeremy Brodt Senior Technical Applications Engineer 12 October 2010 Version 1.1

2 Jeremy Brodt Senior Technical Application Engineer
Responsible for 32-bit Automotive Body MCUs Development support Product definition Previous Experience: Automated Systems Test Engineer for Body and Safety products at Delphi Electronics & Safety MSCE from The University of Texas at Dallas BSCE from Purdue University © 2010 Renesas Electronics America Inc. All rights reserved.

3 Renesas Technology and Solution Portfolio
Microcontrollers & Microprocessors #1 Market share worldwide * Solutions for Innovation Analog and Power Devices #1 Market share in low-voltage MOSFET** ASIC, ASSP & Memory Advanced and proven technologies In the session 110C, Renesas Next Generation Microcontroller and Microprocessor Technology Roadmap, Ritesh Tyagi introduces this high level image of where the Renesas Products fit. The big picture. * MCU: 31% revenue basis from Gartner "Semiconductor Applications Worldwide Annual Market Share: Database" 25 March 2010 ** Power MOSFET: 17.1% on unit basis from Marketing Eye 2009 (17.1% on unit basis). © 2010 Renesas Electronics America Inc. All rights reserved.

4 Renesas Technology and Solution Portfolio
Microcontrollers & Microprocessors #1 Market share worldwide * Solutions for Innovation ASIC, ASSP & Memory Advanced and proven technologies Analog and Power Devices #1 Market share in low-voltage MOSFET** This is where our session, 027C FX4 Timers is focused within the ‘Big picture of Renesas Products’ * MCU: 31% revenue basis from Gartner "Semiconductor Applications Worldwide Annual Market Share: Database" 25 March 2010 ** Power MOSFET: 17.1% on unit basis from Marketing Eye 2009 (17.1% on unit basis). 4 © 2010 Renesas Electronics America Inc. All rights reserved.

5 Microcontroller and Microprocessor Line-up
Up to 1200 DMIPS, 45, 65 & 90nm process Video and audio processing on Linux Server, Industrial & Automotive Superscalar, MMU, Multimedia Up to 500 DMIPS, 150 & 90nm process 600uA/MHz, 1.5 uA standby Medical, Automotive & Industrial High Performance CPU, Low Power Up to 165 DMIPS, 90nm process 500uA/MHz, 2.5 uA standby Ethernet, CAN, USB, Motor Control, TFT Display High Performance CPU, FPU, DSC Legacy Cores Next-generation migration to RX H8S H8SX M16C R32C Here are the MCU and MPU Product Lines, I am not going to cover any specific information on these families, but rather I want to show you where this session is focused General Purpose Ultra Low Power Embedded Security Up to 10 DMIPS, 130nm process 350 uA/MHz, 1uA standby Capacitive touch Up to 25 DMIPS, 150nm process 190 uA/MHz, 0.3uA standby Application-specific integration Up to 25 DMIPS, 180, 90nm process 1mA/MHz, 100uA standby Crypto engine, Hardware security © 2010 Renesas Electronics America Inc. All rights reserved.

6 Microcontroller and Microprocessor Line-up
Superscalar, MMU, Multimedia Up to 1200 DMIPS, 45, 65 & 90nm process Video and audio processing on Linux Server, Industrial & Automotive Legacy Cores Next-generation migration to RX High Performance CPU, FPU, DSC R32C M16C H8S H8SX Embedded Security Up to 10 DMIPS, 130nm process 350 uA/MHz, 1uA standby Capacitive touch Up to 25 DMIPS, 150nm process 190 uA/MHz, 0.3uA standby Application-specific integration Up to 25 DMIPS, 180, 90nm process 1mA/MHz, 100uA standby Crypto engine, Hardware security Up to 165 DMIPS, 90nm process 500uA/MHz, 2.5 uA standby Ethernet, CAN, USB, Motor Control, TFT Display Ultra Low Power General Purpose Up to 500 DMIPS, 150 & 90nm process 600uA/MHz, 1.5 uA standby Medical, Automotive & Industrial High Performance CPU, Low Power V850 F Series High Performance, Low Power MCUs for Automotive Body Control Applications These are the products where this presentation applies © 2010 Renesas Electronics America Inc. All rights reserved.

7 Innovation in Automotive Lighting Technology
You have probably noticed changes in vehicle lighting over the past few years. Advances in headlamp technology are providing increased safety for drivers and pedestrians. The superior endurance and power efficiency of solid state lighting is very attractive to automakers, and LEDs are finding their way into all kinds of vehicle lighting applications. In addition, the cost effectiveness of the LED is providing an opportunity for Automakers to differentiate their products through fashion and comfort. There is a trend in our culture to have customized surroundings. From MySpace pages and Firefox personas to cell phone cases; we like to personalize our world. Soon you will find that you can personalize your vehicle, too. Automakers are experimenting with ways to allow drivers to apply their own photos or themes to their dashboard display. Imagine being able to select from several virtual gauge styles. New vehicles are on the road today that allow drivers to customize the color of the interior lighting. You could select your favorite color, or one that matches your current mood. Maybe it adjusts automatically based on the ambient lighting conditions. © 2010 Renesas Electronics America Inc. All rights reserved.

8 Renesas’ F Series Enables Your Bright Ideas
Renesas has developed an optimum, full system solution for vehicle lighting control. Renesas is providing you the means to implement your driver comfort and customization ideas in an easy and robust manner. These lighting innovations increase the control and diagnostics requirements placed on vehicle body electronics systems. To meet these needs, Renesas has developed an optimum, full system solution for vehicle lighting control. With an industry leading MCU solution and intelligent power devices, Renesas is providing you the means to implement your driver comfort and customization ideas in an easy and robust manner. © 2010 Renesas Electronics America Inc. All rights reserved.

9 Agenda V850/Fx4 Product Introduction Timer Array Unit (TAU)
PWM Delay & Driver Diagnostics Conclusion © 2010 Renesas Electronics America Inc. All rights reserved.

10 Key Takeaways By the end of this session you will:
Understand the capabilities of the Timer Array Unit (TAU) Understand the features and benefits of the PWM Delay Generator Understand the features and benefits of the Driver Diagnostics Control Unit <click to review each bullet> © 2010 Renesas Electronics America Inc. All rights reserved.

11 V850/Fx4 Product Introduction
© 2010 Renesas Electronics America Inc. All rights reserved.

12 MCU Products for Automotive Electronics
Renesas’ Automotive MCU lineup includes application specific standard product series. These series are tailored for specific vehicle applications. The V850/Fx4 are the fourth generation of products in our F Series. This series is designed for body electronics systems like lighting control, power distribution, vehicle security, and door and window control. V850/F Series © 2010 Renesas Electronics America Inc. All rights reserved. 12

13 V850/Fx4 Features and Benefits
PWM delay and driver diagnostic function Minimize EME and synchronize driver diagnostic with minimum CPU overhead 12-bit A/D Converter High-precision sensor readings and flexible scheduling with multiple trigger groups LIN Master Minimize CPU load for managing multiple LIN buses Buffered CSI w 8 chip selects per channel Minimize CPU load for managing smart power devices and other ICs Hot Attach & Live Debug Enhanced debug capabilities for easier development and troubleshooting <review each feature and benefit, one-by-one> Voltage Comparators Fast response to battery disconnect System Protection Functions (SPF) Minimize CPU load for managing multiple LIN buses Fx4-H Minimize CPU load for managing multiple LIN buses © 2010 Renesas Electronics America Inc. All rights reserved.

14 V850/Fx4 Lineup The broadest Body MCU lineup in the industry
Memory sizes from 256 KB to 4 MB Package sizes from 64-pin to 256-pin including QFP and BGA Scalable performance Fx4-L up to 64 MHz Fx4 up to 80 MHz Fx4-H up to 160MHz Renesas Electronics has the broadest 32-bit Body MCU lineup in the industry. <click> The Fx4 family provides memory sizes from 256KB to 4MB and packages from 64-pins up to 256-pins, including both QFP and BGA packages. The Fx4 provides scalable performance, with three sub-families: the Fx4-L up to 64MHz, the Fx4 up to 80MHz, and the Fx4-H up to 160MHz. With compatibility across the family, the breadth of the lineup allows you to develop a platform body architecture. Choose the derivates that are needed to meet specific project requirements, and reuse you platform software components. © 2010 Renesas Electronics America Inc. All rights reserved.

15 V850/Fx4 Lineup Here is an overview of the Fx4 lineup. There are 43 products in total. © 2010 Renesas Electronics America Inc. All rights reserved. 15

16 V850/Fx4 Block Diagram V850E2M Core Memory Options
Timer Array Unit A/B Package: 100- to 208-pin QFP/BGA FCAN 64 & 128 message buffers 128 msg Diagnostic FCAN Timer Array Unit C V850E2M Core MHz 3.0 – 5.5 V (single voltage) -40 to +85°C/+110°C/+125°C Timer Array Unit J FlexRay PWM Delay & Diagnostic Function FPU OS Timer Window Watchdog System Protection Functions CSI Real-Time Clock DMA On-Chip Debug CSI with FIFO ENC TOP Memory Options I2C 512 KB to 2 MB Flash Internal Osc. 240 kHz + 8 MHz UART / LIN Fx4 has a wide range of features tailored for automotive body applications. Today, I will be talking about the Timer Array Units and PWM Delay & Diagnostic functions. Main Osc. 4 to 20 MHz 48 to 144 KB RAM 4 to 16 KB Back-up RAM LIN Master Sub Osc. kHz Key Return 32 to 64 KB Data Flash PLL & SSCG Analog Voltage Comparator External Memory Interface 12-bit A/D Converter © 2010 Renesas Electronics America Inc. All rights reserved. 16

17 V850/Fx4 Lighting Control Benefits
Cost effective solution for vehicle lighting management Lots of PWM outputs Minimizes radiated emissions Greater diagnostic visibility Integration of external ASIC functions Low CPU overhead / minimal interrupts Fx4 provides a cost effective solution for vehicle lighting management. <click> Lots of PWM outputs to maximize the lighting control integration capacity. <click> Minimizes the radiated emissions of the system. <click> Provides greater diagnostic visibility of the lighting signals under Fx4 control. <click> Provides a system cost benefit by integrating external ASIC functionality. <click> Provides the lighting control capabilities with minimal CPU and interrupt overhead. © 2010 Renesas Electronics America Inc. All rights reserved.

18 Timers in Automotive Embedded timers have many uses in today’s automobiles. Let’s look at some. © 2010 Renesas Electronics America Inc. All rights reserved.

19 Timers have many uses in automotive control…
rcvr MCU <click> Wheel speed sensors encode wheel speed and direction in frequency and pulse width. RF receivers transmit the received data to the MCU via a pulse encoded protocol. Timer inputs are used to process both of these signals. Timers outputs are used to generate spark waveforms For motor control, timer outputs are used to generate the PWM phase signals. Timer inputs can be used to process the encoder signal and determine motor position. And timers are used extensively for vehicle interrior lighting control. Can anyone think of any other timer uses in automotive? <some answers> steering sensors for electronic steering turn signals keeping time of day for dashboard clock fuel injector control crank position sensing What other automotive timer uses can you think of? © 2010 Renesas Electronics America Inc. All rights reserved.

20 Timer Array Unit (TAU) Renesas has developed the Timer Array Unit to meet these timing needs. It is a flexible, scalable architecture that provides a wide variety of timing functions. By using a single timer architecture, the software development and time spent on the learning curve can be minimized. © 2010 Renesas Electronics America Inc. All rights reserved.

21 Timer Array Unit A Highlights
16-channel, 16-bit Timer Array Lots of timer channels up to 80 on FL4 Channels like building blocks work independently to provide basic functions combined to achieve complex operations Flexible clock supplies four prescalers per array Software reusable across V850 products PCLK Prescaler1:4 15bit Clock Divider Clock Selector TI0 ch0 16bit Counter TO Data-Register TO0 INT0 TI1 ch1 16bit Counter TO Data-Register TO1 INT1 TI2 ch2 16bit Counter TO Data-Register TO2 INT2 TI3 ch3 16bit Counter TO Data-Register TO3 INT3 The Timer Array Unit is an array of 16 timer channels. Each channel consists of a basic 16-bit timer with counter and data register that is used for capture and compare operations. <click> The architecture provides lots of timer channels. Up to 80 on the 208-pin FL4 product. Each channel can operate independently or in combination with one or more channels. This allows the timer array unit to meet a variety of application needs with a single timer and software set. Four prescalers are available to select each channels’ source clock from. The same timer array unit is used across all V850 x4 products. TI4 ch4 TO4 16bit Counter TO INT4 Data-Register TI15 ch15 16bit Counter TO Data-Register TO15 INT15 © 2010 Renesas Electronics America Inc. All rights reserved.

22 TAUA Common Functions Independent Channel Functions Interval timer
External event count Input pulse measurement Free running input capture One-pulse output Input pulse judgment Real-time output Simultaneous rewrite trigger generation One-phase PWM output Synchronous Channel Functions PWM output Delayed output PWM Triangular PWM output Triangular PWM with dead time One-shot pulse output Interrupt culling AD conversion trigger output Synchronous real-time output Non-complementary modulation output Complementary modulation output The Timer Array Unit support functions to meet the needs of a wide range of applications. <click> These are the functions commonly used in body applications. Interval timing provides a periodic interrupt at a programmable frequency. External event count mode allows you to count input edges. Input pulse measurement is used to determine period and/or pulse width of an input signal. Free running input capture allows you to time stamp input edges. PWM output generates a pulse width modulated output signal with programmable frequency and duty. Delayed output PWM allows you to insert a programmable delay between PWM outputs. Key functions for Body Apps © 2010 Renesas Electronics America Inc. All rights reserved.

23 15-bit Counter (fx/2 to fx/215)
Flexible Clock Supply clock supply to TAU macro up to 48MHz (21ns) on Fx4 Prescaler Block PCLK 15-bit Counter (fx/2 to fx/215) BRG Block BRS7-0 Selector Selector Selector Selector 8-bit counter CK0 CK1 CK2 CK3 PRS03-00 PRS13-10 PRS23-20 PRS33-30 <click> On Fx4, the TAU macro can be clocked up to 48MHz, providing 21ns of timing resolution. <click> There are 4 configurable power-of-2 clock dividers to generate the count clocks for timer channels. <click> Each timer channel can select from any of these 4 clock sources. <click> Clock source CK3 also includes an integer divider for more precise frequency generation. 4 configurable power-of-2 clock dividers (CK0 to CK3) CK3 includes an integer divider each channel can select from any of the 4 clock sources (CK0 to CK3) © 2010 Renesas Electronics America Inc. All rights reserved.

24 Pulse Measurement Measure the pulse width or frequency of an input signal ` PCLK Prescaler1:4 15bit Clock Divider Clock Selector TI0 ch0 16bit Counter TO Data-Register TO0 INT0 Pulse Width . Let’s look at an example of how the TAU can be used for pulse measurement. In this example, we would like to measure the high time, or the time between the rising and falling edges. First we will select clock for counting and sampling of input signal. We will then specify the falling edge as our capture edge. When edge occurs, the value of the counter is stored in data register and an interrupt is generated. Optionally, we can use DMA to service interrupt and buffer multiple edge times for later processing © 2010 Renesas Electronics America Inc. All rights reserved.

25 data is encoded in both duty and period of PWM signal
Timer Input Selection Multiple measurements using single input pin Reduce interrupts and minimize pin usage for Manchester decoding Decoding of pulse encoded signals data encoded in both duty and period of PWM signal internal connection data is encoded in both duty and period of PWM signal ` PCLK Prescaler1:4 15bit Clock Divider Period Clock Selector TI0 ch0 16bit Counter TO Data-Register TO0 INT0 Duty Duty TI1 ch1 16bit Counter TO Data-Register TO1 INT1 Period . Some input signals have data encoded in both the duty and the period of the input signal. What if we need to measure both? Traditionally, this would require either the servicing of interrupts at every edge, or inputting the signal into two MCU pins. <click> Fx4 provides an internal connection that connects the MCU pin to two timer channels. One channel measures the period of the signal, the other measures the duty. Some typical automotive signals that could utilize this feature are: Wheel speed sensor signals where speed is encoded in the period and direction in the duty. Manchester encoded signals from RF receivers. Manchester is a self clocking protocol where each bit has at least one transistion. © 2010 Renesas Electronics America Inc. All rights reserved.

26 Synchronous Channel Operation
Synchronous Operation Example – PWM generation PWM utilizes: 1 master channel for frequency 1 slave channel for duty cycle TAUA can generate up to 15 PWMs at the same frequency or 8 PWMs at different frequencies TAUA 3 PWMs at frequency 1 4 PWMs at frequency 2 2 PWMs at frequency 3 ch 0 - master ch 1 - slave ch 2 - slave ch 3 - slave ch 4 - master ch 5 - slave ch 6 - slave ch 7 - slave ch 8 - slave ch 9 - independent ch 10 - master ch 11 - slave ch 12 - slave ch 13 - independent ch 14 - independent ch 15 - independent ch 0 - master ch 1 - slave ch 2 - slave ch 3 - slave ch 4 - master ch 5 - slave ch 6 - slave ch 7 - slave ch 8 - slave ch 9 - slave ch 10 - master ch 11 - slave ch 12 - slave ch 13 - slave ch 14 - master ch 15 - slave 3 PWMs at frequency 1 5 PWMs at frequency 2 3 PWMs at frequency 3 1 PWMs at frequency 4 ch 0 ch 1 ch 2 ch 3 ch 4 ch 5 ch 6 ch 7 ch 8 ch 9 ch 10 ch 11 ch 12 ch 13 ch 14 ch 15 15 PWMs at the same frequency ch 0 - master ch 1 - slave ch 2 - slave ch 3 - slave ch 4 - slave ch 5 - slave ch 6 - slave ch 7 - slave ch 8 - slave ch 9 - slave ch 10 - slave ch 11 - slave ch 12 - slave ch 13 - slave ch 14 - slave ch 15 - slave TO TO0 TO TO1 TO TO2 TO TO3 TO TO4 TO TO5 TO TO6 TO TO7 TO TO8 TO TO9 In the timer array unit, channels can work together to perform timing tasks. This is called synchronous channel operation. An example of this is PWM generation, which uses a master channel to time the period and a slave channel to time the duty cycle. Lets have a look at some timer array unit configurations. <click> TAUA can generate up to 15 PWM outputs at the same frequency. Channel 0 is used to time the period. All other channels are used to time an independent duty cycle, and to output the PWM signal. Multiple master channels can be used to generate PWM outputs of different frequencies. Channels performing other timing tasks can also be intermixed with the PWM signal generation. TO TO10 TO TO11 TO TO12 TO TO13 TO TO14 TO TO15 © 2010 Renesas Electronics America Inc. All rights reserved. 26

27 TAUA Channel Interconnections
Channels can be combined to achieve complex operations Signals between channels enable coordination start/stop control, output control, update timing TAUA start trigger master ch INT upper ch INT simultaneous rewrite up/down signal real-time trigger TIm channel m TI TOm 16bit Counter TOC INTm Interconnects between the channels of the timer array unit are what allow the coordination of channels to occur. <click> Signals are passed between master and slave channels, and with the channels above and below a given channel. These signals allow control of when a channel starts, stops, and resets operation. The channel output can be affected. Interconnects also allow for synchronous updates to multiple channels. Data-Register start trigger INT to slave ch simultaneous rewrite INT to lower ch up/down signal real-time trigger © 2010 Renesas Electronics America Inc. All rights reserved.

28 Synchronous Start Function
All channels’ operation can be started synchronously Single register for all enable/start bits TE (Timer Enable) enables count operation ST (Start Trigger) clears the counter and starts the timer TE15 TE14 TE13 TE Register (Timer Enable) : Timer Count Enable TE12 TE11 TE10 TE09 TE08 TE07 TE06 TE05 TE04 TE03 TE02 TE01 TE00 ST15 ST14 ST13 ST12 ST11 ST10 ST09 ST08 ST07 ST06 ST05 ST04 ST03 ST02 ST01 ST00 ST Register (Timer Start Trigger) : Timer Counter Clear & Timer Start In order for channels to work together in lock-step, a mechanism is provided to start, stop, or restart any of the timer channels in an array at the exact same time. The set only control bits for each channel are combined into a single register. In a set only control bit, writing a value of 1 will cause some action to occur, while a 0 indicates nothing is to be done. With a single register write any of the timer channels can be selectively started or stopped. © 2010 Renesas Electronics America Inc. All rights reserved. 28

29 Simultaneous Rewrite Synchronously update multiple channels
compare/start values output logic Update becomes active upon user selectable event master channel upper channel interrupt from upper channel Example Application: 3 phase motor control simultaneous update to the duty values of all phases The Simultaneous Rewrite function provides the means to synchronously update the compare/start values and output logic of multiple channels. New values are written to respective data/control registers, and the trigger is then set. The new values only become active after the specified event occurs © 2010 Renesas Electronics America Inc. All rights reserved.

30 Simultaneous Rewrite Example
INTTAUAnI0 TAUAnCNT0 TAUAnRDT.RDTm b activate b update a ch 1 duty value ch 2 output polarity TAUAnCDR1 TAUAnCDR1 buf TAUAnTOUT1 TAUAnTOL.TOL2 Lets have a look at an example of simultaneous rewrite. Here we have 2 timer output signals (shown in blue). <click> For this example, we would like to update the duty value of channel 1 and the polarity of channel 2 at the same time. First, we write the new values to the data registers. These registers are buffered, so the changes to the output signals do not take place immediately. Let’s say we would like to update both values synchronous to the period of channel 1. We configure that as our update event, and set the update bit. At the start of the next period of channel 1, both the duty cycle of channel 1 and the polarity of channel 2 are updated. TAUAnTOL.TOL2 buf TAUAnTOUT2 © 2010 Renesas Electronics America Inc. All rights reserved.

31 DMA window address select
DMA Window Function Timing data is often transferred from the TAUA registers into RAM for processing by the application A single DMA channel transfers data from one or mode contiguous source addresses The DMA window function allows for the mapping of non-contiguous TAU registers into a contiguous window of address space DMA window address select TAUAnCDR0 TAUAnCDR2 TAUAnCDR4 TAUAnCDR6 TAUAnCDR9 TAUAnCDR13 TAUAnTOL.TOLm TAUAnRDT.RDTm TAUAnCDR1 TAUAnCDR3 TAUAnCDR5 TAUAnCDR7 TAUAnCDR8 TAUAnCDR10 TAUAnCDR11 TAUAnCDR12 TAUAnCDR14 TAUAnCDR15 DWR0 DWR1 DWR2 DWR3 DWR4 DWR5 DWR6 DWR7 DWR8 DWR9 DWR10 DWR11 DWR12 DWR13 DWR14 DWR15 DMA window register TAUAnCDR0 TAUAnCDR2 TAUAnCDR4 TAUAnCDR6 TAUAnCDR9 TAUAnCDR13 TAUAnTOL.TOLm TAUAnRDT.RDTm Capture data 0 Capture data 1 Count data 0 Capture data 2 Count data 1 Capture data 3 TAUAnCDR0 TAUAnCDR2 TAUAnCDR4 TAUAnCDR6 TAUAnCDR9 TAUAnCDR13 TAUAnTOL.TOLm TAUAnRDT.RDTm Many timing applications use DMA to transfer and buffer timing data in RAM. This cuts down on the number of interrupts that the CPU has to process. A typical DMA channel transfers data from one or more contiguous source addresses. <click> If the timing function you are performing does not use contiguous timer channels, this would require multiple DMA channels. Here we see an example of several data elements that we wish to transfer to RAM. The DMA window function allows the mapping of any of the timer channel data registers to a contiguous window of address space. A single DMA channel can then be used to transfer the data. © 2010 Renesas Electronics America Inc. All rights reserved.

32 Timer Array Unit Derivatives
With this base Timer Array Unit architecture, we have spun several derivatives to meet specific application and product requirements. So far, we have been looking at Timer Array Unit A. © 2010 Renesas Electronics America Inc. All rights reserved.

33 Timer Array Unit B TAUB is an optimized timer compatible with TAUA
Independent Channel Functions Interval timer External event count Input pulse measurement Free running input capture One-pulse output Input pulse judgment Real-time output Simultaneous rewrite trigger generation One-phase PWM output Synchronous Channel Functions PWM output Delayed output PWM Triangle PWM output Triangle PWM with dead time One-shot pulse output AD conversion trigger output Synchronous real-time output Non-complementary modulation output Complementary modulation output TAUB is an optimized timer array unit. <click> Functions which are not used in body applications are removed. TAUB is software compatible with TAUA for the functions common to both. Software compatible with TAUA © 2010 Renesas Electronics America Inc. All rights reserved.

34 Timer Array Unit C Optimized TAU providing additional PWM channels
Software compatible with TAUA TAUA ch 0 - master ch 1 - slave ch 2 - slave ch 3 - independent ch 4 - master ch 5 - slave ch 6 - slave ch 7 - independent ch 8 - master ch 9 - slave ch 10 - slave ch 11 - independent ch 12 - master ch 13 - slave ch 14 - slave ch 15 - independent TO TO1 TO2 TO3 TO5 TO6 TO7 TO9 TO10 TO11 TO13 TO14 TO15 external pin 2 ch. 0 period external pin internal connection external pin 2 ch. 4 period external pin internal connection Timer Array Unit C is optimized for the generation of PWM signals. All other timer functions are removed. This timer is used to cost effectively expand the total number of PWM outputs that Fx4 products can generate. TAUC generates 8 PWM outputs at 4 different frequencies. Only the 8 slave channels used for PWM generation are bonded out to pins. The 4 independent channels can be used for other internal timing tasks. TAUC is software compatible with TAUA and TAUB for PWM generation. external pin 2 ch. 8 period external pin internal connection external pin 2 ch. 12 period external pin internal connection © 2010 Renesas Electronics America Inc. All rights reserved. 34

35 Timer Array Unit J Each TAU channel consists of a basic 32-bit timer with counter and data register (capture/compare) Operation modes: Input capture (input pulse interval measurement or input signal width measurement) Compare match (interval timer) PWM output TAUJ is a 4 channel, 32-bit timer compatible with TAUA PCLK Prescaler1:4 15 bit Clock Divider Clock Selector TI0 ch0 32 bit Counter TO Data-Register TO0 INT0 TI1 ch1 32 bit Counter TO Data-Register TO1 INT1 TI2 ch2 32 bit Counter TO Data-Register TO2 INT2 TI3 ch3 32 bit Counter TO Data-Register TO3 INT3 TAUJ is a 32-bit version of the Timer Array Unit. The count and data registers are extended to 32-bits to provide extended timing range. TAUJ has 4 channels, and provides input capture, compare match, and PWM output functionality. © 2010 Renesas Electronics America Inc. All rights reserved. 35

36 Review Question How many PWM outputs does TAUC generate?
TAUC generates up to 8 PWM with 4 independent frequencies TAUA/B generates 15 PWM with a common frequency or up to 8 PWM with independent frequencies <click to show answers> © 2010 Renesas Electronics America Inc. All rights reserved.

37 PWM Delay & Driver Diagnostics
The TAU has been designed with flexibility in mind. Modular add-ons have been developed to extend the timer functionality and further off-load the CPU core. One of these add-on units is the PWM Delay & Driver Diagnostic Unit. This unit is used for automotive lighting management in main body computer electronics control units. © 2010 Renesas Electronics America Inc. All rights reserved.

38 Automotive Lighting The main body computer of a vehicle is responsible for controlling much of the vehicle lighting including head lamps, tail lamps, turn signals, dome lamps, and other interior lighting. This can add up to more than fifty lights to control. The MCU of a typical body control unit is responsible for generating the control signals to turn these lights on and off, control the intensity, and provide features like color mixing, dimming, and soft start. Why PWM? RGB color mixing dimming soft start power conservation Why so many? head lights, tail lights, indicator lights, dome lights, and panel backlights DRLs (daytime running lights), position lights, turn signals, and high-/low-beam assemblies head lamps, daytime running lights, fog lights, turn signals, interior lighting, infotainment backlighting, rear combination lamps (RCL) and center high-mounted stop lamps (CHMSL) © 2010 Renesas Electronics America Inc. All rights reserved.

39 The PWM Lighting Challenge
Concurrent active edges cause peak current supply and radiated emissions problems Open load detection requires sampling current sense at a specific point in the on cycle MCU PWM Timer A/D converter Bulb PWMs at 100Hz The main body computer of a vehicle is responsible for controlling much of the vehicle lighting including head lamps, tail lamps, turn signals, dome lamps, and other interior lighting. This can add up to more than fifty lights to control. The MCU of a typical body control unit is responsible for generating the control signals to turn these lights on and off, control the intensity, and provide features like color mixing, dimming, and soft start. To do this, pulse width modulated, or PWM signals are generated by the MCU. These signals are provided to power management devices on the ECU that source the current required to turn on the light. With each PWM pulse, the lights are turned on and off. These pulses occur so fast that the human eye cannot detect it, and the light just appears to be on. The duty cycle of the signal controls the intensity of the light by adjusting the on-time of the pulse. Both incandescent bulbs and LEDs are found in a typical vehicle. The switching frequency of a bulb is typically 100Hz. For an LED it is 200Hz. The ECU can be responsible for sourcing the current for many lights. When the light is turned on with each PWM pulse, there is a large inrush current. When all of PWM pulses switch at the same time, large current spikes occur, and this power generates radiated emissions from the ECU. In additional to controlling the lights, the MCU is also responsible for diagnosing failures in the lighting system. In recent years, automakers have been increasing this diagnostic capability. <click> Feedback signals are provided from each of the power drivers to the MCU. These analog signals allow the MCU to sense the amount of current being provided by the driver, and detect open and short circuit failures. Because of the inrush current, and turn on delay, these feedback signals must be sensed at a specific point within the on cycle of the light. LED PWMs at 200Hz © 2010 Renesas Electronics America Inc. All rights reserved.

40 Current Sense Feedback Sampling
Incandescent Bulb Example typ. freq: 100Hz typ. min delay: 3ms A/D Trigger PWM PWM Output MCU Driver Output ANI Current Sense LED Example PWM ANI MCU Similar waveforms as above with: typ. freq: 200Hz typ. min delay: 350us Here is an example waveform of a single PWM pulse controlling a lamp. The PWM frequency typically used for bulb is around 100 Hz. In this case, we have shown a 50% duty cycle. <click> Here is the associated waveform of the driver output. Notice the turn on delay before the lamp is fully on. Here is the current sense waveform. This is an analog voltage signal that is proportionate to the actuate current flowing through the driver. The MCU inputs this waveform on an input to an analog-to-digital converter. Notice the high inrush current. The sense waveform gets clipped to a maximum value. What is shown here is the normal operation case. If there was a fault, these sense feedback would either stay at the min or max values. The MCU must sample and convert this analog signal at some point after this inrush current, after the driver output has stabilized. This results in a minimum delay of 3ms from the active edge of the PWM to the sample point of the A/D converter. The resulting waveforms for controlling an LED are similar. The only differences are the timing. The PWM frequency for controlling an LED is faster; typically 200Hz. The minimum sample delay is much shorter; typically 350us. © 2010 Renesas Electronics America Inc. All rights reserved.

41 Requirements PWM Generation Generate up to 64 PWM output signals
Limit simultaneously switching to no more than 8 channels Distribute active edges evenly within a period Two frequencies (bulb frequency / LED frequency) Driver Diagnostics Diagnostic capability for each PWM output HW control of external analog multiplexer Secure diagnostic (3 samples) within 250ms Now, let’s review some of the system requirements that need to be met in order provide an effective lighting management solution for a BCM. <click> We should be able to generate up to 64 PWM output signals To limit peak current in the ECU, no more than 8 of these PWM output signals should be able to switch at the same time. When staggering these PWM signals, we should distribute the active edges as evenly as possible to further limit current peaks. We must support at least 2 frequencies for the different types of lights. We should have the ability to diagnose every driver that we are controlling Because the number of MCU pins, and analog inputs are limited, we should provide the ability to contol an external analog multiplexer for the current sense signals. We must be able to sense each driver feedback signal at least 3 times within 250ms. © 2010 Renesas Electronics America Inc. All rights reserved.

42 PWM Delay & Driver Diagnostic Functions
Goals: Minimize radiated emissions Synchronize driver diagnostic sampling with minimum CPU overhead EME delay Bulb A/D trigger delay LED A/D trigger delay Diagnostic feedback Bulb PWMs at 100Hz LED PWMs at 200Hz FX4 optional analog multiplexer A/D converter Timer TAUC Delay Gen. Trigger Gen. To overcome the challenges that we have highlighted, the Fx4 has implemented to timer add-on units. The PWM delay generator inserts a programmable channel-to-channel delay between PWM output signals. This dealy is shown in this diagram in blue. This allows us to minimize peak currents and radiated emissions. The diagnostic trigger generator, inserts a programmable A/D trigger delay. This delay is shown in green and red in the diagram, and is different depending on the type of light being controlled. Optionally, the diagnostic trigger generator is also able to control and external analog multiplexer for the driver feedback signals. © 2010 Renesas Electronics America Inc. All rights reserved. 42

43 Fx4 Lighting Management System
PWM generation Delay generation bulbs / LEDs current sense ADC Trigger group 1 Trigger group 2 Trigger group 0 3 MUX control Diagnostic control ADC trigger control PWM Diag Trigger Interrupt RAM DMA Analog Multiplexers Let’s step through the Fx4 system in detail. First the TAU timers are used to generate up to 64 PWM output signals. <click> Before these signals are provided to the MCU pins, the signals pass through the delay generation unit, where a user programmable delay is inserted between the active edges. The PWM signals are then output from the MCU to the drivers. Each driver provides a current sense signal, that is connected to the inputs’ of the Fx4 analog-to-digital converter. The PWM signals are also provided to the diagnostic control unit. Here the user programmable trigger delay is inserted, and the A/D sample triggers are generated. Because there are more timer outputs than analog inputs on a typical MCU, an analog multiplexer can be added to switch the driver feedback signals. The diagnostic control unit provides the multiplexer address control, synchronous to the PWM signals. After the driver feedback signals are sampled and converted, a DMA is used to transfer all of the results to RAM. The CPU is notified by an interrupt after all results have been transferred. © 2010 Renesas Electronics America Inc. All rights reserved.

44 PWM Generation Using TAU
Ch0 Ch1 Ch3 Ch5 Ch6 Ch7 Ch8 Ch9 Ch10 Ch11 Ch12 Ch13 Ch14 Ch15 Ch2 Ch4 Ch0 : Master Ch1 : Slave Ch3 : Other Ch5 : Slave Ch6 : Slave Ch7 : Other Ch8 : Master Ch9 : Slave Ch10 : Slave Ch11 : Other Ch12 : Master Ch13 : Slave Ch14 : Slave Ch15 : Other Ch2 : Slave Ch4 : Master PWM0 PWM1 PWM2 PWM3 PWM4 PWM5 PWM6 PWM7 Channel 0’s period Channel 4’s Channel 8’s Channel 12’s Master channel Slave channels PWM channels 1, 2, 3 1, 2 4 5, 6, 7 5, 6 8 9, 10, 11 9, 10 12 13, 14, 15 13, 14 The Fx4 Timer Array Units are used for PWM generation. <click> The TAU configuration used for lighting management, generates 8 PWM outputs. Four of the TAU channels are configured as master channels, and are used to time the PWM frequency. Each master’s frequency can be programmed independently. Each master channel has two slave channels that time the duty cycle and generate the PWM outputs. The lighting management system uses a few of the other channels. These will be explained in upcoming slides. © 2010 Renesas Electronics America Inc. All rights reserved.

45 PWM Delay Generation Programmable delay time
Clock counter clear start Match td Compare register >1 Match start counter clear Each of the 64 PWM outputs has its own PWM delay generation unit. The delay of each unit can be independently programmed, by writing a value to the compare register. Separate counters are maintained for each edge, and each edge is delayed by the same amount. x 64 Programmable delay time Individual delay circuit for each PWM channel © 2010 Renesas Electronics America Inc. All rights reserved.

46 PWM Frequency Definitions
Synchronous: PWM outputs with a frequency that is an integer multiple of a base PWM frequency (fbase) Asynchronous: PWM outputs with a frequency that is not an integer multiple of the base PWM frequency For synchronous PWMs, exactly The Fx4 diagnostic control unit is able to manage both synchronous and asynchronous PWM outputs. A Synchronous PWM output is one with a frequency that is an integer multiple of a base frequency. The base frequency is typically the bulb frequency of 100Hz. An example of a synchronous PWM output would be an LED signal at 200 or 300Hz. An example of an asynchronous PWM would be an light at 266Hz. As you will see in the following slides, the way triggers are generated for each of these types of PWM is slightly different. For synchronous PWM signals, the synchrony can be exploited to reduce the total number of triggers generated. © 2010 Renesas Electronics America Inc. All rights reserved.

47 Analog MUX Control Generation of multiplexer addresses without CPU interaction MUX address generation 0x07 Period start trigger selector clear Match Control logic TAU outputs 1 Count up trigger 3-bit counter MUX 2 ADC interrupt One of the “other” timer channels that is not being used for PWM generation is used as a count up signal for the external analog multiplexer address generation. A selector is provided to select the desired timer channel to be used. <click> The timer channel is programmed to generate the count up signal at the base PWM frequency. The base PWM frequency is the slowest synchronous PWM frequency; typically the bulb frequency. Each pulse of the count up signal, increments the multiplexer address value. The address value resets to zero at a user programmable rollover value, up to 0x7. The A/D conversion complete interrupt is provided as an input to the control logic. The address value is only incremented after the interrupt occurs. This ensures that the conversion operation has completed before switching the multiplexer output. 000 001 010 011 MUX 1 2 MUX only changes after analog conversion © 2010 Renesas Electronics America Inc. All rights reserved.

48 Driver Current Sense Feedback Multiplexing
Multiplexer Multiplexer current sense Bulb LED to A/D converter MUX ctrl MUX address 111 110 101 100 011 010 001 000 000 001 010 011 Let’s look at an example of operation. Here, 8 PWM signals are being generated and the respective current sense feedback signals are connected to the analog multiplexer. The 4 signals in yellow represent buld signals at 100Hz. The 4 signals in black represent LED signals at 200Hz. <click> With the count up signal set to the base synchronous PWM frequency, the multiplexer switches with each period of the base PWM. For other synchronous PWM output like the last two signals, multiple periods occur for every one mux period. In the first period, bulb signal 1 is provided to the MCU analog input via the MUX. In the second period, bulb signal 2 is provided to the MCU analog input. In the third period, LED signal 1 is provided to the MCU analog input. Note that there are two PWM periods within the MUX switching period. We’ll talk about that more later. This sequence continues for each MUX input at which it will reset and start again from the first signal. To manage up to 64 lights, a BCM may use as many as 8 of these 8:1 multiplexers. © 2010 Renesas Electronics America Inc. All rights reserved.

49 Synchronous Diagnostic Trigger Overview
Multiplexer current sense Bulb PWM 0 to A/D converter Bulb PWM 1 Multiplexer LED PWM 0 LED PWM 1 000 001 010 011 100 101 110 111 MUX Addr. Let‘s now consider where the correct A/D trigger point would be for each of these signals. In this example, we will consider the signals of two of the multiplexers. The signal shown in blue is a bulb signal and is connected to MUX 1. The green signal is an LED signal and is connected to MUX 2. Note that the LED is synchronous to the PWM. The blue and green boxes indicate the minimum trigger delay for the buld and the LED respective. Remember that this trigger must occur after the inrush current and turn on delay. Note that these triggers occur at different points. Note that two LED pulses occur within the multiplexer period. The feedback signal is only sampled for one of these pulses. Now lets add the second signal connected to each multiplexer. <click> We have added a channel-to-channel delay between the first and second signals. This delay with help us minimize peak currents by staggering the active edges of the signals. The PWM diagnostic unit accounts for this channel-to-channel delay and generates the A/D triggers at the correct point in times. When the channel-to-channel delay is set to evenly stagger all 8 PWM signals, the PWM diagnostic unit will add this delay and generate the trigger at the correct time for each MUX period. LED minimum sync delay Bulb minimum sync delay ADC trigger for LED ADC trigger for Bulb LED channel-to-channel delay Bulb channel-to-channel delay © 2010 Renesas Electronics America Inc. All rights reserved.

50 Synchronous Diagnostic Trigger Generation
Generation of ADC triggers without CPU interaction Match clear counter Compare register Trigger timing generation 2 Trigger Output controller 3 Start trigger selector 1 TAU outputs 1 td.ad Let’s see how the synchronous diagnostic triggers are generated. <click> First, we use one of the “other” timer channels that is not being used for PWM generation to time the desired A/D trigger delay. This is the delay between the active edge of the PWM pulse, and when the current sense feedback signal is sampled by the analog-to-digital converter. A selector is provided to select the desired timer channel to be used. Since we have added a channel-to-channel delay between our PWM signals, we must take this into account for our A/D trigger generation. The channel-to-channel delay used, is programmed into a compare register for the correct trigger timing generation. This generates a series of 8 pulses. Each is equally spaced according to the delay value programmed into the compare register. Each of these pulses represents the correct trigger timing for one of the 8 multiplexer periods. Next the trigger output controller selects the correct trigger to output to the A/D converter based on the current multiplexer period. 2 1 3 4 000 001 010 011 MUX 3 1 2 4 © 2010 Renesas Electronics America Inc. All rights reserved.

51 Asynchronous Diagnostic Trigger Generation
Generation of ADC triggers without CPU interaction Match clear counter Compare register Trigger timing generation 2 Start trigger selector 1 TAU outputs 1 td.ad I mentioned earlier that the Fx4 lighting management also has diagnostic trigger generation support for asynchronous PWMs. The trigger generation is basically the same as the synchronous case. <click> 8 triggers are generated to support up to 8 channel-to-channel delays per PWM period. The difference is the trigger output controller. Since the PWM signal is not synchronous with the multiplexer period, the output controller cannot select the appropriate pulse to output. In this case, all 8 A/D triggers are generated. The additional conversion results are simply ignored by the processing algorithm. 2 1 3 4 000 001 010 011 MUX 1 2 3 4 © 2010 Renesas Electronics America Inc. All rights reserved.

52 Fx4 Diagnostic Trigger System
V850/Fx4 TAU x64 delay unit x64 x64 x8 x8 8:1 Analog Multiplexer MUX Count Up MUX controller MUXSEL[2:0] x8 f1 trigger generator f1 x 2 trigger generator interrupt A/D converter 0 f1 x 4 trigger generator PWM Diag Trig 0 f2 trigger generator PWM Diag Trig 1 The diagnostic trigger system on the Fx4 products is capable of generating synchronous triggers for 3 different PWM frequencies. These are the trigger generator blocks shown in blue. Triggers for up to 5 other asynchronous PWM frequencies can be generated by the trigger generators in green. f3 trigger generator PWM Diag Trig 2 f4 trigger generator PWM Diag Trig 3 A/D converter 1 f5 trigger generator PWM Diag Trig 4 f6 trigger generator PWM Diag Trig 5 © 2010 Renesas Electronics America Inc. All rights reserved.

53 Driver Diagnostics Software
Transfer of ADC conversion results to RAM by DMA Single interrupt after availabilty of diagnostic value from all PWM channels Evaluation of diagnostic values in ISR after 8 bulb periods To minimize the required interrupt processing, the DMA is used to transfer all of the current sense feedback conversion results to RAM. After one complete cycle of the multiplexer periods, the DMA complete interrupt will occur. For a base bulb frequency of 100Hz, the interrupt will occur every 80ms. During the interrupt service routine, the software will review the conversion results stored in RAM to determine if there any failures or malfunctioning lights. © 2010 Renesas Electronics America Inc. All rights reserved.

54 Review Questions What benefit does the staggered delay of PWM outputs provide? Can anyone explain the difference between the synchronous and asynchronous A/D triggers generated by the Driver Diagnostics Control Unit? Answer to #1: By staggering the active edges of the PWM signals, peak currents in the ECU can be reduced along with radiated emissions. Answer to #2: Synchronous triggers are generated based on the base PWM frequency used for the multiplexer address switching. During each mux period, only one A/D trigger is output from the trigger output controller. Asynchronous triggers are not synchronous to the multiplexer switching. Each PWM period, 8 triggers are output to support up to 8 channel-to-channel delays. © 2010 Renesas Electronics America Inc. All rights reserved.

55 Requirements Review PWM Generation Generate up to 64 PWM channels
Support for up to 64 PWM channels on FL4 Limit simultaneously switching to no more than 8 channels Individual delay setting for each channel Distribute active edges evenly within a period Two frequencies (bulb frequency / LED frequency) 3 synchronous frequencies + 2 independent frequencies possible <review each bullet, one-by-one> © 2010 Renesas Electronics America Inc. All rights reserved.

56 Requirements Review Driver Diagnostics
Diagnostic capability for each PWM output Support for up to 64 synchronous and asynchronous PWM channels on FL4 HW control of external analog multiplexer Fully automatic multiplexer control in HW Secure diagnostic (3 samples) within 250ms For 100Hz signal, 3 conversions of all 64 channels within 240ms <review each bullet, one-by-one> © 2010 Renesas Electronics America Inc. All rights reserved.

57 Review Question Can anyone name some of the benefits that Fx4 provides for lighting management? Lots of PWM outputs Minimizes radiated emissions Greater diagnostic visibility Integration of external ASIC functions Low CPU overhead / minimal interrupts <answer appears after click> © 2010 Renesas Electronics America Inc. All rights reserved.

58 Renesas’ F Series Enables Your Bright Ideas
© 2010 Renesas Electronics America Inc. All rights reserved.

59 Questions? © 2010 Renesas Electronics America Inc. All rights reserved.

60


Download ppt "Renesas Electronics America Inc. Jeremy Brodt"

Similar presentations


Ads by Google