AN10811 Programming SPI flash on EA3131 boards Rev. 01 1 May 2009 Application note Document information Info Content Keywords Abstract



Similar documents
AN10860_1. Contact information. NXP Semiconductors. LPC313x NAND flash data and bad block management

Using the RS232 serial evaluation boards on a USB port

AN LPC1700 timer triggered memory to GPIO data transfer. Document information. LPC1700, GPIO, DMA, Timer0, Sleep Mode

AN Boot mode jumper settings for LPC1800 and LPC4300. Document information

AN10866 LPC1700 secondary USB bootloader

How To Add A Usb Secondary Ipo Bootloader To An Lpc23Xx Flash Device To A Flash Device

PL-2303 (Chip Rev H, HX, X) USB to Serial Adapter Windows Driver Installer Manual

AN LPC1700 RTC hardware auto calibration. Document information. RTC, Hardware Auto Calibration, LPC1700, Graphic LCD

AN Level shifting techniques in I 2 C-bus design. Document information

AN AES encryption and decryption software on LPC microcontrollers. Document information

APPLICATION NOTE. AT07175: SAM-BA Bootloader for SAM D21. Atmel SAM D21. Introduction. Features

CP2110-EK CP2110 EVALUATION KIT USER S GUIDE. 1. Kit Contents. 2. Relevant Documentation. 3. Software Setup

In-System Programmer USER MANUAL RN-ISP-UM RN-WIFLYCR-UM

MFRD52x. Mifare Contactless Smart Card Reader Reference Design. Document information

DUAL MONITOR DRIVER AND VBIOS UPDATE

ES_LPC4357/53/37/33. Errata sheet LPC4357/53/37/33. Document information

AN11008 Flash based non-volatile storage

Quick Start Guide. MRB-KW01 Development Platform Radio Utility Application Demo MODULAR REFERENCE BOARD

MIFARE ISO/IEC PICC

Keep it Simple Timing

AN220 USB DRIVER CUSTOMIZATION

Block 3 Size 0 KB 0 KB 16KB 32KB. Start Address N/A N/A F4000H F0000H. Start Address FA000H F8000H F8000H F8000H. Block 2 Size 8KB 16KB 16KB 16KB

INSTALLING AND USING ENTEL PROGRAMMER IN WINDOWS 7 Technical Support Bulletin

AN1991. Audio decibel level detector with meter driver

AVR1922: Xplain Board Controller Firmware. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Minicom User Guide USER GUIDE v1.0 26/06/2010. Minicom User Guide

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Cypress CY7C64225 USB-to-UART Setup Guide Version 1.3

SheevaPlug Development Kit README Rev. 1.2

AN220 USB DRIVER CUSTOMIZATION

PC Base Adapter Daughter Card UART GPIO. Figure 1. ToolStick Development Platform Block Diagram

AN BGU8009 Matching Options for 850 MHz / 2400 MHz Jammer Immunity. Document information. Keywords

AN LPC24XX external memory bus example. Document information

32-bit AVR UC3 Microcontrollers. 32-bit AtmelAVR Application Note. AVR32769: How to Compile the standalone AVR32 Software Framework in AVR32 Studio V2

Silicon temperature sensors. Other special selections are available on request.

UM Vertical Alignment (VA) displays and NXP LCD drivers

To perform Ethernet setup and communication verification, first perform RS232 setup and communication verification:

The sensor can be operated at any frequency between DC and 1 MHz.

LatticeXP2 Configuration Encryption and Security Usage Guide

USA MOBILITY CABLE CONNECTION AND SOFTWARE DRIVER INSTALLATION INSTRUCTIONS. For. Unication M90 Device USB To RS232 Adapter TABLE OF CONTENTS

ScanWin Installation and Windows 7-64 bit operating system

PMEG3005EB; PMEG3005EL

MOSFET N-channel enhancement switching transistor IMPORTANT NOTICE. use

Bluetooth HC-06 with serial port module Easy guide

Agilent Automated Card Extraction Dried Blood Spot LC/MS System

USER GUIDE. ZigBit USB Stick User Guide. Introduction

RN-WIFLY-EVAL-UM. WiFly Evaluation Kit Roving Networks. All rights reserved. RN-WIFLY-EVAL-UM Version 1.32r 10/9/2012 USER MANUAL

SUDT AccessPort TM Advanced Terminal / Monitor / Debugger Version 1.37 User Manual

