Presentation is loading. Please wait.

Presentation is loading. Please wait.

Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A11C: Hardware Design Fundamentals for MCU-based Embedded.

Similar presentations


Presentation on theme: "Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A11C: Hardware Design Fundamentals for MCU-based Embedded."— Presentation transcript:

1 Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A11C: Hardware Design Fundamentals for MCU-based Embedded Systems Mitch Ferguson Manager, Application Engineering 12 October 2010 14 October 2010 Version 1.0

2 2 © 2010 Renesas Electronics America Inc. All rights reserved. Mr. Mitch Ferguson Applications Engineer Manager Specializes support design teams develop low-noise systems using MCUs. Over 15 years of system-level design experience Over 7 years of experience as an application engineer. As a hardware engineer and engineering manager, he has been involved in design in power distribution controls, automotive and fire alarm systems with focus on EMI/EMS issues. Bachelor of science in electrical engineering from Cleveland State University

3 3 © 2010 Renesas Electronics America Inc. All rights reserved. Renesas Technology and Solution Portfolio Microcontrollers & Microprocessors #1 Market share worldwide * Analog and Power Devices #1 Market share in low-voltage MOSFET** Solutions for Innovation 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).

4 4 © 2010 Renesas Electronics America Inc. All rights reserved. 4 Renesas Technology and Solution Portfolio Microcontrollers & Microprocessors #1 Market share worldwide * Analog and Power Devices #1 Market share in low-voltage MOSFET** 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). Solutions for Innovation

5 5 © 2010 Renesas Electronics America Inc. All rights reserved. 5 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 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 High Performance CPU, Low Power Ultra Low Power General Purpose

6 6 © 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  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 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 High Performance CPU, Low Power Ultra Low Power General Purpose

7 7 © 2010 Renesas Electronics America Inc. All rights reserved. Innovation I-Cache32KBD-Cache32KB L2 Cache 256KB WDT USB-HS Host or Device w/PHY x2 CPG DMACx6 UBC H-UDI MMU 500MHz 900 MIPS FPUMAC TMUx3 TIMER MEMORY ANALOG CPU I/O TIMER MEMORY ANALOG CPU I/O Multi media Others SPU 24bit DSP JPEG INTC BSC(ROM/SRAM) DDR232/16bit MMC NAND KeyScan IrDA ATAPI SCIFx6 GPIO LCDC VOU 2DG I2Cx2 SDIOx2 10/100 Ethernet MAC w/DMA VPU5F H.264 D1@60fps 720p@30 CEU x2 (Camera I/F) BEU x2 (Blend) VEU x2 (Scaling) Integration

8 8 © 2010 Renesas Electronics America Inc. All rights reserved. Integration has made hardware easier but not something that can be ignored

9 9 © 2010 Renesas Electronics America Inc. All rights reserved. Agenda Selecting clock circuit Power-On Reset (POR) and Low Voltage Detect (LVD) Watch Dog Timer (WDT) requirements Input Circuits Output Circuits

10 10 © 2010 Renesas Electronics America Inc. All rights reserved. How much time do you spend designing hardware 1.Firmware Only 2.Both Hardware and Firmware 3.Hardware Engineer 4.Architecture Level only

11 11 © 2010 Renesas Electronics America Inc. All rights reserved. Clock Circuit Selection Clocking circuit criteria Startup time Accuracy Reliability Cost Clock alternatives Crystal Ceramic Resonator On-Chip Oscillator Compensated External Oscillator (TXO)

12 12 © 2010 Renesas Electronics America Inc. All rights reserved. Clock Comparison – Arranged Best to Worst Rev. 1.00 AccuracyCostReliability Startup Time External (±25 ppm or better) On-Chip (<10 cycles) Crystal (±50-200 ppm) Resonator ($0.16) w/caps Resonator (100 uS) Resonator (>0.5% ) Crystal ($0.20) Crystal/ External Crystal (1-5 mSec) On-Chip (>2%) External ($2.91) External (10 mSec) 0.5% = 5000 ppm Best Worst

