renesas electronics america inc. id 027c:the v850/fx4 timer array unit (tau) and its use for pwm...

59
Renesas Electronics America Inc. 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

Upload: archibald-campbell

Post on 12-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

Renesas Electronics America Inc.

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

Page 2: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

2 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 3: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

3 © 2010 Renesas Electronics America Inc. All rights reserved.

Renesas Technology and Solution Portfolio

Microcontrollers& Microprocessors

#1 Market shareworldwide *

Analog andPower Devices#1 Market share

in low-voltageMOSFET**

Solutionsfor

Innovation

Solutionsfor

InnovationASIC, ASSP& Memory

Advanced and proven technologies

* 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).

Page 4: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

4 © 2010 Renesas Electronics America Inc. All rights reserved.

4

Renesas Technology and Solution Portfolio

Microcontrollers& Microprocessors

#1 Market shareworldwide *

Analog andPower Devices#1 Market share

in low-voltageMOSFET**

ASIC, ASSP& Memory

Advanced and proven technologies

* 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).

Solutionsfor

Innovation

Solutionsfor

Innovation

Page 5: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

5 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Up to 500 DMIPS, 150 & 90nm process 600uA/MHz, 1.5 uA standby Medical, Automotive & Industrial

Legacy Cores Next-generation migration to RX

High Performance CPU, FPU, DSC

Embedded Security

Up to 10 DMIPS, 130nm process350 uA/MHz, 1uA standbyCapacitive touch

Up to 25 DMIPS, 150nm process190 uA/MHz, 0.3uA standbyApplication-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

High Performance CPU, Low Power

Ultra Low PowerGeneral Purpose

Page 6: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

6 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Embedded Security

Up to 10 DMIPS, 130nm process350 uA/MHz, 1uA standbyCapacitive touch

Up to 25 DMIPS, 150nm process190 uA/MHz, 0.3uA standbyApplication-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 PowerGeneral Purpose

Microcontroller and Microprocessor Line-up

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

Page 7: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

7 © 2010 Renesas Electronics America Inc. All rights reserved.

Innovation in Automotive Lighting Technology

Page 8: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

8 © 2010 Renesas Electronics America Inc. All rights reserved.

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.

Page 9: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

9 © 2010 Renesas Electronics America Inc. All rights reserved.

Agenda

V850/Fx4 Product Introduction

Timer Array Unit (TAU)

PWM Delay & Driver Diagnostics

Conclusion

Page 10: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

10 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 11: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

© 2010 Renesas Electronics America Inc. All rights reserved.

11

V850/Fx4 Product Introduction

Page 12: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

12 © 2010 Renesas Electronics America Inc. All rights reserved.

MCU Products for Automotive Electronics

V850/F Series

Page 13: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

13 © 2010 Renesas Electronics America Inc. All rights reserved.

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

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

Page 14: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

14 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 15: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

15 © 2010 Renesas Electronics America Inc. All rights reserved.

4 MB

3 MB

2 MB

1.5 MB

1 MB

768 KB

512 KB

384 KB

256 KB

Flash ↑Pins →

64QFP

80QFP

100QFP

144QFP

176QFP

100QFP

144QFP

176QFP

208QFP/BGA

176QFP

208QFP/BGA

256BGA

V850E2/Fx4-LMax. 64 MHz

V850E2/Fx4-LMax. 48 MHz

V850E2/Fx4Max. 80 MHz

V850E2/Fx4-HMax. 160 MHz

V850/Fx4 Lineup

Page 16: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

16 © 2010 Renesas Electronics America Inc. All rights reserved.

V850/Fx4 Block Diagram

Memory Options

Package: 100- to 208-pin QFP/BGAPackage: 100- to 208-pin QFP/BGA

32 to 64 KB Data Flash32 to 64 KB Data Flash

System Protection FunctionsSystem Protection Functions

DMADMA

V850E2M Core

160 MIPS @ 80 MHz3.0 – 5.5 V (single voltage)

-40 to +85°C/+110°C/+125°C

V850E2M Core

160 MIPS @ 80 MHz3.0 – 5.5 V (single voltage)

-40 to +85°C/+110°C/+125°C FPU

512 KB to 2 MB Flash512 KB to 2 MB Flash

48 to 144 KB RAM4 to 16 KB Back-up RAM48 to 144 KB RAM4 to 16 KB Back-up RAM

External Memory InterfaceExternal Memory Interface

On-Chip DebugOn-Chip Debug

PLL & SSCGPLL & SSCG

Real-Time ClockReal-Time Clock

Internal Osc.240 kHz + 8 MHz

Internal Osc.240 kHz + 8 MHz