Instructions for Installing and Using the FOCUS DL-15 Data Transfer Software

MF1 IC S General description. Functional specification. 1.1 Contactless Energy and Data Transfer. 1.2 Anticollision. Energy

RN-XV-RD2 Evaluation Board

PESDxU1UT series. 1. Product profile. Ultra low capacitance ESD protection diode in SOT23 package. 1.1 General description. 1.

December 2002, ver. 1.0 Application Note 285. This document describes the Excalibur web server demonstration design and includes the following topics:

8-bit. Application Note. Microcontrollers. AVR282: USB Firmware Upgrade for AT90USB

How To Fix An Lmx9838 Bluetooth Serial Port Module With Bluetooth (Bluetooth 2) From A Bluetooth Bluetooth 4.2 Device With A Bluembee 2.2 Module

Planar PIN diode in a SOD323 very small plastic SMD package.

FN:PCMCSET-M1.DOC. PCMCSET SOFTWARE for ATS Master Clocks System Clocks and Displays

PMEG2020EH; PMEG2020EJ

PMEG3015EH; PMEG3015EJ

PN L, Revision B, October Epic 950 TM. Master Programmer User s Guide

ALL-USB-RS422/485. User Manual. USB to Serial Converter RS422/485. ALLNET GmbH Computersysteme Alle Rechte vorbehalten

IP4220CZ6. 1. Product profile. Dual USB 2.0 integrated ESD protection. 1.1 General description. 1.2 Features and benefits. 1.

How To Develop A Toolstick

USER GUIDE EDBG. Description

QUADRO POWER GUIDELINES

AN3354 Application note

1-Wire Automation Software

PMEG1020EA. 1. Product profile. 2 A ultra low V F MEGA Schottky barrier rectifier. 1.1 General description. 1.2 Features. 1.

10 ma LED driver in SOT457

GE Measurement & Control

RN-131-PICTAIL & RN-171-PICTAIL Web-Server Demo Application

Database Binary Backup PC Utility

AN4128 Application note

Medium power Schottky barrier single diode

CAN bus ESD protection diode

NOW LEAD-FREE! VCCIO VCCIO RXLED TXLED DTR# 10K FTDI FT232R

Software User Guide UG-461

Waspmote. Quickstart Guide

Develop a Dallas 1-Wire Master Using the Z8F1680 Series of MCUs

AN335 USB DRIVER INSTALLATION UTILITY. 1. Description. 2. Installation Install Package

L Firmware And FPGA Configuration Upgrade

Temperature & Humidity SMS Alert Controller

AN Single stage 5-6 GHz WLAN LNA with BFU730F. document information

3-input EXCLUSIVE-OR gate. The 74LVC1G386 provides a 3-input EXCLUSIVE-OR function.

NPN wideband transistor in a SOT89 plastic package.

Current Cost Data Cable User Guide. Installing and configuring the data cable

HEF4011B. 1. General description. 2. Features and benefits. 3. Ordering information. 4. Functional diagram. Quad 2-input NAND gate

How to setup a serial Bluetooth adapter Master Guide

PRTR5V0U2F; PRTR5V0U2K

UM Discrete Class D High Power Audio Amplifier. Document information

Board also Supports MicroBridge

Design Considerations in Adding USB Communications to Embedded Applications

User's Guide. Using RFDBManager. For 433 MHz / 2.4 GHz RF. Version

The Answer to the 14 Most Frequently Asked Modbus Questions

Lab Experiment 1: The LPC 2148 Education Board

UM0985 User manual. Developing your STM32VLDISCOVERY application using the IAR Embedded Workbench software. Introduction

Bootloader with AES Encryption

AT89C5131A Starter Kit... Software User Guide

Schottky barrier quadruple diode

APPLICATION NOTE. Atmel AT02985: User s Guide for USB-CAN Demo on SAM4E-EK. Atmel AVR 32-bit Microcontroller. Features. Description.

Transcription:

Rev. 01 1 May 2009 Application note Document information Info Keywords Abstract Content LPC3130, LPC3131, SPI flash Example for programming SPI flash on EA3131 boards.

Revision history Rev Date Description 01 20090501 Initial version. Contact information For additional information, please visit: http://www.nxp.com For sales office addresses, please send an email to: salesaddresses@nxp.com _1 Application note Rev. 01 1 May 2009 2 of 10

