Download SH7266/SH7267 Group Application Note E10A

Transcript
SH7266/SH7267 Groups
Example of E10A-USB Flash Memory Download Function
(Download to the Serial Flash Memory)
Contents
1.
Specifications .................................................................................................................................... 3
2.
Operation Confirmation Conditions ................................................................................................... 4
3.
Reference Application Note(s) .......................................................................................................... 4
4.
Hardware........................................................................................................................................... 5
4.1 Hardware Configuration ............................................................................................................... 5
4.2 Reference Circuit ......................................................................................................................... 6
5.
Software ............................................................................................................................................ 7
5.1 Operation Overview ..................................................................................................................... 7
5.1.1 Batch File.............................................................................................................................. 7
5.1.2 Erase Module........................................................................................................................ 7
5.1.3 Write Module......................................................................................................................... 8
5.2 File Composition .......................................................................................................................... 9
5.3 Constants ................................................................................................................................... 10
5.4 Structure/Union List ................................................................................................................... 10
5.5 Variables .................................................................................................................................... 11
5.6 Functions.................................................................................................................................... 11
5.7 Function Specifications .............................................................................................................. 12
5.8 Flowchart.................................................................................................................................... 16
5.8.1 Erase Module...................................................................................................................... 16
5.8.2 Write Module....................................................................................................................... 16
5.8.3 Initialization of FMTOOL ..................................................................................................... 17
5.9 Basic Precautions ...................................................................................................................... 19
5.9.1 Adding Dummy Data to the Load Module........................................................................... 19
5.9.2 Forbidding Sharing Sectors between the Load Modules.................................................... 20
5.9.3 Forbiding Sharing Sectors within the Address Conversion Table ...................................... 20
6.
Application Example........................................................................................................................ 22
6.1 Procedure of User Program Download...................................................................................... 22
6.1.1 Prepare for the Download Environment ............................................................................. 22
6.1.2 Registering a Batch File...................................................................................................... 23
6.1.4 Adding a Download Module................................................................................................ 24
6.1.5 Downloading a User Program ............................................................................................ 25
6.2 Application to Serial Flash Boot ................................................................................................. 26
6.2.1 Changes in replacing the Downloader to the FMTOOL ..................................................... 26
6.2.2 Storing and Reading Constant Data................................................................................... 27
6.3 Customizing FMTOOL ............................................................................................................... 28
6.3.1 Device Specification Capable for Sample Code................................................................. 28
7.
Sample Code................................................................................................................................... 29
8.
Reference Documents..................................................................................................................... 29
R01AN1151EJ0100 Rev.1.00
Jun.18, 2012
Page 2 of 29