Sub Osc.32.768 kHz

Sub Osc.32.768 kHz

OS TimerOS Timer

Timer Array Unit JTimer Array Unit J

Main Osc.4 to 20 MHz

Main Osc.4 to 20 MHz

Timer Array Unit A/BTimer Array Unit A/B

Window WatchdogWindow Watchdog

Timer Array Unit CTimer Array Unit C

PWM Delay &Diagnostic Function

PWM Delay &Diagnostic Function

TOPTOPENCENC

FCAN64 & 128 message buffers128 msg Diagnostic FCAN

FCAN64 & 128 message buffers128 msg Diagnostic FCAN

CSI with FIFOCSI with FIFO

I2CI2C

12-bit A/D Converter12-bit A/D Converter

FlexRayFlexRay

CSICSI

Key ReturnKey Return

LIN MasterLIN Master

UART / LINUART / LIN

Analog Voltage Comparator

Analog Voltage Comparator

Page 17: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

17 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 18: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

© 2010 Renesas Electronics America Inc. All rights reserved.

18

Timers in Automotive

Page 19: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

19 © 2010 Renesas Electronics America Inc. All rights reserved.

MCU

Timers have many uses in automotive control…

rcvr

What other automotive timer uses can you think of?

Page 20: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

© 2010 Renesas Electronics America Inc. All rights reserved.

20

Timer Array Unit (TAU)

Page 21: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

21 © 2010 Renesas Electronics America Inc. All rights reserved.

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

TI0

ch0ch016bit Counter TO

Data-Register

TO0

INT0

TI1

ch1ch116bit Counter TO

Data-Register

TO1

INT1

TI2

ch2ch216bit Counter TO

Data-Register

TO2

INT2

TI3

ch3ch316bit Counter TO

Data-Register

TO3

INT3

TI4

ch4ch416bit Counter TO

Data-Register

TO4

INT4

TI15

ch15ch15

16bit Counter TO

Data-Register

TO15

INT15

PCLK

Prescaler1:4Prescaler1:4

15bit Clock Divider

Clock Selector

Page 22: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

22 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Key functions for Body Apps

Page 23: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

23 © 2010 Renesas Electronics America Inc. All rights reserved.

Prescaler Block

BRG Block

Flexible Clock Supply

each channel can select from any of the 4 clock sources (CK0 to CK3)

clock supply to TAU macroup to 48MHz (21ns) on Fx4

4 configurable power-of-2 clock dividers (CK0 to CK3)

CK3 includes an integer divider

15-bit Counter (fx/2 to fx/215)

Selector Selector Selector Selector

PRS03-00 PRS13-10 PRS23-20 PRS33-30

BRS7-0

8-bit counter

PCLK

CK

0C

K1

CK

2C

K3

Page 24: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

24 © 2010 Renesas Electronics America Inc. All rights reserved.

Pulse Width

Pulse Measurement

Measure the pulse width or frequency of an input signal

PCLK

Prescaler1:4Prescaler1:4

15bit Clock Divider

Clock Selector

TI0

ch0ch016bit Counter TO

Data-Register

TO0

INT0

...

`

Page 25: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

25 © 2010 Renesas Electronics America Inc. All rights reserved.

`

Period

Duty

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

TI1

ch1ch116bit Counter TO

Data-Register

TO1

INT1

PCLK

Prescaler1:4Prescaler1:4

15bit Clock Divider

Clock Selector

Period

Duty

TI0

ch0ch016bit Counter TO

Data-Register

TO0

INT0

internal connection

...

data is encoded in both duty and period

of PWM signal

Page 26: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

26 © 2010 Renesas Electronics America Inc. All rights reserved.

Synchronous Operation Example – PWM generation

Synchronous Channel Operation

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

ch 0ch 0ch 1ch 1ch 2ch 2ch 3ch 3ch 4ch 4ch 5ch 5ch 6ch 6ch 7ch 7ch 8ch 8ch 9ch 9ch 10ch 10ch 11ch 11ch 12ch 12ch 13ch 13ch 14ch 14ch 15ch 15

15 PWMs at the same frequency

ch 0 - masterch 0 - master ch 1 - slave ch 1 - slave ch 2 - slave ch 2 - slave ch 3 - slave ch 3 - slave ch 4 - slave ch 4 - slave ch 5 - slave ch 5 - slave ch 6 - slave ch 6 - slave ch 7 - slave ch 7 - slave ch 8 - slave ch 8 - slave ch 9 - slave ch 9 - slave ch 10 - slave ch 10 - slave ch 11 - slave ch 11 - slave ch 12 - slave ch 12 - slave ch 13 - slave ch 13 - slave ch 14 - slave ch 14 - slave ch 15 - slave ch 15 - slave

