Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

JN51xx Flash Programmer Application

User Guide

JN-UG-3007
Revision 1.7
10-Jan-2007
Jennic
JN51xx Flash Programmer Application
User Guide

2 © Jennic 2007 JN-UG-3007 v1.7


Jennic
JN51xx Flash Programmer Application
User Guide

Contents
About this Manual 4
Organisation 4
Conventions 4
Related Documents 4
Feedback Address 4
1 Introduction 5
2 Using the Flash Programmer 7
2.1 Downloading Binary Code 7
2.2 Connecting to a Device and Releasing the Serial Port 9
2.3 Preserving Sector 3 11
2.4 Skipping Verification 12
3 Custom Flash Programming 13

JN-UG-3007 v1.7 © Jennic 2007 3


Jennic
JN51xx Flash Programmer Application
User Guide

About this Manual


This User Guide describes how to use the Jennic JN51xx Flash Programmer
application.

Note: This manual was previously known as the Jennic JN5121


Flash Loader Application User Guide.

Organisation
This manual consists of three chapters, as follows:
• Chapter 1 introduces the JN51xx Flash Programmer application and indicates
the possible installation methods.
• Chapter 2 describes how to download binary code to Flash memory using the
JN51xx Flash Programmer.
• Chapter 3 outlines a two-stage process for downloading binary code to Flash
memory devices not directly supported by the JN51xx Flash Programmer.

Conventions
Files, folders, functions and parameter types are represented in bold type.
Function parameters are represented in italics type.
Code fragments are represented in the Courier typeface.

Related Documents
[1] Custom Flash Programmer Application Note (JN-AN-1038)

Feedback Address
If you wish to comment on this manual, or any other Jennic user documentation,
please provide your feedback by writing to us (quoting the manual reference number
and version) at the following postal address or e-mail address:
Applications
Jennic Ltd
Furnival Street
Sheffield S1 4QT
United Kingdom
doc@jennic.com

4 © Jennic 2007 JN-UG-3007 v1.7


Jennic
JN51xx Flash Programmer Application
User Guide

1 Introduction
The Jennic JN51xx Flash Programmer application can be used to download binary
code to the SPI bus connected ST M25P10 Flash chip on the JN51xx module.

Note: The JN51xx Flash Programmer can also be used to


download binary code to other types of Flash chip as part of a
two-stage process that involves first downloading a custom Flash
programmer to RAM on the JN51xx – refer to Chapter 3.

The JN51xx Flash Programmer can be installed in either of two ways:


• Using the JN51xx Flash Programmer installation package - installation
instructions are contained in the package (JN-SW-4007-FlashLoader.msi)
• As part of the installation of Jennic evaluation kit software from CD
The file JN-SW-4007-FlashLoader.msi is available from the Support area of the
Jennic web site (http://www.jennic.com/support).

! Caution: When installing from an evaluation kit CD, if the Flash


Programmer version is lower than 1.5, you must download the
latest version of this application from the Jennic web site.

JN-UG-3007 v1.7 © Jennic 2007 5


Jennic
JN51xx Flash Programmer Application
User Guide

6 © Jennic 2007 JN-UG-3007 v1.7


Jennic
JN51xx Flash Programmer Application
User Guide

2 Using the Flash Programmer


This chapter describes how to use the Jennic JN51xx Flash Programmer
application, as follows:
• How to download binary code to Flash memory – see Section 2.1.
• How to connect to a device and how to release a serial port to be used by
other programs – see Section 2.2.
• How to preserve Sector 3 data that already exists in the Flash memory – see
Section 2.3.
• How to skip the default verification process during Flash programming – see
Section 2.4.

2.1 Downloading Binary Code


The Jennic JN51xx Flash Programmer presents the following user interface in order
to allow .bin file programming:

JN-UG-3007 v1.7 © Jennic 2007 7


Jennic
JN51xx Flash Programmer Application
User Guide

To download a .bin file to a board or module, the procedure is as follows:


Step 1 Ensure that the serial cable and dongle are plugged into the PC and the board.
Step 2 Run the Flash programmer application and select the correct serial port - this holds
the RTS line high on the serial interface to enable programming mode.

Note: For module programming, the MISO pin should be held


LOW while the module is reset.

Step 3 Reset the device:


• For a Controller board, this involves pressing and releasing the Reset button.
• For an Endpoint board or module, this involves switching the device OFF and
then ON again.
Step 4 In the Flash programmer interface, use the Browse button to find and select the
binary file to download.
Alternatively, the application remembers previously downloaded files and these can
be selected from the drop-down list (see highlighted part of the above screenshot).
Step 5 Once the file has been selected, click the Program button to start the download.
The progress of the download can be viewed in the progress box that is displayed
while the Flash memory is being programmed:

When the download has finished, the result will be shown as successful or having
errors. If there are errors, try the download again.
Step 6 Once the download has successfully completed:
a) Disconnect the serial cable or release the serial port, as described in Section
2.2.
b) Reset the board or module.
The downloaded code will automatically run.