13 13 © 2010 Renesas Electronics America Inc. All rights reserved. Clock Requirements – A few points Accuracy of Clock 5%1%0.5% 5000ppm 0.1%0.05% 500 ppm 0.01% Uart USB- FS 0.005% 50 ppm USB- HS Power RF Clock 30 min lost/yr CAN Ethernet OCO Standard Resonator Special Resonator CrystalTXO Clock -3.6 hr lost/month

14 14 © 2010 Renesas Electronics America Inc. All rights reserved. Power On Reset (POR) Do we need a POR circuit ? YES – you always need some POR POR Options Simple RC Internal POR External POR

15 15 © 2010 Renesas Electronics America Inc. All rights reserved. Simple RC Power On Reset Advantages Inexpensive Simple Disadvantages Very dependent on Vcc rise time Not so simple Let’s look at an example Design an RC circuit for M16C/62P MCU Reset Vcc

16 16 © 2010 Renesas Electronics America Inc. All rights reserved. RC Power On Reset Example Requirements (M16C/62P example) Reset <0.2 * Vcc for 2 mSec after min operating voltage Difficult if Vcc rises slowly Assume Vcc “snaps” to V operating Vcc Reset 0.2 Vcc > 2mSec Vreset = Vcc (1-e -TC ) 1 TC = 0.63 Vcc 0.2 TC = 0.2 Vcc This means RC design must have 10 mSec TC Min Op Voltage 0V

17 17 © 2010 Renesas Electronics America Inc. All rights reserved. External Power On Reset Options Purchase a POR/Voltage Monitor Chip Design your own Purchased device Advantage – Simple – Reliable Disadvantage – Cost – Must match to the MCU

18 18 © 2010 Renesas Electronics America Inc. All rights reserved. External Power On Reset (Cont) Design your own Advantage – Cost ? Disadvantage Can be tricky to design Multiple components Zener set for MCU Vmin R3 >> R2 Reset Line slope dV/dT is approximately [(Vz-0.6)/R2)]/C1 Appendix has a full calculation 10K 47K 2.7V 100K 2.2 uF

19 19 © 2010 Renesas Electronics America Inc. All rights reserved. On-Chip Power On Reset Advantage Cost Already “tuned” to MCU Disadvantages MCU must have a POR May have rise time limitations on Vcc

20 20 © 2010 Renesas Electronics America Inc. All rights reserved. On-Chip Power On Reset - Example R8C/23 2.7 mA will charge 100 uF of capacitance to 2.7V in less than 100 mSec

21 21 © 2010 Renesas Electronics America Inc. All rights reserved. Low Voltage Detector (LVD) - (Brown-out Detect) Do I need an LVD circuit? Probably Purpose of LVD Prevent operation of MCU with Voltage < Vcc min Anticipate loss of voltage – Save data – Place system in “safe” state LVD only monitor MCU Vcc Consider all system power sources

22 22 © 2010 Renesas Electronics America Inc. All rights reserved. An example of using Voltage Detect Vdet1 POR Vcc Restore Data, Run Full Speed Clock Power down mode entered Vdet2 Slow Clock, Save Data to EEPROM Exit power down mode 3.3-3.9 2.7-3.0 2.6 Operating Range 3.0 – 5.5 20 MHz 2.7 – 3.0 10 MHz

23 23 © 2010 Renesas Electronics America Inc. All rights reserved. Ride Through Backup is not always Battery Example Ride through 30 seconds Do Not use Battery Allow Voltage drop 3.1 to 2.8 Icc at 2 MHz = 1.5 mA I = C dV/dT C = (I * dT)/dV C = 0.15 Farad * Above 0.22F @ 3.3V not common

24 24 © 2010 Renesas Electronics America Inc. All rights reserved. Watchdog Timer – Internal or External The internal WDT Recovers from software errors Don’t expect recovery from noise External WDT Sometimes required by safety standard Better chance recovering from noise Contained in many Voltage Monitors

25 25 © 2010 Renesas Electronics America Inc. All rights reserved. Input Circuits – Connecting Switches Physical connection, pull-up or pull-down Internal Pull-ups ? Interrupt or no Interrupt MCU Input R Vcc V+ MCU Input Vcc V+ R

26 26 © 2010 Renesas Electronics America Inc. All rights reserved. Pull–ups – How large can they be? Assume GPIO requires 0.8 Vcc for Vih Use Vcc 3.0V for battery Pin leakage current 1.0 uA max Max resistance for pullup = 600 K (.6V/.1uA) Typically use between 10K and 68K MCU Input R Vcc V+