ch 0 - masterch 0 - master ch 1 - slave ch 1 - slave ch 2 - slave ch 2 - slave ch 3 - slave ch 3 - slavech 4 - masterch 4 - master ch 5 - slave ch 5 - slave ch 6 - slave ch 6 - slave ch 7 - slave ch 7 - slave ch 8 - slave ch 8 - slave ch 9 - slave ch 9 - slavech 10 - masterch 10 - master ch 11 - slave ch 11 - slave ch 12 - slave ch 12 - slave ch 13 - slave ch 13 - slavech 14 - masterch 14 - master ch 15 - slave ch 15 - slave

3 PWMs at frequency 1

5 PWMs at frequency 2

3 PWMs at frequency 3

1 PWMs at frequency 4

3 PWMs at frequency 1

4 PWMs at frequency 2

2 PWMs at frequency 3

ch 0 - masterch 0 - master ch 1 - slave ch 1 - slave ch 2 - slave ch 2 - slave ch 3 - slave ch 3 - slavech 4 - masterch 4 - master ch 5 - slave ch 5 - slave ch 6 - slave ch 6 - slave ch 7 - slave ch 7 - slave ch 8 - slave ch 8 - slavech 9 - independentch 9 - independentch 10 - masterch 10 - master ch 11 - slave ch 11 - slave ch 12 - slave ch 12 - slavech 13 - independentch 13 - independentch 14 - independentch 14 - independentch 15 - independentch 15 - independent

TO TO0TO TO1TO TO2TO TO3TO TO4TO TO5TO TO6TO TO7TO TO8TO TO9TO TO10TO TO11TO TO12TO TO13TO TO14TO TO15

Page 27: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

27 © 2010 Renesas Electronics America Inc. All rights reserved.

TAUATAUA

TAUA Channel Interconnections

Channels can be combined to achieve complex operations

Signals between channels enable coordination start/stop control, output control, update timing

TI

channel mchannel m

16bit Counter TOC

Data-Register

start trigger

master ch INT

upper ch INT

simultaneous rewrite

up/down signal

real-time trigger

TIm TOm

INTm

start trigger

INT to slave ch

simultaneous rewrite

INT to lower ch

up/down signal

real-time trigger

Page 28: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

28 © 2010 Renesas Electronics America Inc. All rights reserved.

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

TE15TE15TE14TE14TE13TE13

TE Register (Timer Enable) : Timer Count Enable

TE12TE12TE11TE11TE10TE10TE09TE09TE08TE08TE07TE07TE06TE06TE05TE05TE04TE04TE03TE03TE02TE02TE01TE01TE00TE00

ST15ST15ST14ST14ST13ST13ST12ST12ST11ST11ST10ST10ST09ST09ST08ST08ST07ST07ST06ST06ST05ST05ST04ST04ST03ST03ST02ST02ST01ST01ST00ST00

ST Register (Timer Start Trigger) : Timer Counter Clear & Timer Start

Page 29: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

29 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 30: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

30 © 2010 Renesas Electronics America Inc. All rights reserved.

TAUAnTOUT2

TAUAnTOL.TOL2 buf

Simultaneous Rewrite Example

TAUAnCDR1

TAUAnCDR1 buf

TAUAnTOUT1

TAUAnTOL.TOL2

a

a

ch 1 duty value

ch 2 output polarity

bupdate

update

INTTAUAnI0

TAUAnCNT0

TAUAnRDT.RDTm

bactivate

activate

Page 31: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

31 © 2010 Renesas Electronics America Inc. All rights reserved.

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 register

DMA window address select

TAUAnCDR0

TAUAnCDR2

TAUAnCDR4

TAUAnCDR6

TAUAnCDR9

TAUAnCDR13

TAUAnTOL.TOLmTAUAnRDT.RDTm

TAUAnCDR1

TAUAnCDR3

TAUAnCDR5

TAUAnCDR7TAUAnCDR8

TAUAnCDR10TAUAnCDR11TAUAnCDR12

TAUAnCDR14TAUAnCDR15

……

DWR0

DWR1

DWR2

DWR3

DWR4

DWR5

DWR6

DWR7

DWR8

DWR9

DWR10

DWR11

DWR12

DWR13

DWR14

DWR15

TAUAnCDR0TAUAnCDR2TAUAnCDR4TAUAnCDR6TAUAnCDR9TAUAnCDR13

TAUAnTOL.TOLmTAUAnRDT.RDTm

TAUAnCDR0

