Presentation is loading. Please wait.

Presentation is loading. Please wait.

Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A15C: Application Code Reprogramming Using Different Serial.

Similar presentations


Presentation on theme: "Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A15C: Application Code Reprogramming Using Different Serial."— Presentation transcript:

1 Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A15C: Application Code Reprogramming Using Different Serial Communication Protocols David Xu Field Applications Engineer 12 & 14 October 2010 Version: 1.3 - Flashloader

2 2 © 2010 Renesas Electronics America Inc. All rights reserved. David Xu Field Application Engineer Experience of multiple serial communication protocols 12 years in automotive application area Experience of CAN bootloader development Education BSEE from the Zhejiang University in China MSME from Wayne Sate University Work Experience Over 22 years experience with – Embedded control systems – Hardware design and software programming using MCUs – Plant automation systems

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

8 8 © 2010 Renesas Electronics America Inc. All rights reserved. Renesas Flashloader Solution Renesas Flashloader takes small memory space and very short time to implant. It enables you to update your application code via existing serial network without getting hands dirty.

9 9 © 2010 Renesas Electronics America Inc. All rights reserved. Agenda What is flashloader Requirements of a flashloader Structures of flashloader Components in a flashloader Requirements in Application Code Example

10 10 © 2010 Renesas Electronics America Inc. All rights reserved. Key Takeaways Understand what a flashloader does Know the structure of a flashloader Knowledge of applying flashloader to your own application

11 11 © 2010 Renesas Electronics America Inc. All rights reserved. What is a Flashloader A piece of software resides in a protected flash code area Separate from application code Communication handling using existing serial bus Application code reprogramming Application code verification Flashloader vs. Bootloader Similar but different

12 12 © 2010 Renesas Electronics America Inc. All rights reserved. MCU Flashloader Requirements Serial communication bus – CAN, LIN, UART, SPI, I2C, and etc. Flash reprogramming capability Multiple flash blocks Flash area protection Temporary storage area to hold code image (optional) Flash Serial Bus 010010101010110101010110111101011 110000111100101011100010010111001 001111100101000111111110001101010 Block 0: Flashloader Block 1 – Block N Application Code Temporary Application Code Image

13 13 © 2010 Renesas Electronics America Inc. All rights reserved. ECU Configuration (1) Single MCU with Internal Flash ECU #1ECU #2ECU #N Serial communication bus MCU RAM Flash ECU #2 ECU: Electric Control Unit

14 14 © 2010 Renesas Electronics America Inc. All rights reserved. ECU Configuration (2) Multi-MCU with internal Flash ECU #1ECU #2ECU #N Serial communication bus Master MCU RAM Flash ECU #2 Slave MCU Flash RAM ECU: Electric Control Unit

15 15 © 2010 Renesas Electronics America Inc. All rights reserved. ECU Configuration (3) MPU/MCU with external Flash ECU #1ECU #2ECU #N Serial communication bus MPU/MCU ECU #2 Flash RAM ECU: Electric Control Unit

16 16 © 2010 Renesas Electronics America Inc. All rights reserved. Flashloader Components Serial Communication Driver Command receive Command decode Data transfer & verification Flash Driver Flash erase Flash write Flash verification Application code verification & Execution Checksum Execution State control Command validation Security check Flow control Flashloader Serial Communication Driver Flash Driver Application Code Verification & Execution State Control

17 17 © 2010 Renesas Electronics America Inc. All rights reserved. Flashloader Structure– Single Level PC or Programmer ECU Application Code Flashloader RAM Serial Bus Application Code Flash

18 18 © 2010 Renesas Electronics America Inc. All rights reserved. Flashloader Structure– Two Levels PC or Programmer ECU Application Code Primary Flashloader RAM Serial Bus Application Code Flash Secondary Flashloader

19 19 © 2010 Renesas Electronics America Inc. All rights reserved. Flashloader Structure Comparison Single level Advantage – Simple – Less communication overhead – Easy to implement Disadvantage – Less secure – Larger code size Two levels Advantage – Secure – Small code size Disadvantage – Communication overhead – Complicated – Use more RAM space

20 20 © 2010 Renesas Electronics America Inc. All rights reserved. Requirements in Application Code Flash reprogramming command handling Recognize the flash reprogramming command Generate a warm reset Header - Interface with flashloader Known program start address Chechsum Warm reset flag (in RAM) Change flash memory configuration for flashloader (existing project) Application Code Serial Communication Driver Flash Reprog. Handling Flashloader Header Flashloader

21 21 © 2010 Renesas Electronics America Inc. All rights reserved. Renesas Flash MCU Key Features – R8C/M16C

22 22 © 2010 Renesas Electronics America Inc. All rights reserved. Example – State Transition Diagram Application Software Flashloader Power On Reset Initial Session Idle Session Programming Session Flash program Command Reset OR Control Command OR Timeout Reset OR Control Command Flash program Command Timeout AND no application S/W detected Flash program Command Timeout AND valid application S/W detected

23 23 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Security Check ID Simply send unique ID to ECU Seed – Key PC/Programmer sends seed request to ECU ECU generates random seed and send back to PC/Programmer PC/Programmer uses an algorithm to generate a key ECU uses the same algorithm to verify the key

24 24 © 2010 Renesas Electronics America Inc. All rights reserved. Flashloader/Bootloader Standard ISO14229: Road vehicles — Unified diagnostic services (UDS) — Specification and requirements ISO15765–3: Road vehicles — Diagnostics on Controller Area Networks (CAN) – Part 3: Implementation of Unified diagnostic services (UDS on CAN)

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

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

27 © 2010 Renesas Electronics America Inc. All rights reserved. 27 Thank You!

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

29 29 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Initial Session Flowchart Reset Initialization Warm start? Flash program command received within valid period? Valid application S/W? Jump to application S/W Clear warm start flag Go to idle Session Go to programming Session Yes No

30 30 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Enter Flashloader from Application Application Flash program command received? Set warm start flag Trigger reset Yes No End

31 31 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Idle Session Flowchart Idle session Flash program command received? Go to programming Session Yes No

32 32 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Programming Session Flowchart Programming session Security check Pass Not pass Idle session Download SBL SBL: Secondary Flashloader Activate SBL Download application code Flash block erase Flash programming Finish?Flash verification Not pass Error handling Pass Reset NoYes

33 33 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Programming Sequence (1/2) Programming session Programming requestPositive response ECU hardware verificationPositive response ECU serial number verificationPositive response Flashloader verificationPositive response Security Check, unlock ECU Download SBL to ECU RAM (Download data block) A PC or ProgrammerECU Positive responseActivate SBL

34 34 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Programming Sequence (2/2) Erase flash blockWait request More block?Positive response Download application code to flash area (Download data block ) Positive response Check for valid application ECU reset request End PC or ProgrammerECU A Y N Wait request

35 35 © 2010 Renesas Electronics America Inc. All rights reserved. Example – Download Data Block Sequence Request download Transfer data Positive response Request transfer exit More data black? End PC or ProgrammerECU Download data block Y N Wait request More data? Positive response Checksum calculation N Y

36 Renesas Electronics America Inc.


Download ppt "Renesas Electronics America Inc. © 2010 Renesas Electronics America Inc. All rights reserved. ID A15C: Application Code Reprogramming Using Different Serial."

Similar presentations


Ads by Google