8 © Jennic 2007 JN-UG-3007 v1.7


Jennic
JN51xx Flash Programmer Application
User Guide

2.2 Connecting to a Device and Releasing the Serial Port


The Connect checkbox in the Flash programmer’s dialogue box (illustrated below)
is used to connect to a device on the selected serial port. Selecting this checkbox
forces a booting device into programming mode by holding the RTS line high on the
serial port. If you want the Flash programmer to release this serial port, you must
de-select the Connect checkbox. You can then use the serial port for other
programs, such as a terminal program to communicate with the firmware you have
programmed into the device.

If you need to reprogram the Flash device, you must re-select the Connect
checkbox. The Flash programmer will open the serial port again, hold the RTS line
high and attempt to detect whether a device is connected to the serial port.
If the Flash programmer cannot detect a device on the serial port, it will display a
warning and remind you to power-cycle the device to force it back into programming
mode.
After a power-cycle of the device, you can verify the connectivity by pressing the
Refresh button, illustrated below. The Flash programmer will then detect the

JN-UG-3007 v1.7 © Jennic 2007 9


Jennic
JN51xx Flash Programmer Application
User Guide

JN51xx device, the Flash device type and the MAC address of the JN51xx, and
display this information in the Device field of the dialogue box.

10 © Jennic 2007 JN-UG-3007 v1.7


Jennic
JN51xx Flash Programmer Application
User Guide

2.3 Preserving Sector 3


The Flash device used in Jennic JN51xx modules has a capacity of 128 kbytes, but
only 96 kbytes of this are used for code. This leaves 32 kbytes (in Sector 3)
available for use by the application for data storage.
By default, the Flash programmer will erase the entire contents of Flash memory
when a new program is programmed into the device. If your application uses Sector
3 of the Flash memory for non-volatile storage of data, you should use the checkbox
Preserve Sector 3, illustrated below. When this checkbox is selected, the Flash
programmer will back up Sector 3 before erasing the contents of Flash and will
restore the data once the application has been programmed into Flash.

JN-UG-3007 v1.7 © Jennic 2007 11


Jennic
JN51xx Flash Programmer Application
User Guide

2.4 Skipping Verification


The default operation of the Flash programmer compares the contents of the Flash
memory with the original file after the Flash has been programmed. However, to
speed up the programming operation, you can choose to skip this verification step.
To do this, select the Skip Verification checkbox, illustrated below.

! Caution: Skipping the verification process is only intended for


R&D purposes. You should not skip verification in production
environments.

12 © Jennic 2007 JN-UG-3007 v1.7


Jennic
JN51xx Flash Programmer Application
User Guide

3 Custom Flash Programming


The Jennic JN51xx Flash Programmer enables you to reprogram the SPI-bus
connected ST M25P10 Flash chip on the JN51xx module. If required, the ST Flash
chip can be replaced by other SPI-bus enabled Flash chip types, but the Flash
programming routines built into the JN51xx ROM do not support programming of all
types of Flash chip.
There are often small variations in the ways different Flash chip manufacturers
implement Flash programming algorithms in their chips, but most implement Flash
reading in the same way. The ROM boot loader is therefore likely to be able to read
from any SPI-enabled Flash chip, and thus boot a program from it, but might not be
able to reprogram the chip.
To handle the programming of different types of Flash chip, the JN51xx supports a
two-stage approach in which a custom-made Flash chip programming firmware
image can be uploaded to RAM and then used to program the attached Flash chip.
Please refer to the Application Note Custom Flash Programmer (JN-AN-1038) for
details of how to implement a custom Flash programmer firmware image for your
Flash chip.
Once you have a custom Flash programmer image, you can program your SPI-bus
connected Flash chip as described below.