TAUAnCDR2

TAUAnCDR4

TAUAnCDR6

TAUAnCDR9

TAUAnCDR13

TAUAnTOL.TOLmTAUAnRDT.RDTm

Capture data 0

Capture data 1

Count data 0

Capture data 2

Count data 1

Capture data 3

Page 32: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

© 2010 Renesas Electronics America Inc. All rights reserved.

32

Timer Array Unit Derivatives

Page 33: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

33 © 2010 Renesas Electronics America Inc. All rights reserved.

Timer Array Unit B

TAUB is an optimized timer compatible with TAUA

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

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

Software compatible with TAUA

Page 34: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

34 © 2010 Renesas Electronics America Inc. All rights reserved.

Optimized TAU providing additional PWM channels

Timer Array Unit C

TAUA

ch 0 - masterch 0 - master ch 1 - slave ch 1 - slave ch 2 - slave ch 2 - slavech 3 - independentch 3 - independentch 4 - masterch 4 - master ch 5 - slave ch 5 - slave ch 6 - slave ch 6 - slavech 7 - independentch 7 - independentch 8 - masterch 8 - master ch 9 - slave ch 9 - slave ch 10 - slave ch 10 - slavech 11 - independentch 11 - independentch 12 - masterch 12 - master ch 13 - slave ch 13 - slave ch 14 - slave ch 14 - slavech 15 - independentch 15 - independent

TO TO1TO TO2TO TO3

TO TO5TO TO6TO TO7

TO TO9TO TO10TO TO11

TO TO13TO TO14TO TO15

Software compatible with TAUA

2 PWMs @ ch. 0 period

2 PWMs @ ch. 4 period

2 PWMs @ ch. 8 period

2 PWMs @ ch. 12 period

internal connection

external pin

external pin

internal connection

external pin

external pin

internal connection

external pin

external pin

internal connection

external pin

external pin

Page 35: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

35 © 2010 Renesas Electronics America Inc. All rights reserved.

Timer Array Unit J

TAUJ is a 4 channel, 32-bit timer compatible with TAUA

TI0

ch0ch032 bit Counter TO

Data-Register

TO0

INT0

TI1

ch1ch132 bit Counter TO

Data-Register

TO1

INT1

TI2

ch2ch232 bit Counter TO

Data-Register

TO2

INT2

TI3

ch3ch332 bit Counter TO

Data-Register

TO3

INT3

PCLK

Prescaler1:4Prescaler1:4

15 bit Clock Divider

Clock Selector

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

Page 36: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

36 © 2010 Renesas Electronics America Inc. All rights reserved.

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 frequencyor up to 8 PWM with independent frequencies

Page 37: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

© 2010 Renesas Electronics America Inc. All rights reserved.

37

PWM Delay & Driver Diagnostics

Page 38: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

39 © 2010 Renesas Electronics America Inc. All rights reserved.

MCUMCU PWM TimerPWM Timer

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

Bulb PWMs at 100Hz

LED PWMs at 200Hz

A/D converter

A/D converter

Page 39: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

40 © 2010 Renesas Electronics America Inc. All rights reserved.

Incandescent Bulb Example

Current Sense Feedback Sampling

PWM Output

typ. min delay: 3msA/D Trigger

typ. freq: 100Hz

PWM

MCU

LED Example

PWM

ANI

MCU

Similar waveforms as above with: typ. freq: 200Hz typ. min delay: 350us

ANI

Current Sense

Driver Output

Page 40: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

41 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 41: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

42 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Diagnosticfeedback

Bulb PWMs at 100Hz

LED PWMs at 200Hz

FX4FX4

optional analog multiplexer

A/D converter

A/D converter

TimerTAUCTimerTAUC

DelayGen.

DelayGen.

DiagnosticTrigger Gen.Diagnostic

Trigger Gen.

Page 42: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

43 © 2010 Renesas Electronics America Inc. All rights reserved.

Fx4

current sense

ADC

Trig

ger

grou

p 1

Trig

ger

grou

p 2

Trig

ger

grou

p 0

Fx4 Lighting Management System

Diagnostic control

ADC trigger control PWM Diag

Trigger

Analog Multiplexers

Interrupt

RAM DMA

3MUX control

bulbs / LEDs

PWMgeneration

Delaygeneration

Page 43: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

44 © 2010 Renesas Electronics America Inc. All rights reserved.

Ch0

Ch1

Ch3

Ch5

Ch6

Ch7

Ch8

Ch9

Ch10

Ch11

Ch12

Ch13

Ch14

Ch15

Ch2

Ch4

PWM Generation Using TAU

TAU

Master channel

