Download to Serial Flash Memory

Transcript
SH726A/SH726B Group
Example of E10A-USB Flash Memory Download Function
(Download to the Serial Flash Memory)
Contents
1.
Specifications .................................................................................................................................... 4
2.
Operation Confirmation Conditions ................................................................................................... 5
3.
Reference Application Note(s) .......................................................................................................... 5
4.
Peripheral Functions ......................................................................................................................... 6
5.
Hardware........................................................................................................................................... 7
5.1 Hardware Configuration ............................................................................................................... 7
5.2 Pins Used..................................................................................................................................... 8
6.
Software ............................................................................................................................................ 9
6.1 Operation Overview ..................................................................................................................... 9
6.1.1 Batch File.............................................................................................................................. 9
6.1.2 Erase Module........................................................................................................................ 9
6.1.3 Write Module....................................................................................................................... 10
6.2 File Composition ........................................................................................................................ 11
6.3 Constants ................................................................................................................................... 12
6.4 Structure/Union List ................................................................................................................... 13
6.5 Variables .................................................................................................................................... 14
6.6 Functions.................................................................................................................................... 15
6.7 Function Specifications .............................................................................................................. 16
6.8 Flowcharts.................................................................................................................................. 21
6.8.1 Erase Module...................................................................................................................... 21
6.8.2 Write Module....................................................................................................................... 21
6.8.3 Initialization of the FMTOOL ............................................................................................... 22
6.8.4 Write Processing for the Flash Memory ............................................................................. 23
6.9 Basic Precautions ...................................................................................................................... 24
6.9.1 Adding Dummy Data to the Load Module........................................................................... 24
6.9.2 Forbidding Sharing Sectors between the Load Modules.................................................... 25
7.
Application Example........................................................................................................................ 26
7.1 Procedure of User Program Download...................................................................................... 26
7.1.1 Prepare for the Download Environment ............................................................................. 26
7.1.2 Registering a Batch File...................................................................................................... 26
7.1.3 Setting Configuration Dialog Box........................................................................................ 27
7.1.4 Adding the Download Module............................................................................................ 28
7.1.5 Downloading User Programs.............................................................................................. 28
7.2 Application to Serial Flash Boot ................................................................................................. 30
7.2.1 Section Assignment ............................................................................................................ 30
7.2.2 Adding Dummy Data........................................................................................................... 30
7.2.3 Downloading the Load Module ........................................................................................... 30
7.3 Customizing FMTOOL ............................................................................................................... 31
7.3.1 Device Specification Capable for Sample Code................................................................. 31
7.3.2 Contents of Customization.................................................................................................. 31
R01AN1178EJ0100 Rev.1.00
Jun. 25, 2012
Page 2 of 32