27 27 © 2010 Renesas Electronics America Inc. All rights reserved. Pull–ups when power is critical S1 causes power loss when closed 3V/600K = 5 uA Use port pin to drive pull-up Drive pin low once S1 active Poll status of S1 when active MCU Input R Vcc V+ Output S1

28 28 © 2010 Renesas Electronics America Inc. All rights reserved. Level Translation Problem - Interfacing a 3V micro design to 5V LCD Writing to LCD R8C Voh is (Vcc – 0.5V) @ 5 mA No Problem

29 29 © 2010 Renesas Electronics America Inc. All rights reserved. Level Translation - Reading Unfortunately, R8C inputs are not 5V tolerant MCULCD R1 R2 +3.3V+5V R1 = 30K R2 = 20K

30 30 © 2010 Renesas Electronics America Inc. All rights reserved. What about the other way It is a little different when MCU voltage is higher MCU requires 0.8 * Vcc (this is standard CMOS) Sensor Switch +5V +3V R1 R2 10K 4.7K MCU GPIO

31 31 © 2010 Renesas Electronics America Inc. All rights reserved. A Power Output Designing a simple power drive Get Load requirement Divide by port output current This gives minimum hFE or Beta R2 = (Vout - 0.6)/(rated output current of port pin) D1 rated at load current MCU +3V R2 Load 680 +12V D1

32 32 © 2010 Renesas Electronics America Inc. All rights reserved. Unused Inputs Options Check HW manual Pull up or down – Preferable to pull low Set to output – Set output and low – Vulnerable until set – Draws power until set

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

34 34 © 2010 Renesas Electronics America Inc. All rights reserved. Summary Selecting clock circuit POR/LVD WDT requirements Input Circuits Output Circuits

35 35 © 2010 Renesas Electronics America Inc. All rights reserved. Innovation I-Cache32KBD-Cache32KB L2 Cache 256KB WDT USB-HS Host or Device w/PHY x2 CPG DMACx6 UBC H-UDI MMU 500MHz 900 MIPS FPUMAC TMUx3 TIMER MEMORY ANALOG CPU I/O TIMER MEMORY ANALOG CPU I/O Multi media Others SPU 24bit DSP JPEG INTC BSC(ROM/SRAM) DDR232/16bit MMC NAND KeyScan IrDA ATAPI SCIFx6 GPIO LCDC VOU 2DG I2Cx2 SDIOx2 10/100 Ethernet MAC w/DMA VPU5F H.264 D1@60fps 720p@30 CEU x2 (Camera I/F) BEU x2 (Blend) VEU x2 (Scaling) Integration

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

37 37 © 2010 Renesas Electronics America Inc. All rights reserved. To Interrupt or Not Probably Not Switches – except for low power wake-up A/D SPI Probably UART Receive/Transmit Timers Pulse counting or edge detection

38 38 © 2010 Renesas Electronics America Inc. All rights reserved. Polled Switch Routine Use Timer Tick for scheduling Setup below for 1 mSec tick Samples switch every 5 mSec if ((tick_timer - last_sample_time)>4)){ if (SW1 ) SW1_count++; else SW1_count = 0; if (SW1_count > 5){ SW1_state = ACTIVE;. last_switch_sample = tick_timer;

39 39 © 2010 Renesas Electronics America Inc. All rights reserved. External Power On Reset (Cont) Assume Q beta = 75 Vcc = 5V, Vmin = 2.7V Set C1 to 0.22 uF Charge time 10 mSec for 2.7V charge I= C dv/dt = 0.22 uF * 0.5V/2mS = 50 uA R1 sets zener current. Typical 0.5 ma current would need 10K R2 = (2.7V – 0.6)/50 uA = 42K R3 just a discharge path 100K Zener set for MCU Vmin R3 >> R2 Reset Line slope dV/dT is approximately [(Vz-0.6)/R2)]/C1

40 Renesas Electronics America Inc.


Download ppt "Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A11C: Hardware Design Fundamentals for MCU-based Embedded."

Similar presentations


Ads by Google