Slave channels

PWM channels

0 1, 2, 3 1, 2

4 5, 6, 7 5, 6

8 9, 10, 11 9, 10

12 13, 14, 15 13, 14

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

Channel 0’speriod

Channel 4’speriod

Channel 8’speriod

Channel 12’speriod

PWM0

PWM1

PWM2

PWM3

PWM4

PWM5

PWM6

PWM7

Page 44: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

45 © 2010 Renesas Electronics America Inc. All rights reserved.

PWM Delay Generation

Match

Match

clear

clear

>1

x 64

start

start

td

counter

counter

Compare register

Clock

Programmable delay time

Individual delay circuit for each PWM channel

Page 45: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

46 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 46: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

47 © 2010 Renesas Electronics America Inc. All rights reserved.

Period start

trigger selector

Analog MUX Control

Generation of multiplexer addresses without CPU interaction

Matchclear

3-bit counter

0x07

MUX address generation

1 Controllogic

Count up trigger

000 001 010 011MUX

MUX

1

2

ADC interrupt

2

MUX only changes after analog conversion

TAU outputs

Page 47: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

48 © 2010 Renesas Electronics America Inc. All rights reserved.

Driver Current Sense Feedback Multiplexing

111110101100011010001000000 001 010 011

BulbLED

to A/D converter

MUX ctrl

MUX address

current sense

MultiplexerMultiplexerMultiplexerMultiplexerMultiplexerMultiplexerMultiplexerMultiplexer

Page 48: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

49 © 2010 Renesas Electronics America Inc. All rights reserved.

Synchronous Diagnostic Trigger Overview

MUX Addr.

000 001

LED minimum sync delay Bulb minimum sync delay

LED channel-to-channel delay Bulb channel-to-channel delay

ADC trigger for LED ADC trigger for Bulb

Bulb PWM 0Bulb PWM 1

LED PWM 0LED PWM 1

010 011 100 101 110 111

to A/D converter

Multiplexer

Multiplexercurrent sense

Page 49: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

50 © 2010 Renesas Electronics America Inc. All rights reserved.

Start trigger

selector

Synchronous Diagnostic Trigger Generation

1

1

td.ad

Match

clearcounter

Compare register

Trigger timing generation

2

21 2 3 4

TriggerOutput

controller

3

000 001 010 011MUX

31 2 3 4

TAU outputs

Generation of ADC triggers without CPU interaction

Page 50: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

51 © 2010 Renesas Electronics America Inc. All rights reserved.

Start trigger

selector

Asynchronous Diagnostic Trigger Generation

1

1

td.ad

Match

clearcounter

Compare register

Trigger timing generation

2

21 2 3 4

TAU outputs

Generation of ADC triggers without CPU interaction

000 001 010 011MUX

1 2 3 4 1 2 3 4

Page 51: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

52 © 2010 Renesas Electronics America Inc. All rights reserved.

V850/Fx4

8:1 Analog Multiplexer

TAU

trigger generator

MUXcontroller

MUXSEL[2:0]

interrupt

PWM Diag Trig 0

MUX Count Up

f1

delayunit

x8 x8

f1 x 2

f1 x 4

f2

f3

f4

f5

f6

trigger generator

trigger generator

trigger generator

trigger generator

trigger generator

trigger generator

trigger generator

PWM Diag Trig 1

PWM Diag Trig 2

PWM Diag Trig 3

PWM Diag Trig 4

PWM Diag Trig 5

A/Dconverter 0

x64 x64

x64

x8

Fx4 Diagnostic Trigger System

A/Dconverter 1

Page 52: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

53 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 53: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

54 © 2010 Renesas Electronics America Inc. All rights reserved.

Review Questions

1. What benefit does the staggered delay of PWM outputs provide?

2. Can anyone explain the difference between the synchronous and asynchronous A/D triggers generated by the Driver Diagnostics Control Unit?

Page 54: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

55 © 2010 Renesas Electronics America Inc. All rights reserved.

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 Individual delay setting for each channel

Two frequencies (bulb frequency / LED frequency) 3 synchronous frequencies + 2 independent frequencies

possible

Page 55: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

56 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 56: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

57 © 2010 Renesas Electronics America Inc. All rights reserved.

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

Page 57: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

58 © 2010 Renesas Electronics America Inc. All rights reserved.

Renesas’ F Series Enables Your Bright Ideas

Page 58: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

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

Questions?

Page 59: Renesas Electronics America Inc. ID 027C:The V850/Fx4 Timer Array Unit (TAU) and its Use for PWM Output Driver Diagnostics Renesas Electronics America

Renesas Electronics America Inc.