1. Introduction The SPI programmer example provided with the Common Driver Library (CDL) can be used to program the Atmel SPI flash with bootable images. The current version of the programmer operates only in 512 byte page mode. The AT45DB321D chip used on an EA board comes from the factory in 528 byte page mode. The SPI programmer will blow the OTP fuse which controls the page mode on AT45DB321D the very first time. If your application requires 528 byte page flash devices then don't use this programmer, or modify it accordingly. 2. Configuring the EA3131 board Fig 1 shows the EA3131 board, with the relevant settings: 1 Boot mode jumpers 2 USB-to-UART bridge / UART selection jumper 3 UART / XBee selection jumper (1) Boot mode jumpers (2) USB-to-UART bridge / UART selection jumpers (3) UART / XBee selection jumpers Fig 1. EA3131 board jumpers 2.1 Setting the EA3131 board in UART boot mode Set the EA board in UART boot mode (see 1 in Fig 1): _1 Application note Rev. 01 1 May 2009 3 of 10

UART boot mode: Boot0 = High, Boot1 = High, Boot2 = Low Fig 2. Boot mode jumpers setting for UART boot mode 2.2 Configuring the serial port in EA3131 board Two different modes can be used for the serial port: a) UART (DB9 connector): 3. Preparing the binary file In this case, J27/J29 (see 2 in Fig 1) must be set to the Upper position (RS232 position), while J28/J30/J31/J32 (see 3 in Fig 1) must be set to the Left position (RS232 position). A serial cable must be connected between the EA3131 board (DB9 connector) and the PC (serial connector). b) USB-to-UART bridge (mini-usb connector): In this case, J27/J29 (see 2 in Fig 1) must be set to the Lower position (USB position). A USB cable must be connected between the EA3131 board (mini- USB connector) and the PC (USB connector). A Virtual COM driver must be installed in this case, so please refer to the EA3131 board s User Manual for specific instructions. Note: independent of the above configuration chosen, the EA3131 board can be powered via the mini-usb or the External Power Supply connectors (or even from both connectors at the same time). The SPI flash programmer performs a CRC check on the downloaded binary image, so it s necessary to append a CRC Header to the binary image. NXP provides the LPC313xImgCreator.exe utility for this purpose. 3.1 Using the LPC313XImgCreator The LPC313xImgCreator utility (attached to this Application Note and also found in the tool directory if the CDL) can be used to append a CRC Header to a binary image. Fig 3 shows the options available from the utility: _1 Application note Rev. 01 1 May 2009 4 of 10

Fig 3. LPC313xImgCreator Command Line Options According to Fig 3, the following command will append the CRC header to the demo.bin image: lpc313ximgcreator o path -pc i path/filename.bin and it will create a filename.rom file in the specified output directory. Notes: 1) This utility allows binary images up to 128 kb in size. 2) The current version of this utility does not overwrite the output file, so in case a previous version of the.rom file already exists, it should be manually deleted before running the utility. 4. Programming the SPI flash 4.1 Connect the EA313x board to the PC Use a serial cable or USB cable (see section 2.2) in order to connect EA313x board to a PC. 4.2 Start a PC Terminal application program Configure a terminal application (which should be able to transfer files in binary mode, such as TeraTerm Pro) with 115200-8-n settings. If using USB-to-serial bridge port on EA board, the appropriate Virtual COM port has to be selected. By the time USB-to-serial enumerates, the bootrom of LPC313x would have transmitted the initial string. Hence reset the board using the "reset" button after opening the terminal application. Notes: 1) The default installation of TeraTerm Pro allows only up to COM4 ports. To increase the number of COM ports accessible by TeraTerm Pro, change the following line in TERATERM.INI (C:\Program Files\TTERMPRO): MaxComPort=4 to MaxComPort=10 2) Don t use Hyperterminal program, because it does not provide a way to send a file as binary. _1 Application note Rev. 01 1 May 2009 5 of 10

4.3 Load the programmer code Once the EA313x board is powered and connected to the PC, reset the board. The following message should appear in the terminal window: Fig 4. Initial prompt after resetting the board Select File -> Send file option from the terminal application s menu and the next screen will appear: Fig 5. Send file selection: spi_prog.bin!!!don t forget to check the Binary option, as the file to send is a binary image. Choose the spi_prog.bin file, check the Binary option, and press Open to start the file transfer. After download, the following message will appear: _1 Application note Rev. 01 1 May 2009 6 of 10