JN-UG-3007 v1.7 © Jennic 2007 13


Jennic
JN51xx Flash Programmer Application
User Guide

Step 1 In the Flash field of the Jennic JN51xx Flash Programmer interface, select
Custom Flash, as illustrated below.

Step 2 In the file chooser dialogue box that is now displayed, browse to find and select your
custom Flash programmer firmware image.
Step 3 In the Jennic JN51xx Flash Programmer interface, click the Program button.
The Jennic Flash Programmer now uploads the custom Flash programmer to RAM.
Once the upload has finished, the custom Flash programmer automatically
programs your application into the Flash chip.

14 © Jennic 2007 JN-UG-3007 v1.7


Jennic
JN51xx Flash Programmer Application
User Guide

Revision History
Version Date Description

1.0 15-Nov-2005 First issue

1.1 21-Nov-2005 Updated Formatting

1.2 29-Nov-2005 Added Module Programming information

1.3 21-Dec-2005 Changed Programming Instructions

1.4 20-Jan-2006 New screenshots

1.5 15-May-2006 New screenshots for reduced functions

1.6 24-Oct-2006 New screenshots for custom Flash programming and skipping verification.
Manual reformatted and name changed.

1.7 10-Jan-2007 Added Section 2.2 and updated screenshots for version 1.5 of the Flash
programmer

Disclaimer
The contents of this document are subject to change without notice. Customers are advised to consult with JENNIC commercial
representatives before ordering.

The information and circuit diagrams in this document are presented as examples of semiconductor device applications, and are not
intended for incorporation in devices for actual use. Also, JENNIC is unable to assume responsibility for infringement of any patent
rights or other rights of third parties arising from the use of this information or circuit diagrams.

No license is granted by its implication or otherwise under any patent or patent rights of JENNIC Ltd

“Typical” parameters that are provided in this document may vary in different applications and performance may vary over time. All
operating parameters must be validated for each customer application by the customer’s own technical experts.

! Customers considering the use of our products in special


applications where failure or abnormal operation may directly
affect human lives or cause physical injury or property damage,
or where extremely high levels of reliability are demanded (such
as aerospace systems, atomic energy controls, vehicle operating
controls, medical devices for life support, etc.) are requested to
consult with JENNIC representatives before such use. JENNIC
customers using or selling products incorporating JENNIC IP for
use in such applications do so at their own risk and agree to fully
indemnify JENNIC for any damages resulting from such improper
use or sale.

JN-UG-3007 v1.7 © Jennic 2007 15


Jennic
JN51xx Flash Programmer Application
User Guide

Corporate Headquarters Japan Sales Office Taiwan Sales Office


Furnival Street Osakaya building 4F 19F-1, 182, Sec.2
Sheffield 1-11-8 Higashigotanda Tun Hwa S. Road
S1 4QT Shinagawa-ku, Tokyo Taipei 106
United Kingdom 141-0022, Japan Taiwan
Tel +44 (0)114 281 2655 Tel +81 3 5449 7501 Tel +886 2 2735 7357
Fax +44 (0)114 281 2951 Fax +81 3 5449 0741 Fax +886 2 2739 5687
E-mail info@jennic.com E-mail info@jp.jennic.com E-mail info@tw.jennic.com

United States Sales Office United States Sales Office Korean Sales Office
1322 Scott Street, Suite 203 1060 First Avenue, Suite 400 701, 7th Floor, Kunam Building
Point Loma King of Prussia 831-37, Yeoksam-Dong
CA 92106 PA 19406 Kangnam-ku
USA USA Seoul 135-080
Korea
Tel +1 619 223 2215 Tel +1 619 223 2215
Fax +1 619 223 2081 Fax +1 619 223 2081 Tel +82 2 552 5325
E-mail info@us.jennic.com E-mail info@us.jennic.com Fax +82 2 3453 8802
E-mail info@kr.jennic.com

16 © Jennic 2007 JN-UG-3007 v1.7

You might also like