Fig 6. The spi_prog.bin file is downloaded and executing Note: as it is stated in the introduction, the AT45DB321D chip used on EA board comes from the factory in 528 byte page mode. The SPI programmer will blow the OTP fuse which controls the page mode on AT45DB321D the very first time. Then, the first time you run the spi_prog.bin code, the following message will appear: Fig 7. Message informing the NOR flash was converted from 528-byte page size to 512-byte page size. Then, power cycle the board and repeat the previous procedure. 4.4 Download the user s image file The last step is to download the actual user s image file (.rom file generated with lpc313ximgcreator utility). For this, select File -> Send file from the menu, choose the user s image file, check the Binary option (if it s not already checked) and press the Open button in order to start the download process. An example binary (timer_example_crc.rom) is attached to the application note to test this procedure. When finished, the following message should appear: _1 Application note Rev. 01 1 May 2009 7 of 10

Fig 8. Message once the user s image was programmed into the SPI flash At this point, the SPI flash is programmed with the user s image. Note: The spi_prog.bin file is attached to this Application Code, and its source code can be found in the Common Driver Library, at the following directory: C:\nxpmcu\Software\csps\lpc313x\bsps\ea3131\examples\spi_prog 5. Booting from the SPI flash The last step is to configure the Boot mode jumpers for SPI flash boot mode and reset the board. 5.1 Setting the EA313x board for SPI flash boot mode SPI flash boot mode: Boot0 = Low, Boot1 = Low, Boot2 = High Fig 9. Boot mode jumpers setting for SPI NOR Flash boot mode Once the SPI flash boot mode is set, and after resetting the board, the lpc313x will boot from the SPI flash. _1 Application note Rev. 01 1 May 2009 8 of 10

6. Legal information 6.1 Definitions Draft The document is a draft version only. The content is still under internal review and subject to formal approval, which may result in modifications or additions. NXP Semiconductors does not give any representations or warranties as to the accuracy or completeness of information included herein and shall have no liability for the consequences of use of such information. 6.2 Disclaimers General Information in this document is believed to be accurate and reliable. However, NXP Semiconductors does not give any representations or warranties, expressed or implied, as to the accuracy or completeness of such information and shall have no liability for the consequences of use of such information. Right to make changes NXP Semiconductors reserves the right to make changes to information published in this document, including without limitation specifications and product descriptions, at any time and without notice. This document supersedes and replaces all information supplied prior to the publication hereof. Suitability for use NXP Semiconductors products are not designed, authorized or warranted to be suitable for use in medical, military, aircraft, space or life support equipment, nor in applications where failure or malfunction of a NXP Semiconductors product can reasonably be expected to result in personal injury, death or severe property or environmental damage. NXP Semiconductors accepts no liability for inclusion and/or use of NXP Semiconductors products in such equipment or applications and therefore such inclusion and/or use is for the customer s own risk. Applications Applications that are described herein for any of these products are for illustrative purposes only. NXP Semiconductors makes no representation or warranty that such applications will be suitable for the specified use without further testing or modification. Export control This document as well as the item(s) described herein may be subject to export control regulations. Export might require a prior authorization from national authorities. 6.3 Trademarks Notice: All referenced brands, product names, service names and trademarks are property of their respective owners. _1 Application note Rev. 01 1 May 2009 9 of 10

7. Contents 1. Introduction...3 2. Configuring the EA3131 board...3 2.1 2.2 Setting the EA3131 board in UART boot mode..3 Configuring the serial port in EA3131 board...4 3. Preparing the binary file...4 3.1 Using the LPC313XImgCreator...4 4. Programming the SPI flash...5 4.1 Connect the EA313x board to the PC...5 4.2 Start a PC Terminal application program...5 4.3 Load the programmer code...6 4.4 Download the user s image file...7 5. Booting from the SPI flash...8 5.1 Setting the EA313x board for SPI flash boot mode...8 6. Legal information...9 6.1 Definitions...9 6.2 Disclaimers...9 6.3 Trademarks...9 7. Contents...10 Please be aware that important notices concerning this document and the product(s) described herein, have been included in the section 'Legal information'. For more information, please visit: http://www.nxp.com For sales office addresses, email to: salesaddresses@nxp.com Date of release: 1 May 2009 Document identifier: _1