Home

J-Flash manual

image

Contents

1. Hardware Flash device Organization Speed Atmel AT91EB40 Atmel AT49BV162A 1 16 Bits 105 025 kB s Cogent CSB337 Intel 28F640J3 1 16 Bits 93 058 kB s NetSilicon NS9360 AMD Am29LV160DB 2 16 Bits 185 171 kB s Logic LH7A400 Intel 28F640J3A120 2 16 Bits 154 978 kB s Table 9 2 List of performance values of MCUs with external flash J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 82 CHAPTER 9 Performance J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 83 Chapter 10 Background information This chapter provides some background information about specific parts of the J Flash software J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 84 CHAPTER 10 Background information 10 1 CRC of current data file When opening a data file in J Flash File gt Open J Flash calculates and displays the CRC of the user data in this file The following steps are taken into consideration when calculating this CRC 1 The CRC is calculated over all sectors which are selected in the current project Project settings E x 2 Everything that is not covered by the data file gaps in the data file unused sec tors etc which is opened is assumed as OxFF during the CRC calculation 3 The polynomial which is used for the CRC calculation is OxEDB88320 J Flash User Guide UM08003 2004
2. J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 19 The licensing dialog will show the licenses together with their expiration date the serial number they are bound to and the feature that is licensed by the respective key J Flash ARM License management Aug 5 2005 You may select individual license keys for removal Click the Delete license button after selecting the key you want to remove The key is deleted immediately without asking for confirmation and the licensed features become unavailable J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 20 CHAPTER 2 Licensing J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 21 Chapter 3 Getting Started This chapter presents an introduction to J Flash It provides an overview of the included sample projects and describes J Flash s menu structure in detail J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 22 CHAPTER 3 Getting Started 3 1 Setup The J Link setup procedure required in order to work with the J Flash is described in chapter 2 of the J Link J Trace User Guide The J Link User Guide is part of the J Link software package which is available for download under www segger com 3 1 1 What is included The following table shows the contents of all subdirectories of the J Link ARM software and documentation pack
3. _ Voltage threshold 3000 my Dela IV Program serial number Address oeo01 000 Next SN fi 234567 Len 4 Increment 1 Actions performed by Auto IV Erase FN Program IV Verify CRC I Secure chip JT Start application Sectors if not blank X J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 60 CHAPTER 6 Create a new J Flash project Setting Meaning The address the serial number should be programmed at The length of the serial number in bytes which should be programmed Address If no serial number list file is given J Flash allows to use a 1 4 byte serial number In case of 8 is selected as length the serial number and its comple mentary is programmed at the given Len address In case a serial number list file is given J Flash will take the serial number bytes from the list file If a serial number in the list file does not define all bytes of Len the remaining bytes are filled with Os No complements etc are added to the serial number In case no serial number list file is given Next SN is next serial number which should be programmed The serial number is always stored in lit tle endian format in the flash memory In case a serial number list file is given Next SN describes the line of the serial number list file where to read the next serial number bytes from J Flashs starts counting with line 0 so in o
4. STR912FAW47 jflash ST STR912FAW47 with internal flash memory STR912_Bootbank1 jflash ST STR912 with internal flash memory TMPA910 jflash Toshiba TMPA910 with external flash memory TMPM320_1x16_NOR jflash Toshiba TMPM320 with external NOR flash mem ory TMPM330 jflash Toshiba TMPM330 with internal flash memory TMS470R1A64 jflash TI TMS470R1A64 with internal flash memory TMS470R1A128 jflash TI TMS470R1A128 with internal flash memory TMS470R1A256 jflash TI TMS470R1A256 with internal flash memory TMS470R1A288 jflash TI TMS470R1A288 with internal flash memory TMS470R1A384 jflash TI TMS470R1A384 with internal flash memory TMS470R1B1M jflash TI TMS470R1B1M with internal flash memory TMS470R1B512 jflash TI TMS470R1B512 with internal flash memory TMS470R1VF689 jflash TI TMS470R1VF689 with internal flash memory TMS570LS20216 jflash TI TMS570LS20216 with internal flash memory TMS570LS20216_PLL MCBTMS570 jflash TI TMS570LS20216 with internal flash memory TMS5701S3137 jflash TI TMS570LS3137 with internal flash memory Wavecom_WMP100_WMP100DevKit jflash Wavecome WMP100 external flash memory XMC4500 jflash Infineon XMC4500 with internal flash memory Table 3 2 List of sample J Flash projects J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG
5. 2004 2015 SEGGER Microcontroller GmbH amp Co KG 51 5 3 Batch processing J Flash can be used for batch processing purposes All important options are avail able in command line mode as well If you provide command line options J Flash will still start its GUI but processing will start immediately The example batchfile below will cause J Flash to perform the following operations 1 Open project C Projects Default jflash 2 Open bin file C Data data bin and set start address to 0x100000 3 Perform Auto operation in J Flash by default this performs erase program verify 4 Close J Flash The return value will be checked and in case of an error an error message displayed Adapt the example according to the requirements of your project ECHO OFF ECHO Open a project and data file start auto processing and exit JFlash exe openprjC Projects Default jflash openC Data data bin 0x100000 auto exit IF ERRORLEVEL 1 goto ERROR goto END ERROR ECHO J Flash ARM Error pause END Starting J Flash minimzed Adapt this example call to start J Flash minimized start min wait J Flash JFlash exe openprjC Projects Default jflash openC Data data bin 0x100000 auto exit Note that every call of JFlash exe has to be completed with the exit option oth erwise the execution of the batch file stops and the following commands will not be processed J Flash User Guide UM08003 2004 2015
6. 2004 2015 SEGGER Microcontroller GmbH amp Co KG J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG Chapter 1 Introduction The following chapter introduces J Flash highlights some of its features and lists its requirements on host and target systems J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 12 CHAPTER 1 Introduction 1 1 What is J Flash J Flash is a stand alone flash programming software for PCs running Microsoft Win dows The following Microsoft Windows versions are supported Microsoft Windows 2000 Microsoft Windows XP Microsoft Windows XP x64 Microsoft Windows 2003 Microsoft Windows 2003 x64 Microsoft Windows Vista Microsoft Windows Vista x64 Microsoft Windows 7 Microsoft Windows 7 x64 Windows 8 Windows 8 x64 J Flash has an intuitive user interface and makes programming flash devices conve nient J Flash requires a J Link JTAG emulator for ARM cores to interface to the hardware It is able to program internal and external flash at very high speeds upwards of 200 kB sec depending on the chip J Flash has an approximate blank check speed of 16 MB sec Another notable feature is smart read back which only transfers non blank portions of the flash increasing the speed of read back greatly These features along with its ability to work with any ARM7 or ARM9 chip makes it a great solution for most projects 1 1 1 Features e Any ARM7
7. Table 4 1 J Flash init sequence commands Those steps will be performed immediately after the target has been successfully programmed In case of verify is checked in the production settings Options gt Project settings gt Production settings tab those steps will be performed after verify The Exit steps can be used to do some special handling after programming for exam ple to set some security bits in order to secure the chip Note Exit steps are only performed for Target gt Auto operations 2004 2015 SEGGER Microcontroller GmbH amp Co KG 41 4 1 4 Flash Settings This dialog is used to select and configure the flash device to operate with The listed options of the Flash settings menu are dependent on the selection in the CPU settings dialog If you have selected a core family to program external flash memory the menu should look similar to the screenshot below Project settings If you have selected a specific device to program the flash of these device the menu should look similar to the screenshot below Project settings El Es 20000000 4 1 4 1 Base Address You may enter the base address of the selected flash memory The default value is O 4 1 4 2 Organization You should select the buswidth and the number of flash chips connected to the address and data bus of the MCU J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 42 CHAPTER 4 Settings
8. Tile Horizontal Tiles the windows horizontally with the active window at the top Tile Vertical Tiles the windows vertically with the active window at the left Table 3 8 Window menu elements Help menu elements Command Description J Flash User s Guide Shows this help file in a PDF viewer such as Adobe Reader J Link User s Guide Shows the J Link User s Guide in a PDF viewer such as Adobe Reader Shows a dialog with licensing information The serial Licenses number of a connected J Link may be read and licenses added or removed About J Flash and company information Table 3 9 Help menu elements J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 33 Chapter 4 Settings The following chapter provides an overview of the program settings Both general and per project settings are considered J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 34 4 1 CHAPTER 4 Settings Project Settings Project settings are available from the Options menu in the main window or by using the ALT F7 keyboard shortcut 4 1 1 General Settings This dialog is used to choose the connection to J Link The J Link can either be connected directly over USB to the host system of J Flash or it can be connected through the J Link TCP IP Server running on a remote system Refer to the J Link manual for
9. 13 J Link Commander tal ES SEGGER J Link Commander U3 8Ba for help Compiled Mar 12 2068 15 14 1 DLL version U3 88Ba compiled Mar 12 2608 15 14 68 re J Link compiled Mar 3 2608 19 52 16 ARM Rev 5 E a J Link gt J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 18 CHAPTER 2 Licensing 2 2 2 Key based license When using a key based license a license key is required in order to unlock the full potential of J Flash License keys can be added via the J Flash license management To get to the J Flash license management just select Licenses from the Help menu of the main window Like the built in license the key based license is only valid for one J Link so if another J Link is used it needs a separate license J Flash ARM License management 2 2 2 1 The serial number The licensing dialog contains a button Display serial number J Flash tries to read the serial number of a connected J Link if you press this button Serial number 2 2 2 2 License management The licensing dialog contains buttons to add and remove license keys After you received a key from us click on Add license to unlock J Flash Depending on the license you requested you are free to use J Flash either for an unlimited or limited period of time Enter the key into the Add license dialog and click OK to submit f Add license x License_JFlash_W0_S1080091_E OREDO K ANNEE 1 D Cao
10. 4 1 4 3 Select flash device You can select a device manually or use the J Flash Auto Detection feature The auto detection feature is select by default It supports both CFI compliant flash mem ory chips and non CFI compliant chips You can select a device manually if you dese lect the Auto Detection checkbox and click on the Select flash device button After invoking this button a table will be presented The table may be filtered using the manufacturer name The chip and its attributes manufacturer name device name size number of sectors eight bit identifier sixteen bit identifier bus width must be selected from this table If the flash chip is not found please contact SEG GER as devices are continuously being added to this list AMD Am29DL161DB 2048 KB 39 10039 12239 16 AMD Am29DL161DT 2048 KB 39 10036 12236 16 AMD Am29DL162DB 2048 KB 39 1002E 1222E 16 AMD Am29DL162DT 2048 KB 39 1002D 1222D 16 AMD Am29DL163DB 2048 KB 39 10028 12228 16 AMD Am29DL163DT 2048 KB 39 10028 12228 16 AMD Am29DL164DB 2048 KB 39 10035 12235 16 AMD Am29DL164DT 2048 KB 39 10033 12233 16 AMD Am29DL322DB GB 4096 KB 71 10056 12256 16 AMD Am29DL322D T GT 4096 KB 71 10055 12255 16 AMD Am29DL323DB GB 4096 KB 71 10053 12253 16 AMD Am29DL323DT GT 4096 KB 71 10050 12250 16 AMD Am29DL324DB GB 4096 KB 71 1005F 1225F 16 AMD Am29DL324DT GT 4096 KB 71 1005C 1225C 16 AMD Am29DL400BB 512 KB 14 10
11. 77 80 81 P Performante uri ls 79 PROJECES ra a tte 24 S Supported Microcontrollers 77 Syntax conventions used 5 T TEPP corr rreson RNEER 35 U USB E E A eevee 35 J Flash User Guide UM08003 2004 2013 SEGGER Microcontroller GmbH amp Co KG 90 CHAPTER J Flash User Guide UMO8003 2004 2013 SEGGER Microcontroller GmbH amp Co KG
12. that you have to modify the value in this dialog if you set up a PLL or otherwise change the clock frequency in the init sequence 4 1 3 4 Endianess The compatible endianness of the selected device is set automatically The endianess must be only explicit defined if you select the Core family to program external flash Select Little endian or Big endian from drop down menu accordant to your core 4 1 3 5 Check core ID If the core ID is known for the device to be programmed it can be used to verify that the device in communication via the J Link is the intended device The core ID for all listed devices is known so is this option selected automatically if you select a device from the Device drop down menu and can not be modified If you select the core family from the Core drop down menu you can modify the default core ID Mask This option allows the user to mask out specified bits of the core ID All bits set to O in Mask are not taken into account when comparing the Code ID found by J Link with the Core ID entered in J Flash Example Values Check result Core ID entered 0x3BA00477 Core ID found 0x4BA00477 Failed Mask OxFFFFFFFF Core ID entered 0x3BA00477 Core ID found 0x4BA00477 Passed Mask OXOFFFFFFF The code ID check works as follows CoreIDFound amp Mask CorelDEntered amp Mask if CoreIDFound CorelDEntered return Error Core ID check failed J Flash User G
13. 2015 SEGGER Microcontroller GmbH amp Co KG 85 Chapter 11 Support The following chapter provides information about how to contact our support J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 86 CHAPTER 11 Support 11 1 Troubleshooting 11 1 1 General procedure e Make sure your J Link is working as expected See the troubleshooting section in the J Link manual e Ensure that the target hardware matches the project file settings Pay special attention to the following aspects Init sequence Clock speed RAM address Flash base address MCU Flash chip Flash organization e Try to program your target device using a sample project file if available J Flash ships with an extensive number of project files for many target boards See sec tion Sample Projects on page 24 for a complete list of project files e The JTAG clock frequency depends on several factors e g cable length target board etc Try setting the frequency to lower or higher values accordingly e Make sure the flash memory is unlocked before programming or erasing 11 1 2 Typical problems Failed to connect Meaning This error message is shown if any error occurs during the connection process Remedy First of all make sure the target is actually connected to J Link Verify the correct ness of the init sequence check the JTAG speed and ensure the correct flash type is selected Programming Erasing failed Me
14. 28 3 3 CHAPTER 3 Getting Started Start dialog When starting J Flash by default a startup dialog pops up which gives the user vari ous options how to proceed For most users the option Create project from template is recommended J Flash comes with a large amount of sample template projects which are pre config ured for various targets so in most cases the user just needs to select the appropri ate sample template project for his target and can just start without further configuration being necessary The options provided by the startup dialog are explained in more detail below wcre Please select one of the following start options Default flash X Create project from template J Create a new project Do not show this message again If checked J Flash will open the last opened project in the future Start J Flash The startup dialog provides the following options If Do not show this message again Open open existing project Select a project from the list of recent projects or select Other to open another existing project Create project from template Creates a new project based on an example project delivered with J Flash When selecting this and clicking the button a list of available example projects which are delivered with J Flash is shown As soon as an example project has been selected and Start J Flash is clicked J Flash will ask where to save the new
15. A 8 byte serial number should be programmed at address 0x08000000 It should be programmed as follows in the memory 0x08000000 0x01 0x02 0x03 0x04 0x55 0x66 0x77 0x88 The serial number list file should look as follows 0102030455667788 File Edit Format View Help 0102030455667788 0102030455667789 010203045566778A 010203045566778B 010203045566778C 010203045566778D 010203045566778E 010203045566778F 0102030455667790 0102030455667791 0102030455667792 0102030455667793 0102030455667794 0102030455667795 The number of bytes to read per line is configured via the Len option in J Flash For more information please refer to Serial number settings on page 59 Which line J Flash will read at the next programming cycle is configured via the Next SN option in J Flash For more information please refer to Serial number settings on page 59 In this case Next SN needs to be set to 0 since programming should be started with the serial number bytes defined in the first line of the file Note If the number of bytes specified in a line of the serial number list file is less than the serial number length defined in the project the remaining bytes filled with Os by Flasher ARM Note If the number of bytes specified in a line of the serial number list file is greater than the serial number length defined in the J Flash project the remaining bytes will be ignored by J Flash Note When using Windows 7 please make sure that the used pr
16. ARM devices are introduced to the scan chain the IRLen must be modified accordingly 4 1 3 CPU Settings This dialog allows the selection of microcontroller dependent settings General Target Interface CPU Fash Production JT Use J Link script file E C Core Device JV Check core ID ST STM32F103VF El 10 38400477 Litie endian z Mask FFFFFFFF F Use target RAM faster Addr 20000000 96 KB Init steps bd J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 38 CHAPTER 4 Settings J Flash can be used to program both external or internal flash memory In order to use J Flash with an external flash device the proper Core must be selected To program internal flash devices choose the respective microcontroller in the Device list If your microcontroller is not found on this list contact SEGGER as new microcontrollers are continuously being added 4 1 3 1 Core Select Generic ARM7 ARM9 or XSCALE depend on the used MCU architecture ver sion to program external flash 4 1 3 2 Device Select the respective microcontroller from the list to program internal flash devices 4 1 3 3 Clock The correct clock frequency in Hz of your MCU is required to guarantee accurate operation of J Flash J Flash uses default the Auto detection feature We recommend to change this default behavior only if you know what you do If you deactivate the Auto detection feature take into account
17. ARM9 Cortex M0 M1 M3 M4 and Renesas RX600 core supported e Microcontroller internal flash support e Support for most external flash chips For more information please refer to Target systems on page 75 e High speed programming up to 200 KBytes sec depending on flash device Very high speed blank check approximately 16 MBytes sec depending on the chip Smart read back only non blank portions of flash are transferred and saved Free evaluation licenses available Verbose logging of all communication hex mot srec and bin support Intuitive user interface Measured with J Link ARM Rev 5 in DCC mode J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 1 2 Assumptions This user manual assumes that you already possess working knowledge of the J Link device If you feel that your knowledge of J Link is not sufficient we recommend the J Link manual which describes the device and its use in detail J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 14 CHAPTER 1 Introduction 1 3 Requirements 1 3 1 Host J Flash requires a PC running Microsoft Windows 2000 or Windows XP with a free USB port dedicated for a J Link A network connection is required only if you want to use J Flash together with a remote J Link server 1 3 2 Target A JTAG interface must be available on the target device to establish the connection with the host system A network c
18. Add button to open the Add action dialog Add action In the Action Type choice list all possible commands are listed The following two textboxes are dependent on the chosen command They are grayed out or used to enter the required parameter The Comment textbox should be used to enter a short description of the action For a list of all valid commands which can be used in an init sequence please refer to Init steps on page 39 6 2 1 Example init sequence A good example of a typical init sequence is the init sequence of an AT91SAM7 CPU The following example is excerpted from the J Flash project for the AT91SAM7S256 The example init sequence step by step Reset the target with J Link reset strategy O and O delay Disable the watchdog by writing to the Watchdog Timer Mode Register Set flash wait states by writing to the MC Flash Mode Register Set the PLL by writing to power management controller Set a delay of 200ms Set the PLL and the divider by writing to PLL Register of the power management controller Set a delay of 200ms Set the master and processor clock by writing to the Master Clock Register of the power management controller ree a O The steps implemented in J Flash Project settings ms OxFFFFFD44 Ox00008000 Disable wat OxFFFFFF60 Ox00320300 Set flash wait states OxFFFFFC20 Ox00000601 SetPLL 200 ms OxFFFFFC2C 0x00191C05 Set PLL and divider 200 ms OxFFFFFC30 Ox00000007 Select
19. Eliminate blank areas Eliminates blank regions within the data file Table 3 4 Edit menu elements J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG View menu elements 31 Command Description Opens and or brings the log window to the active win Log dow Opens and or brings the project window to the active Project pe ii Table 3 5 View menu elements Target menu elements Command Description Creates a connection through the J Link using the config Connect uration options set in the Project settings of the Options drop down menu Disc nne i Disconnects a current connection that has been made through the J Link Show CFI info Reads the CFI query information of a CFI compliant flash device Test gt Two test functions are implemented Generates test data generates data which can be used to test if the flash can be programmed correctly The size of the gen erated data file can be defined Tests up download speed writes data of an specified size to an defined address reads the written data back and measures the up and download speed Lock Unlock sectors gt Sectors may be locked and unlocked The soft lock and soft unlock work on a software only basis for those sec tors that have been selected on the Flash tab of the Project Settings found in the Options drop down menu If the software locks a sector with
20. Interface Section Command line options corrected 4 16 Rev 0 100723 KN Chapter Settings Section Init sequence updated 4 10 Rev 4 091204 AG Chapter Device specifics Section Freescale added 4 10 Rev 2 090918 AG Chapter Command Line interface Section Command line options updated 4 10 Rev 1 090902 AG Chapter Device specifics Section ST Microelectronics updated 4 10 Rev 0 090825 AG Chapter Device specifics Section ST Microelectronics updated 4 04 Rev 1 090414 AG Chapter Introduction Section What is J Flash updated 4 04 Rev 0 090204 AG Chapter Command Line Interface Section Overview updated Section Command Line Options updated Table List of manual versions J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG Manual version Date By Explanation Chapter Target systems 3 97e Rev 0 081204 KN Section Supported Flash Devices updated Chapter Settings Section Init sequence corrected Chapter Working with J Flash renamed to Create a new J Flash project Chapter Create a new J Flash project Chapter Settings SAS dape LAS E Scion sini ceannas updated Chapter Command Line Interface updated Section Create a new J FLash project updated
21. J Flash is also able to unsecure a read pro tected STM32 device Note Unsecuring a read protected device will cause a mass erase of the flash memory 7 6 2 2 Option byte programming J Flash supports programming of the option bytes for STM32 devices In order to program the option bytes simply choose the appropriate Device which allows option byte programming in the CPU settings tab e g STM32F103ZE allow opt bytes J Flash will allow programming a virtual 16 byte sector at address J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 70 CHAPTER 7 Device specifics 0x06000000 which represents the 8 option bytes and their complements You do not have to care about the option bytes complements since they are computated auto matically The following table describes the structure of the option bytes sector Address 31 24 23 16 15 8 7 0 0x06000000 complement Option byte 1 complement Option byte O 0x06000004 complement Option byte 3 complement Option byte 2 0x06000008 complement Option byte 5 complement Option byte 4 0x0600000C complement Option byte 7 complement Option byte 6 Table 7 1 Option bytes sector description Note Writing a value of OxFF inside option byte O will read protect the STM32 In order to keep the device unprotected you have to write the key value OxA5 into option byte 0 Note originally located at address OxiFFFF800
22. ML67Q4050 with internal flash memory ML67Q4051 jflash OKI ML67Q4051 with internal flash memory ML67Q4060 jf lash OKI ML67Q4060 with internal flash memory ML6704061 jflash OKI ML67Q4061 with internal flash memory Digi ConnectCore7U with NetSilicon NS7520 and external Fujitsu MBM29LV650U flash Digi ConnectCore7U with NetSilicon NS7520 and external AMD Am29LV160BB flash NS7520_CC7U_355_16bitSDRAM j NetSilicon NS7520 with external EN29LV800BT NS7520_CC7U_352 jflash NS7520_CC7U_355 jflash flash flash ee ee E NetSilicon NS9210 with external flash NS9215_CC9P jflash NetSilicon NS9215 with external flash NetSilicon NS9360 with external AM29LV160DB flash 2 chips NetSilicon NS9750 with Atmel AT49BV322A flash NS9360 jflash NS9750 jflash memory PCF87750 jflash NXP PCF87750 with internal flash memory Q32M210 jflash ON Semi Q32M210 with internal flash memory RM48L9x j lash Texas Instruments RM48L9x with internal flash memory RX600 jflash Renesas R5F56108 with internal flash memory Table 3 2 List of sample J Flash projects J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 27 Project Description S3F441FX jflash Samsung S3F441FX with internal flash memory S3F445HX jflash Samsung S3F445HX with internal flash memory S3FN21x jflash Samsung S3FN21x with internal flash memory S3FN41F
23. The Ox1FFFF800 is done automatically by J Flash Example The address 0x06000000 is a virtual address only The option bytes are remap from 0x06000000 to To program the option bytes 2 and 3 with the values OxAA and OxBB but leave the device unprotected your option byte sector at addr 0x06000000 should look like as follows Address 31 24 23 16 15 8 7 0 0x06000000 0x00 OxFF Ox5A OXA5 0x06000004 0x44 OxBB 0x55 OXAA 0x06000008 0x00 OxFF 0x00 OxFF 0x0600000C 0x00 OxFF 0x00 OxFF Table 7 2 Option bytes programming example For a detailed description of each option byte please refer to ST programming man ual PM0042 section Option byte description 7 6 3 STM32F2 series devices option byte programming Please refer to STM32F4 series devices option byte programming on page 70 7 6 4 STM32F4 series devices option byte programming J Flash User Guide UMO8003 The STM32F2 series devices provide some option bytes which allow some perma nent configuration as well as readout protection for the device Unfortunately the option bytes become effective immediately when programmed This means when enabling the read protection of the device via option bytes the programmer will immediately lose the access to the flash without any possibility to verify the com plete flash operation Therefore the option bytes cannot be programmed as part of the flash image 2004 2015 SEGGER Microco
24. UMO8003 25 06 2012 19 34 JFLASH File Text Document J Flash creates the lt JFlashProject 3KB 1KB 2 KB O 2004 2015 SEGGER Microcontroller GmbH amp Co KG 63 Chapter 7 Device specifics This chapter gives some additional information about specific devices J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 64 CHAPTER 7 Device specifics 7 1 Analog Devices J Flash supports flash programming for the Analog Devices ADuC7xxx core family 7 1 1 ADuC7xxx J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 65 7 2 ATMEL J Flash supports flash programming for the ATMEL AT91SAM7 core family 7 2 1 AT91SAM7 J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming 7 2 2 AT91SAM9 J Flash includes ready to use projects for all
25. bus interface to program the external flash since in a lot of cases it allows per default just reading of flash memory e Last but not least you should make sure the JTAG speed is as high as possible on ARM S cores with RTCK Adaptive is usually a good choice if not 8Mhz or 12MHz is ideal However this should be the last step Note Initialization of the PLL and the external bus interface has to be done in the init sequence of the project In the following all the necessary steps to create a project file are explained 1 2 Select File gt New Project to open a new project Open the Project Settings context menu Select Options gt Project Settings or press ALT F7 to open the Project settings dialog and select the type of con nection to J Link Project settings e USE Deviceo y C USB SN Select se E E Select Engineering More options typically used for setup J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 55 3 Define the JTAG speed before init and the JTAG speed after init The default settings work without any problem for the most targets Since software version 3 80 J Flash supports SWD To select SWD as target inter face simply select SWD from the dropdown box and define the SWD speed before init and the SWD speed after init Project settings TDI dd Insert Delete Edit Up Down 4 Open the CPU dialog and select the core architecture in the Co
26. jflash Samsung S3FN41F with internal flash memory S3FN60D jflash Samsung S3FN60D with internal flash memory SJA2010HL jflash NXP SJA2010 with internal flash memory SJA2510HL jflash NXP SJA2510 with internal flash memory SocLitePlus jflash NEC System On Chip Lite with internal memory SPC560B50 jflash ST SPC560B50 with internal flash memory SPC560P50 jflash ST SPC560P50 with internal flash memory STM32F103RB jflash ST STM32F103RB with internal flash memory STM32F103ZE_ST_MB672_CF1_1x1 6 jflash ST STM32F103RB with external 1x16 flash mem ory SIM32F217ZG jflash ST STM32F217ZG with internal flash memory STM32F303VC jflash ST STM32F303VC with internal flash memory STM32F4071G jflash ST STM32F4071G with internal flash memory STM32L152VB jflash ST STM32L152VB with internal flash memory STM32L152VB_ProgUserOptionBy te jflash ST STM32L152VB with internal flash memory STM32L152ZD jflash ST STM32L152ZD with internal flash memory STR710 jflash ST STR710FZ2T6 with internal flash memory STR711 jflash ST STR711FR2T6 with internal flash memory STR712 jflash ST STR712FR2T6 with internal flash memory STR730 jflash ST STR730FZ2 with internal flash memory STR750 jflash ST STR750FV2 with internal flash memory STR912 jflash ST STR912FM44 with internal flash memory
27. more information regarding the operation of J Link and J Link TCP IP Server Project settings Since J Flash version 3 74 can the complexity of user interface be selected Select the Engineering checkbox if you want to setup your project or the Simplified checkbox if you use J Flash in production environments In the simplified user interface are some options disabled to decrease possible error sources in the production phase J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 35 4 1 1 1 USB If this option is checked J Flash will connect to J Link over the USB port You may change the device number if you want to connect more than one J Link to your PC The default device number is 0 For more information about how to use multiple J Links on one PC please see also the chapter Working with J Link of the J Link User s Guide 4 1 1 2 TCP IP If this option is checked J Flash will connect to J Link via J Link TCP IP Server You have to specify the hostname of the remote system running the J Link TCP IP Server J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 36 CHAPTER 4 Settings 4 1 2 JTAG Settings This dialog is used to configure the JTAG connection You may change the JTAG speed or configure a JTAG scan chain with multiple devices Project settings 4 1 2 1 JTAG Speed You can configure the JTAG speed used before and after initialization The
28. order prevent users to lock their devices by chance One which allows programming those areas and the shadow area as well The second configuration is marked by the extension allow shadow Programming the shadow area First the SPC560xx allow shadow device must be selected in order to be able to touch the shadow area Even when selecting the allow shadow variant the shadow area is not touched erased if not necessary data file does not contain data in the shadow area When performing chip erase J Flash reads back the censorship regis ters erase the shadow flash and reprogram the censorship registers in order to guarantee that the device will not be locked In case the data image contains data in the shadow area J Flash erases the entire shadow area block and program it with the data from the user data image In this case J Flash does not restore the censorship registers as it assumes that touching the area is done on purpose So when programming the shadow area make sure to program the censorship regis ters with correct values in case of doubt reset values as well in order to ensure that the device will not be locked When programming the shadow area the image must contain data for the entire area even if the data to be programmed are OxFF 7 6 2 STM32F10x 7 6 2 1 Securing Unsecuring the chip The Secure Chip option is available for the STM32 devices It will read protect the internal flash memory of the STM32
29. project This makes sure that the pre con figured example projects delivered with J Flash can not be accidentially overwrit ten Create new project Creates a blank empty project with J Flash default set tings is checked J Flash will open the last recently used project on future starts without showing the startup dialog again J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 29 3 4 Menu structure The main window of J Flash contains seven drop down menus File Edit View Target Options Window Help Any option within these drop down menus that is followed by a three period ellipsis is an option that requires more information before proceeding J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 30 File menu elements CHAPTER 3 Getting Started Command Description Opens a data file that may be used to flash the target Open device The data file must be an Intel HEX file a Motorola S file or a Binary file hex mot srec Or bin Merges two data files hex mot srec Or bin All gaps will be filled with FF Find below a short example of merging two data files named FileO bin and File1 bin into File3 bin FileO bin gt Addr 0x0200 Ox02FF File1 bin gt Addr 0x1000 Ox13FF Merge Merge File0 bin amp File1 bin 0x0200 Ox02FF Data of FileO bin 0x0300 OxOFFF gap will be filled with OxFF if image is sa
30. soft lock it can easily be unlocked using the soft unlock feature The hard lock and hard unlock work on a hardware only basis If a sec tor is locked using the hard lock command it can only be unlocked through hardware support For example some flash devices have a special PIN that must be set high or low to allow an unlock command Secure chip Secures the MCU Unsecure chip Unsecures the MCU Check blank Checks flash to see if it is empty Fill with zero Fills all selected flash sectors with zero Some flash chips need this before erasing them Erase sectors Erases all selected flash sectors Erase chip Erases the entire chip Program Programs the chip using the currently active data file Program amp Verify Programs the chip using the currently active data file and then verifies that it was written successfully The Auto command performs a sequence of steps It con nects to the device erases sectors and programs the chip using the currently active data file before the written Auto data is finally verified The range of sectors to be erased can be configured through the Flash tab of the Project settings dialog and through the Global settings dialog See chapter Settings on page 33 for further details Verify Verifies the data found on the chip with the data file Table 3 6 Target menu elements J Flash User Guide UM08003 2004 2015 SEGGER Microco
31. to the J Link J Trace user guide for an detailed explanation of the differ ent reset types Read 8bit Address Hex Reads 8bit from a given address and stores the value in an inter nal variable Read 16bit Address Hex Reads 16bit from a given address and stores the value in an inter nal variable Read 32bit Address Hex Reads 32bit from a given address and stores the value in an inter nal variable SetAllowRemo teRead On Off This option defines if the emula tor remote or the host handles the read access to target This option is activated by default to enhance the performance SetAllowRemote Write On Off This option defines if the emula tor remote or the host handles the write access to target This option is activated by default to enhance the performance Table 4 1 J Flash init sequence commands J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 40 4 1 3 8 Exit steps J Flash User Guide UMO8003 CHAPTER 4 Settings Command Value0 Valuel Description Verify 8bit Address Hex Data Verifies whether 8bit data on a declared address is identical to the declared 8bit data Verify 16bit Address Hex Data Hex Verifies whether 16bit data on a declared address is identical to the declared 16bit data Verify 32bit Address Hex Data Hex Verifies whe
32. www segger com supported flash devices html J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 79 Chapter 9 Performance The following chapter lists programming performance of common flash devices and microcontrollers J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 80 9 1 CHAPTER 9 Performance Performance of MCUs with internal flash memory The following table lists program and erase performance values for different control lers Size Program Program Erase Erase Microcontroller kByte time speed Time speed sec KB sec sec kB sec Analog Devices De 000 62 2 234 27 752 3 031 20 455 Atmel AT91SAM7S64 64 3 235 19 783 Not required Atmel AT91SAM7S256 256 6 734 38 016 Not required NXP LPC2148 500 3 953 126 486 12 312 40 610 NXP LPC2138 500 3 906 128 008 12 312 40 610 NXP LPC2129 V1 248 1 828 135 667 7 812 31 746 NXP LPC2106 120 0 948 126 582 6 875 17 454 NXP LPC2129 V2 248 1 797 138 007 7 750 32 000 NXP LPC2294 248 1 875 132 266 7 812 31 746 ST STR711 272 4 890 55 623 9 703 28 032 ST STR912 512 7 000 73 142 9 375 54 613 TI TMS470R1B1M 1024 10 953 93 490 18 359 55 776 Table 9 1 List of performance values of MCUs with internal flash J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 81 9 2 Performance of MCUs with external flash memory
33. 00F 1220F 16 AMD Am23DL400BT 512 KB 14 1000 12200 16 AMD Am23DL800BB 1024 KB 22 100CB 122CB 16 AMD Am23DL800BT 1024 KB 22 10044 12244 16 AMD Am29D 323DB 4096 KB 71 10088 12288 16 4 1 4 4 ID checking There are two other check boxes that are of interest in this subsection which are Check manufacturer flash Id and Check product flash Id These check boxes should be selected to confirm the type of device that is in communication with J Flash 4 1 4 5 Sector selection The final section of this dialog indicates the sectors to be acted upon whether they are to be cleared read back or written An individual or series of sectors may be selected from the predetermined valid range J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 4 1 5 Production settings General Target Interface CPU Flash Production 7 Production mode Voltage threshold 3000 mv Delay before start 500 ms Av Enable target power Delay before start 20 ms m Program serial number Address 00000000 Next SN fi Actions performed by Auto FN Program TT Secure chip J Start application IV Erase Sectors if not blank La M Verity Enable target power Enables 5V target power supply via pin 19 of the emulator 43 Can be used for targets which can be powered through the emulator for production Delay before start defines the delay in ms after enabling the ta
34. 3 OAI U BSTE 1e ERP A A A A A MN eyes 37 4 1 3 1 COG saine ee AA 38 4 1 3 2 DEVICE E nistedas aveds neve dewewccda ni ety eluie ni en a bla ein ann nee On ed aus mena 38 4 1 3 3 A vaes vite kea ese ivdanwanviievaa nce va ewes N 38 4 1 3 4 ENdianes Sie lata a a Sonate n e sms aAa 38 4 1 3 5 Check core Diss evidence A et easter vine ni bn da 38 4 1 3 6 Use target RAM usines diner diametre A NAARAS 39 4 1 3 7 MESA ia 39 4 1 3 8 EXIT STEDS oi A A A A a ee dees 40 4 1 4 Flash Setting viii ti 41 4 1 4 1 Base ATEOS Sisi a tE dan Weer AAA aid 41 4 1 4 2 Organization 5 er dar ENARA NA EEEIEE NINENA A INERENTI ne dela bev ane 41 4 1 4 3 Select flash devices seeds ses MR ea Peter sta elves otre 42 4 1 4 4 ID GhECkING rues ARR A A ren dees en dos 42 4 1 4 5 Sector selection A vec A need ar AAA AAA 42 4 1 5 Production s ttingS rss ennemi net eek nea ier aad denen mdr base ee le 43 4 2 Global Setting Sirkasi ta a tn time ral 45 4 2 1 Op ratlon ssissssenss icone animer inner Sense 45 4 2 1 1 Disconnect after each operation sisi 45 J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 4 2 1 2 Automatically unlock sectors sisi 45 4 2 1 3 Perform blank checa ininig anne anni te dawn dedi eaters 45 4 2 1 4 Skipsblank areas ON Feats xs nsc mienne ere A A a RE 45 4 2 2 LA is 45 4 2 2 1 G n ral 10g level xico e eats oa OA a DA entente 45 4 2 2 2 Enable J Link logtile iia aa oe pele is AE A 46 5 Comm
35. 6 Rev 0 150109 EL Chapter Device specifics Section ST updated Section Freescale updated 4 82 Rev 0 140307 AG Chapter Device specifics Section ST updated 4 80 Rev 0 131220 AG Chapter Command Line Interface Section Command line options updated 4 73c 130703 JL Chapter Getting Started Added Section Start Dialog 4 66 Rev 1 130320 EL Chapter Settings Section CPU Settings Added description for the core ID Mask field 4 66 Rev 0 130221 JL Chapter Introduction Section What is J Flash Added Linux and Mac OSX 4 58 Rev 0 121113 JL Chapter Command Line Interface Section Batch processing updated Section Command line options updated 4 52 Rev 0 120807 EL Chapter Getting Started Section Menu structure updated Chapter Settings Section CPU Settings updated Chapter Command Line Interface Section Programming multiple targets in parallel added Chapter Getting Started Section Sample Projects updated 4 51i Rev O 120724 EL Chapter Create a new J Flash project Section Configuration for serial number programming added 4 42b Rev 0 120217 AG Chapter Background information Section CRC of current data file added 4 24 Rev 0 110216 AG Chapter Target systems updated 4 16 Rev 1 100817 AG Chapter Command Line
36. 7 6 6 STR 73x J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 72 CHAPTER 7 Device specifics 7 6 7 STR 75x J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming 7 6 8 STR91x J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 73 7 7 Texas Instruments J Flash supports flash programming for the TI TMS470 core family 7 7 1 TMS470 J Flash includes ready to use projects for all supported devices For a c
37. AM9G20 data flash AT91SAM9G45 eval board with external CFI 2x8 AT91SAM9G45_CFI_2x8 jflash flash memory aTa O Be E AT91SAM9XE EK eval board with SAM9XE512 EK jflash AyDeeKay_Chaveiro jflash AyDeeKay Chaveiro with internal flash memory AyDeeKay_HeimdallSlave jflas AyDeeKay HeimdallSlave with internal flash h memory AyDeeKay_KamCho jflash AyDeeKay KamCho with internal flash memory AyDeeKay_uSesame jflash AyDeeKay uSesame with internal flash memory AyDeeKay_uSobek jflash AyDeeKay uSobek with internal flash memory DA56KLF jflash DSPGroup DA56KLF with internal flash memory Dragonbal1MX1 jflash DragonballMXi eval board with ST M29W400BB EFM32G890F128 jflash Energy Micro EFM32G890F128 with internal flash memory Ember_EM357 jflash Ember EM357 with internal flash memory ee ee Evaluator7T eval board with SST39LF VF400A Evaluator7T jflash flash memory GlynGraphicBaseBoard_TMPA900 Glyn Graphic BaseBoard TMPA900 with external jflash flash memory iMX27 jflash Freescale MX27 with internal flash memory Itron_TRIFECTA jflash Itron TRIFECTA with internal flash memory LH75411 jflash Sharp LH75411 with Macronix MX29LV320AB flash memory 1579520 LogicPD j lash ne LH79520 with Intel 28F640J3 flash mem LH79524 LogicPD j lash Sharp LH79524 with Sharp LH28F128SPHTD flash memory L
38. Chapter Targets Rouet OSOSLE AG Section pute Microcontrollers updated Chapter Licensing 3 80 Rev 2 080408 AG Section Introduction added Section License types added Chapter Target systems Section Supported Microcontrollers updated 3 80 Rev 1 080311 AG Chapter Working with J Flash Section Create a new J Flash project updated Chapter Device specifics added 3 80 Rev 0 080206 SK Chapter Target systems Section supported MCUs updated Chapter Installation updated Chapter Command Line Interface de 070908 els j Section Batch processing added Various improvements Chapter Target systems updated BOO REV 9042 SK bio Gstiha ei pected 3 46 Rev 4 061222 SK Section About and company description added 3 46 Rev 3 061124 00 Chapter Performance updated 3 46 Rev 2 061121 OO Chapter Performance updated 3 46 Rev 1 060929 TQ Update supported target devices 3 42 Rev 1 060912 TQ Update supported target devices 3 36 Rev 1 060801 TQ Update supported target devices 3 24 Rev 1 060530 TQ Update supported target devices 3 00 Rev 2 060116 OO Screenshots updated 3 00 Rev 1 060112 TQ Nothing changed Just a new software version 2 14 051025 TQ Update supported target devices 2 10 050926 ITW Added troubleshooting section 2 04 050819 TQ Nothing changed Just a new software version 2 02 050808 ITW Command line added 2 00 050707 TW Initial Version Ta
39. H7A40x_LogicPD jflash Sharp LH7A40x with Intel 28F640J3 flash mem ory 2 chips LM3S811 jflash Luminary LMS811 with internal flash memory LM4F232H5 jflash Luminary LM4F232H5 with internal flash memory LPC1113 jflash NXP LPC1113 with internal flash memory PC11A_EEPROM jflash NXP LPC11A with external EEPROM PC1343 jflash NXP LPC1343 with internal flash memory PC1768 jflash NXP LPC1768 with internal flash memory PC1788_EmbeddedArtistsDevKi NXP LPC1788 with external CFI 1x16 flash mem t_CFI_1x16 jflash ory PC1857 jflash NXP LPC2103 with internal flash memory PC2103 jflash NXP LPC2103 with internal flash memory PC2106 jflash NXP LPC2106 with internal flash memory PC2129 MCB2100 jflash Keil MCB2100 eval board with NXP LPC2129 PC2138 jflash NXP LPC2138 with internal flash memory LPC2148 jflash NXP LPC2148 with internal flash memory LPC2210 jflash NXP LPC2210 with internal flash memory LPC2290 jflash NXP LPC2290 with internal flash memory LPC2294 jflash NXP LPC2294 with internal flash memory Table 3 2 List of sample J Flash projects J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 26 CHAPTER 3 Getting Started Project Description LPC2294 CFI 1x16 jflash Le LPC2294 with external 1x16 CFI fl
40. J Flash User guide of the stand alone flash programming software Software Version 5 10 Manual Rev 0 Date November 27 2015 Document UM08003 gt SEGGER A product of SEGGER Microcontroller GmbH amp Co KG www segger com Disclaimer Specifications written in this document are believed to be accurate but are not guar anteed to be entirely free of error The information in this manual is subject to change for functional or performance improvements without notice Please make sure your manual is the latest edition While the information herein is assumed to be accurate SEGGER Microcontroller GmbH amp Co KG the manufacturer assumes no responsibility for any errors or omissions The manufacturer makes and you receive no warranties or conditions express implied statutory or in any communication with you The manufacturer specifically disclaims any implied warranty of merchantability or fitness for a particular purpose Copyright notice You may not extract portions of this manual or modify the PDF file in any way without the prior written permission of the manufacturer The software described in this doc ument is furnished under a license and may only be used or copied in accordance with the terms of such a license O 2015 SEGGER Microcontroller GmbH Co KG Hilden Germany Trademarks Names mentioned in this manual may be trademarks of their respective companies Brand and product names are trademarks or
41. JTAG speed before init is used to communicate with the target before and during execution of the custom initialization sequence described in section CPU Settings on page 37 The JTAG speed after init is used to communicate after executing the custom initialization sequence This is useful if you have a target running at slow speed and you want to set up a PLL in the initialization sequence You can choose between automatic speed recognition adaptive clocking or fixed JTAG speed If you choose fixed JTAG speed you can select any value between 1kHz and 12MHz For more information about the different types of JTAG speed please see the chapter Setup of the J Link User s Guide J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 37 4 1 2 2 JTAG scan chain with multiple devices This checkbox allows you to configure a JTAG scan chain with multiple devices on it In a scan chain configuration with multiple devices the TCK and TMS lines of all JTAG device are connected while the TDI and TDO lines form a ring Toi Device1 too to Device O TDO The position of the device to connect with J Flash is selected from the Position drop down menu The Instruction Register length IRLen of a device is defined by its manufacturer For ARM cores the IRLen is always four which is why the value of IRLen is by default set to four times the position indicated This works fine for ARM only scan chains However if any non
42. RM 3 66a C Program FilesiSEGGERYLinkARM_Y2366a1D efault flash File Edit View Target Options Window Help at Project Default Connection Init JTAG speed JTAG speed TAP number IR len CPU Endian Check core Id Core Id Use target RAM RAM address RAM size Flash memory Base address Organization 7 LOG FIASH USB Device 0 10 kHz Auto recognition lt not used gt lt not used gt ARM7 ARM9 Little No 0x0 No 0x0 4KB CFI compliant 0x0 16 bits x 1 chip Application log started J Flash ARM V3 66a J Flash compiled Mar 19 2007 18 02 31 JLinkARM dllY3 66a DLL compiled Mar 19 2007 18 02 00 Reading flash device list C Program Files SEGGER JLinkARM_V366a ETC Flash Flash csv List of flash devices read successfully 401 Devices Reading MCU device list C Program Files SEGGER JLinkARM_V366a E TC Flash MCU csv List of MCU devices read successfully 136 Devices Opening project file C Program Files SEGGER WLinkARM_V366a D efault jflash Project opened successfully J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 24 3 2 1 Sample Projects CHAPTER 3 Getting Started If you are new to J Flash it might be a good idea to open one of our sample projects to familiarize yourself with the application You find those project files in the Projects subdirectory of J Flash s installation directory Once you have opened a proje
43. SEGGER Microcontroller GmbH amp Co KG 52 CHAPTER 5 Command Line Interface 5 4 Programming multiple targets in parallel In order to program multiple targets in parallel using J Flash the following is needed e J Link Flasher needs to be configured to allow to connect multiple ones to one PC at the same time Please refer to UMO8001 Working with J Link and J Trace gt Connecting multiple J Links J Traces to your PC e One J Flash project containing the configuration Basically J Flash connects to a specific J Link configured in the project settings but there is a command line option available which allows to temporary override this setting Therefore only one J Flash project is needed Find below a small sample which shows how to program multiple targets in parallel ECHO OFF setlocal set lock temp wait random lock ECHO Launches 3 processes in parallel where each process calls J Flash with different serial number as connection method The stream of each process is redirected to a lock file so we can wait until each process has been completed start 9 gt lock 1 StartJFlash bat 164000000 start 9 gt lock 2 StartJFlash bat 164000001 start 9 gt lock 3 StartJFlash bat 164000002 REM Wait until lock files are released and delete them afterwards 1 gt nul 2 gt nul ping n 3 1 for N in 1 2 3 do call 9 gt lock3 3N goto Wait 2 gt nul del lock pause StartFlas
44. a g AAAA A ETEA A Ea EES 69 7 6 3 STM32F2 series devices option byte programming 70 7 6 4 STM32F4 series devices option byte programming 70 7 6 5 STIR 71 SR eleven ieee aw ie vaeev tie va ae eta eee eee 71 7 6 6 STR 73 X de eee a es ewer nn ads aa Des nt sos ae 71 7 6 7 STR TIA A ocean el et Gien 72 7 6 8 STRO KES A A AE A AAA A M EE EEE US 72 7 7 TeXas 1nstrUumMments i ressens ne nan elon nau er eed chases dede ne ne tre De 73 7 7 1 TMSIT Disc ed i nn A en es de AA nn ives enr ee ee ties 73 0 Targel SYSICING usais iio ein 75 8 1 Which devices can be programmed by J FlaSh ssssssssssssssssssssrrrrrrrrrrsrrsssss 76 8 2 Supported microcontrollers sees cece scence eee eee HESS ESSE SEES nr rr 77 8 3 Supported Flash Devices iii SEES SHEE SES EES HESS EE EES 78 o A A nuit ie 79 9 1 Performance of MCUs with internal flash Memory cceeeeeceeee eee eeeeeeeeeeeeaeeaas 80 9 2 Performance of MCUs with external flash memory 81 J Flash User Guide UMO8003 O 2004 2015 SEGGER Microcontroller GmbH 8 Co KG 10 Background TON MATON ois ste ner ista 83 10 1 CRE of current data file uses eu en ial Pea ed ATG Ne RO RUES 84 ARES CR Gee cated E EENE 85 11 1 Troubl shooting ss tas A AA Ne an cee 86 11 1 1 General procedure 2352288008 nor ore E A A Re 86 11 1 2 Typical problems sandra nn nn iaa 86 11 2 Contacting SUpPOrts asurer rir pirado airiai reana ere end tn n nie de rm ne ts nie der ads 88 J Flash User Guide UMO8003
45. alog which is displayed if you start J Flash in a console window with JFlash exe help or JFlash exe Commandline O J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 49 5 2 Command line options This section lists and describes all available command line options Some options accept additional parameters which are enclosed in angle brackets e g lt FILE NAME gt If these parameters are optional they are enclosed in square brackets too e g lt SADDR gt Neither the angel nor the square brackets must be typed on the command line they are used here only to denote optional parameters Also note that a parameter must follow immediately after the option e g JFlash exe openprjC Projects Default jflash The command line options are evaluated in the order as they are passed to J Flash so please ensure that a project data file have already been opened when evaluat ing a command line option which requires this It is recommended to always use open lt FILENAME gt lt SADDR gt to make sure the right data file is opened All command line options return 0 if the processing was successfully An return value unequal 0 means that an error occured Option Description Display help dialog auto Erase program and verify target checkblank Blank check target connect Connect to target delrange lt SADDR gt lt EADDR gt Delete
46. amming algorithm available for the selected target memory type Remedy Inform us about the flash type you want to use SEGGER is constantly adding support for new flash memory devices J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 88 CHAPTER 11 Support 11 2 Contacting support If you experience a J Flash related problem and the advices from the sections above do not help you to solve it you may contact our J Flash support In this case please provide us with the following information A detailed description of the problem The relevant log file and project file In order to generate an expressive log file set the log level to All messages see section Global Settings on page 45 for information about changing the log level in J Flash The relevant data file as a hex or mot file if possible The processor and flash types used Once we received this information we will try our best to solve the problem for you Our contact address is as follows SEGGER Microcontroller GmbH amp Co KG In den Weiden 11 D 40721 Hilden Germany Tel 49 2103 2878 0 Fax 49 2103 2878 28 Email support segger com Internet http www segger com J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 89 Index F Flash supported interfacing types 76 J DINK ee 14 IAG Oo cae A Nea 14 36 M Menu structure US 29 Microcontrollers
47. and Line Interface Anne RS AL nubiles Catone a 47 5 1 OVErVISW nes dans din es Sage uve Revere ne age ne m nr evens dla dal met Ada 48 5 2 Command line options sde rr rr rr 49 5 3 Batch PrOCeSSING issues ci e mnt annee ee entend 51 5 4 Programming multiple targets in parallel oooooccoconccnconcnnnncnnnnnnnncnnnnann ron 52 6 Create a new J Flash project es 53 6 1 Creating a new J Flash project zur arret an a 54 6 2 Creating a new init sequence 2 eee cece eee eee 58 6 2 1 Example init sequence ii A A vba iva ead ete A Et 58 6 3 Serial number programming 4 eee eee eee ene ene 59 6 3 1 Serial n mbe r Setting Saison AA AA RA 59 6 3 2 Serial number li A A edi 60 6 3 3 Serial UMD RISE Al iii A AR AAA AAA AAA 60 6 3 4 Programming PROCESS a 61 6 3 5 Sample RU ER en TEE nee AR oe 7 te ee es Geert 61 1 Device SINS CICS es SES a A SE Ne a 63 7 1 Analog DEVICES Siren sise teen pena nantly ped teen tete tent e genie ad ile 64 7 1 1 ADUCI XXX A eet aS eee 64 7 2 ATME Lt A AAA cede acer A A Aa 65 7 2 1 ATOLSAMZ A a Aci 65 7 2 2 ATITSAMO iia lan ide nes AAA Aa aid 65 7 3 A A E A ANE 66 7 3 1 MELILLA AA S RE A A AA AT Se ie Mare 66 7 3 2 MP io 66 7 4 NXP rd A a 67 7 4 1 LPE 2NI Sis 67 7 5 OK Ra A AA cats AAA 68 7 5 1 A A OS 68 7 6 ST Microelectronics cui a E E a ia 69 7 6 1 O 69 7 6 2 STMIZELOX AA A A A a et RS ere 69 7 6 2 1 Securing Unsecuring the chip sise 69 7 6 2 2 Option byte programming ssrin aaae anei
48. aning The flash memory sector may be locked and programming or erasing the respective memory section fails therefore Remedy Make sure the memory sector is unlocked before programming or erasing J Flash provides a dedicated menu item for unlocking flash memory Timeout errors during programming Meaning A timeout occurs if the target is too slow during DCC communication or the target flash memory is too slow during programming Remedy Using smaller RAM block sizes may fix this problem Blank check failed Meaning The target memory was not empty during blank check Remedy Erase target memory J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 87 RAM check failed Meaning No RAM found at the specified RAM location Remedy Make sure a correct RAM address is specified in the project settings See section CPU Settings on page 37 Unexpected core ID Meaning The specified CPU core ID does not match with the one read from the target CPU Remedy Ensure the specified core ID is correct for the used target CPU See section CPU Set tings on page 37 for information about setting the core ID Unsupported flash type bus width Meaning The target flash memory or the bus organization is not yet supported Remedy Inform us about the flash type you want to use SEGGER is constantly adding support for new flash memory devices No matching RAMCode Meaning There is no progr
49. ash mem 1PC2294 CFI 2x16 jflash a LPC2294 with external 2x16 CFI flash mem LPC2294 PhyCORE jflash NXP LPC2294 with external Am29DL800BT flash memory LPC2366 jflash NXP LPC2366 with internal flash memory LPC2378 jflash NXP LPC2378 with internal flash memory LPC2478 1x16 CFT jflash a LPC2478 with external 1x16 CFI flash mem LPC2478_EmbeddedArtists_1x16 Embedded Artists eval board with NXP LPC2478 _CFI jflash LPC2888_NXP_Nohau jflash NXP Nohau eval board with NXP LPC2888 PC2919_Hitex_LPC2919 jflash Hitex eval board with LPC2919 PC2919_MCB2900 jflash Keil MCB2900 eval board with NXP LPC2919 LPC4088 jflash NXP LPC4088 with internal flash memory DA TE IAE IR ie STK Olimex eval board with NXP LPC2378 flash MAC7111 j lash ne MAC7111LC eval board with internal MB86R03 jflash Fujitsu MB86R03 with internal flash memory MB9xFxxx jflash Fujitsu MB9xFxxx with internal flash memory MC13224V_internalSPI jflash MC13224V with internal SPI flash MK20DX128xxx5 jflash OKI MK20DX128xxx5 with internal flash memory MK21DN512xxx5 jflash OKI MK21DN512xxx5 with internal flash memory MK60N512 jflash OKI MK60N512 with internal flash memory MK70FN1M0 jflash OKI MK7OFN1iMO with internal flash memory MKL252Z128xxx4 jflash OKI MKL25Z128xxx4 with internal flash memory ML67Q4002 jflash OKI ML67Q4002 with internal flash memory ML67Q4003 jflash OKI ML67Q4003 with internal flash memory ML67Q4050 jflash OKI
50. ble List of manual versions Software versions Refers to Release html for information about the changes of the software versions J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG About this document Assumptions This document assumes that you already have a solid knowledge of the following e The software tools used for building your application assembler linker C com piler e The C programming language e The target processor e DOS command line If you feel that your knowledge of C is not sufficient we recommend The C Program ming Language by Kernighan and Richie ISBN 0 13 1103628 which describes the standard in C programming and in newer editions also covers the ANSI C standard How to use this manual This manual explains all the functions that J Flash offers It assumes you have a working knowledge of the C language Knowledge of assembly programming is not required Typographic conventions for syntax This manual uses the following typographic conventions Style Used for Body Body text Kermo Text that you enter at the command prompt or that appears on the display that is system functions file or pathnames Parameter Parameters in API functions Sample Sample code in program examples Reference Reference to chapters tables and figures or other documents GUIElement Buttons dialog boxes menu names menu commands Emphasis Very impo
51. ch are explained below Built in License This type of license is easiest to use The customer does not need to deal with a license key The software automatically finds out that the connected J Link contains the built in license s This is the type of license you get if you order J Link and the license at the same time typically in a bundle Key based license This type of license is used if you already have a J Link but want to enhance its func tionality by using J Flash In addition to that the key based license is used for trial licenses To enable this type of license you need to obtain a license key from SEG GER Free trial licenses are available upon request from www segger com This license key has to be added to the J Flash license management How to enter a license key is described in detail in section Key based license on page 18 Every license can be used on different PCs but only with the J Link the license is for This means that if you want to use J Flash with other J Links every J Link needs a license 2 2 1 Built in license This type of license is easiest to use The customer does not need to deal with a license key The software automatically finds out that the connected J Link contains the built in license s To check what licenses the used J Link have simply open the J Link commander JLink exe The J Link commander finds and lists all of the J Link s licenses automatically as can be seen in the screenshot below
52. ct file the project window contains the relevant project settings e g chip type clock speed RAM size etc The settings devices You may then continue to device The table below contains are known to be good defaults for the respective open your own data files to actually program your the included project files together with a short description Project Description ADuC7020 jflash Analog Devices ADuC7020 with internal flash memory ADuC7030 jflash Analog Devices ADuC7030 with internal flash memory ADuC7032 jflash Analog Devices ADuC7032 with internal flash memory ADUC7038 jflash Analog Devices ADuC7038 with internal flash memory ADuC7039 jflash Analog Devices ADuC7039 with internal flash memory ADuC7060 jflash Analog Devices ADuC7069 with internal flash memory ADUC7124 jflash Analog Devices ADuC7124 with internal flash memory ADUC7229 jflash Analog Devices ADuC7229 with internal flash memory AM3505_CFI jflash Texas Instrument AM3505 with internal flash memory AT91CAP9 jflash Atmel AT91CAP9 with external flash memory AT91FR40162 j lash AT91FR40162 with internal AT49BV1614A flash memory AT91M42800A 4j lash AT91M42800A with internal M29W200BB flash memory AT91M55800A jflash AT91M55800 with Am29LV320DT flash memory AT91R40008_AT91EB40A 4 lash AT91R40008 with ex
53. data in the given range disconnect Disconnect from target download Downloads configuration to emulator eliminate Eliminate blank areas in data file erasechip Erase the entire flash chip erasesectors Erase selected sectors exit Exit J Flash hardlock Locks hard selected sectors hardunlock Unlocks hard selected sectors help Display help dialog Merges a given file with the one currently opened in J Flash merge lt FILENAME gt Note that when passing a bin file via this com mand also the start address where it shall be merged into the file currently openend in J Flash must be given since bin files do not contain any address information Open a data file Please note that the lt SADDR gt parameter applies only if the data file is a bin file Open an existing project file This will also merge lt FILENAME gt bin lt ADDR gt open lt FILENAME gt lt SADDR gt openprj lt FILENAME gt automatically open the data file that has been recently used with this project program Program target programverify Program and verify target readchip Read entire flash chip readsectors Read selected sectors readrange lt SADDR gt lt EADDR gt Read specified range of target memory relocate lt OFFSET gt Relocate data by the given offset save lt SADDR gt lt EADDR gt Save the current data file Please note that the parameters lt SADDR gt lt EADDR gt a
54. h bat ECHO OFFECHO Open a project and data file and exit start wait J Flash JFlash exe usb 1 connect exit IF ERRORLEVEL 1 goto ERROR g oto END ERROR ECHO SERRORLEVELS ECHO J Flash Error SN 1 pause exit END ECHO J Flash Succeed exit Note Each call of JFlash exe has to be completed with the exit option oth erwise the execution of the batch file is and the following commands will not be pro cessed J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 53 Chapter 6 Create a new J Flash project This chapter contains information about the required steps how to setup a new J Flash project J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 54 6 1 CHAPTER 6 Create a new J Flash project Creating a new J Flash project Before creating a new J Flash project you should have an understanding of your tar get system Take a look at the schematic and the documentation of your CPU SOC e Make sure the CPU runs at a decent speed at least a few MHz not just 32kHz e If necessary enable amp select a PLL as clock source e Locate RAM Ideally on chip RAM even if it is just a 4KB in the chip documenta tion e If necessary use external RAM usually SDRAM You may have to setup the external bus interface e If necessary use external FLASH You may also have to setup the external
55. ial NOR flash NAND flash and DataFlash devices a custom RAMCode is needed since the connection of the flash to the CPU differs from device to device J Flash comes with sample projects for custom RAMCodes For a complete list of all custom RAMCode projects which come with the J Flash software please refer to http www segger com supported devices html For more information about which which microcontrollers with internal flash are sup ported by J Flash please refer to Supported microcontrollers on page 77 SEGGER is constantly adding support for new devices If you need support for a chip or flash not listed in the tables do not hesitate to contact us J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 77 8 2 Supported microcontrollers J Flash supports download into the internal flash of a large number of microcontrol lers You can always find the latest list of supported devices on our website http www segger com supported devices html J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 78 CHAPTER 8 Target systems 8 3 Supported Flash Devices J Flash supports a large number of external parallel NOR flash devices In general every CFI compliant parallel NOR flash device is supported by J Flash For non CFI compliant ones J Flash allows the user to explicitly select the device You can always find the latest list of supported devices on our website http
56. ifics 7 5 OKI J Flash supports flash programming for the OKI ML67Q40x core family 7 5 1 ML67Q40x J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 69 7 6 ST Microelectronics J Flash supports flash programming for the ST Microelectronics STR71x STR73x STR75x STR91x PPC and the Cortex M3 core families 7 6 1 SPC560 J Flash supports flash programming of the internal code flash the shadow area and internal data flash for the ST SPC560 device family The internal code and data flash can be programmed without further attention Programming the shadow area must be done carefully as this flash area includes the censorship values which are used to configure the Censored mode Depending on the censorship value the debug logic can be disabled The erased state OxFF of all the volatile censored mode registers is the protected state So erasing but not pro gramming the censored mode registers will protect the device Therefore J Flash comes with two different device options for each device One which allows programming the internal code and data area only in
57. master clock and Ear Up DOT J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 59 6 3 Serial number programming J Flash supports programming of serial numbers In order to use the serial number programming feature the J Flash project to be used as well as some files in the working folder depending on the configuration need to be configured first In general J Flash supports two ways of programming a serial number into the tar get 1 Programming continuous serial numbers Serial number is 1 4 bytes in size Start serial number increment serial number size and address have to be configured in the J Flash project production settings 2 Programming custom serial numbers from a serial number list file Start line into serial number list file to get next serial number bytes line increment serial num ber sitze and address is configured in J Flash production project settings Serial number list file needs to be specified and created by user In the following some generic information how to setup a serial number program ming configuration are given 6 3 1 Serial number settings In order to use the serial number feature the J Flash project has to be configured to enable programming a serial number at a specific address This is done by enabling the Program serial number option as shown in the screenshot and table below Delay before start 20 ms Production mode
58. n and most standard device classes are sup ported Table 1 1 ES Q J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG Table of Contents 1 is A SR AA e Aas fa bin Al ud ata TR a r So eh abet 11 1 1 Whats last ses A A ee Pen ra Mendes 12 1 1 1 F AEUF S ESRI RE AMEL O anne Rene ee nent LA dan dont ane 12 1 2 ASSU MPEIONS sr a a A 13 1 3 REQUIREMENUS tii ere E E A 14 1 3 1 OS A A E e 14 1 3 2 WARGO te faeat eect hada at cna A ha te ccahetaus tage iha Ge Grains wan A saa es eens 14 2 LICENSING EE PR RE Nr nn er A A tele talece lee Seats 15 2 1 TNtrOdUCtON EE re A nn er naar aes 16 2 2 License EY PES Sacer hist a A 17 2 2 1 Built in liCenS i e serein iaa 17 2 2 2 Key based lis vite cis ccivadedsinctvanddvnnedvadieds e AR Dd AA eke ner den eee ees 18 2 2 2 1 The serial NUM Derio Ai 18 2 2 2 2 License MANAGEMENE dci A ts 18 o sise under etant 21 3 1 O GA Sas tn ste ant 22 3 1 1 What is included A AA En re 22 3 2 Using J Flash for the first time sisi 23 3 2 1 Sample Projects shine sas an nn nn cutie tee tee A 24 3 3 Start dial iia iii A A A IS A ds 28 3 4 Men USSEFUCTURG ne A A dr nd A AS A 29 4 SEUS e 33 4 1 Project SENOS ici a cedercemen 34 4 1 1 Gen fal S ttiNgs iii a den ae td ENA ae AA 34 4 1 1 1 A AO 35 4 1 2 A ON A ONE 36 4 1 2 1 JTAG PE it AA A A A lA 36 4 1 2 2 JTAG scan chain with multiple devices 00cooocccccccocnnnnnananannnnn ron nan rrrnrr rn rra 37 4 1
59. ntroller GmbH amp Co KG 32 CHAPTER 3 Getting Started Command Description VerifyCRC gt Verifies the CRC There are three ways in which the CRC can be verified Affected sectors verifies the CRC of the affected sec tors Selected sectors verifies the CRC of the selected sec tors Entire chip verifies the CRC of the entire chip Read back gt Reads back the data found on the chip and creates a new data file to store this information There are three ways in which the data can be read back The Selected sectors identified on the Flash tab of the Project Settings found in the Options drop down menu may be read back The Entire chip may be read back A specified Range may be read back Start Application Starts the application found on the chip Table 3 6 Target menu elements Options menu elements Command Description Project settings Location of the project settings that are displayed in the snapshot view found in the Project window of the J Flash application as well as various settings needed to locate the J Link and pass specified commands needed for chip initialization Global settings Settings that influence the general operation of J Flash Table 3 7 Options menu elements Window menu elements Command Description Cascade Arranges all open windows one above the other with the active window at the top
60. ntroller GmbH amp Co KG 71 In order to program the option bytes some steps need to be added in J Flash at Options gt Project settings gt CPU gt Exit Steps Project settings Read 32bit Var AND Var BEQ Write 32bit Write 32bit Read 32bit L Dx40023014 5 Dx40023C08 0x40023C08 Dx40023014 JM Use target RAM faster Read OPTCR Skip unlock of OPTCR i 0x08192438 OPTKEYR Unlock key 1 OxdC5D6E7F OPTKEYR Unlock key 2 OPTCR 0x00000002 OPTCR 1 1 starts optio FLASH_SR 000010000 Wait until flash controller These steps will be executed after Target gt Auto has completed programming the image The option byte values are transmitted in the step which writes the oPTCR J Flash comes with an example project for the STM32F4050E which demonstrates how to program the option bytes These steps can be adapted for all STM32F2 F4 devices since they are identical The example can be found by selecting Create project from template navigating to the st folder and select STM32F4050E_OptBytes jflash Welcome to J Flash 7 6 5 STR71x J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming
61. oject file is located at a folder with write permission 6 3 4 Programming process J Flash will increment the serial number in lt JFlashProjectName gt _Serial txt by the value defined in Increment after each successful programming cycle 6 3 5 Sample setup In the following a small sample is given how to setup J Flash for serial number pro gramming In the following sample 4 byte serial numbers starting at 1234567 0x12D687 shall be programmed at address 0x08001000 Defining serial number address length start value and increment In the J Flash project the following needs to be defined J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 62 CHAPTER 6 Address is 0x08001000 Len is 4 bytes Next SN is 1234567 Increment is 1 J7 Production mode Voltage threshold 3000 mi Delay before start 20 ms M Program serial number Address fosoot 000 Next SN fi 234567 Len a Increment fi m Actions performed by Auto IV Erase Sectors if not blank Y Program IV Verify CRC Secure chip JP Start application Create a new J Flash project Now J Flash is prepared to program the 8 byte serial number After programming the serial number Name gt _Serial txt STM32ZE Test Serial txt Test mot Share with New folder gt Name Date modified Type M 26 06 2012 13 57 25 06 2012 19 32 MOT File J Flash User Guide
62. omplete list of supported devices open J Link RDI configuration dialog and check the device list of the Flash programming tab refer to Flash configuration on page 38 for detailed information If you miss the support of a particular device do not hesitate to con tact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 74 CHAPTER 7 Device specifics J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 75 Chapter 8 Target systems The following chapter lists all supported flash devices J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 76 CHAPTER 8 Target systems 8 1 Which devices can be programmed by J Flash J Flash supports programming of internal and external flash devices The external flash device can be Parallel NOR flash Serial NOR flash NAND flash DataFlash For parallel NOR flash any combination of ARM CPU and parallel NOR flash device 1x8bit 2x8bit 4x8bit 1x16bit 2x16bit 1x32bit is supported if the NOR flash device is CFI compliant If the NOR flash device which is used is not CFI compliant you have to explicitly select the flash device in J Flash For a list of all parallel NOR flash devices which can be explicitly selected in J Flash please refer to Supported Flash Devices on page 78 For ser
63. onnection must be available if and only if it is desired to connect to the J Link through the J Link TCP IP Server from a remote sys tem J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG Chapter 2 Licensing The following chapter provides an overview of J Flash related licensing options J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 16 CHAPTER 2 Licensing 2 1 Introduction J Flash may be installed on as many host machines as you want Without a license key you can still use J Flash to open project files read from connected devices blank check target memory verify data files and so on However to actually program devices via J Flash and J link you are required to obtain a license key from us A J Flash license is bound to the serial number of a J Link Evaluation licenses which allow you to unlock the full potential of J Flash for a limited period of time are avail able upon request If you need an evaluation license key you only have to tell us the serial number of your J Link which allows us to send you a proper key In any case you need to have a license key for each J Link you want to work with via J Flash The following sections describe common operations with reference to handling license keys J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 2 2 License types For J Flash there are two different types of licenses whi
64. ons to customize the log output of J Flash 4 2 2 1 General log level This specifies the log level of J Flash Increasing log levels result in more information logged in the log window J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 46 CHAPTER 4 Settings 4 2 2 2 Enable J Link logfile If this option is checked you can specify a file name of the J Link logfile The J Link logfile differs from the log window output of J Flash It does not log J Flash opera tions performed Instead of that it logs the J Link ARM DLL API functions called from within J Flash J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 47 Chapter 5 Command Line Interface This chapter describes the J Flash command line interface The command line allows using J Flash in batch processing mode and other advanced uses J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 48 CHAPTER 5 Command Line Interface 5 1 Overview In addition to its traditional Windows graphical user interface GUI J Flash supports a command line mode as well This makes it possible to use J Flash for batch pro cessing purposes All important options accessible from the menus are available in command line mode as well If you provide command line options J Flash will still start its GUI but processing will start immediately The screenshot below shows the command line help di
65. ook similar to the screenshot below Normally all default settings can be used without modi fications Project settings J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 57 6 In the Production dialog is secondary for a setup You can define the behaviour of the Auto option Target gt Auto or shortcut F7 General Target Interface CPU Fash Production TT Production mode Av Enable target power Delay before start 20 ms Voltage threshold 3000 my Delay before start 500 ms CT Program serial number Address 00000000 Next SN fi Len E Increment fi m Actions performed by Auto IV Erase FN Program IV Verify CRC F Secure chip J Start application Sectors if not blank 7 Save your project File gt Save Project and test it J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 58 CHAPTER 6 Create a new J Flash project 6 2 Creating a new init sequence Many microcontrollers require a custom init sequence to initialize the target hard ware for example the initialize the PLL disable the watchdog or define the wait states of the flash This means that you have to build an compatible init sequence for the microcontroller if you create a new project or modify one of the existing projects You can build or update a custom init sequence in the CPU dialog in the Project set tings menu Click the
66. pply only if the data file is a bin file or c file Table 5 1 J Flash command line options J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 50 CHAPTER 5 Command Line Interface Option Description saveas lt FILE NAME gt lt SADDR gt lt EADDR gt Save the current data file into the specified file Please note that the parameters lt SADDR gt lt EADDR gt apply only if the data file is a bin file or c file savecfg lt FILENAME gt Saves emulator config file savedat lt FILENAME gt Saves emulator data file saveprj Save the current project saveprjas lt FILENAME gt Save the current project in the specified file securechip Secures target device setrxidcode lt IDCodeString gt Sets the RXIDCode to be used by the DLL Syntax setrxidcode lt IDCodeString gt 32 char acters 16 IDCode bytes softlock Lock soft selected sectors softunlock Unlock soft selected sectors startapp Start target application unsecurechip Unsecures target device verify Verify target memory verifycrca Verify CRC of affected sectors verifycrcs Verify CRC of selected sectors verifycrcc Verify CRC of entire flash chip usb lt SN gt Overrides connection settings to USB S N Goce Overrides connection settings to IP S N Table 5 1 J Flash command line options J Flash User Guide UM08003
67. rder to start serial number programming with the first line of the SNList txt Next SN needs to be set to 0 Specifies how much Next SN is incre mented Next SN Increment Table 6 1 J Flash serial number settings 6 3 2 Serial number file When starting the program process Target gt Auto J Flash will create a serial num ber file named as lt JFlashProjectName gt _Serial txt The file is generated based on the serial number settings in the J Flash project and will contain the value defined by the Next SN option The serial number file can also be manually edited by the user since the serial number is written ASCII 6 3 3 Serial number list file In order to program custom serial numbers which can not be covered by the standard serial number scheme provided by J Flash e g when programming non continuous serial numbers or having gaps between the serial numbers a so called serial num ber list file needs to be created by the user When selecting Target gt Auto J Flash will check for a serial number list file named as lt JFlashProjectName gt _SNList txt in the directory where the J Flash project is located The serial number list file needs to be created manually by the user and has the following syntax e One serial number per line J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 61 e Each byte of the serial number is described by two hexadecimal digits Example
68. re choice list to use J Flash with an external flash chip Set the endianess core ID RAM address and RAM size of the used MCU To program the internal flash of the chip choose a device from Device choice list J Flash uses correct default values endianess core ID RAM address and size for this device This is the part where initialization of the external bus interface if necessary has to be done For more information about the valid commands which can be used in an initialization sequence please refer to Init steps on page 39 Goel Tapas CPU Fash Producten IT Use J Link script fle IE C Core Device M Check core ID ST STM32F103VF El 1D 38400477 Lite endian gt Mask FFFFFFFF F Use target RAM faster Addr 20000000 36KB ini steps y Add Insert Delete Edit Up Down J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 56 CHAPTER 6 Create a new J Flash project 5 The Flash dialog is dependent on selection in the CPU dialog If you want to pro gram external flash the dialog should look similar to the screenshot below The used flash chip can be automatically detected or chosen from a list if you disable the Automatic detection checkbox If you choose the Automatic detection fea ture the only required settings are the Base Addr Organization and Chip s fields Project settings If you want to program the internal flash of an MCU the dialog should l
69. registered trademarks of their respec tive holders Contact address SEGGER Microcontroller GmbH amp Co KG In den Weiden 11 D 40721 Hilden Germany Tel 49 2103 2878 0 Fax 49 2103 2878 28 Email support segger com Internet http www segger com Manual versions This manual describes the latest software version If any error occurs please inform us and we will try to assist you as soon as possible For further information on topics or routines not yet specified please contact us Manual version Date By Explanation Chapter Command Line Interface Section Command line options Added new commands verifycrca verifycrcs and verifycrcc Chapter Command Line Interface Section Command line options updated Chapter Command Line Interface 5 00c Rev O 150611 EL Section Programming multiple targets in parallel updated Chapter Command Line Interface 4 98 Rev 2 150427 EL Section Command line options Added new command ip and USB Chapter Background information 4 98 Rev 1 150320 AG Section CRC of current data file polynomial corrected 5 02c Rev 0 150914 RH 5 02a Rev O 150907 EL Table List of manual versions J Flash User Guide UMO8003 O 2004 2015 SEGGER Microcontroller GmbH 8 Co KG Manual version Date By Explanation 4 98 Rev O 150113 NG Chapter Command Line Interface Changed JFlashARM exe to JFlash exe 4 9
70. rget power sup ply and before starting to communicate with the target Program serial number J Flash supports programming of serial numbers into the target in two ways For a detailed description how to use the serial number programming feature please refer to Serial number programming on page 59 Actions performed by Auto The checked options will be perforemed when auto programming a target Target gt Auto shortcut F7 The default behaviour is Erase sectors if not blank Program and Verify CRC You can optional include Secure chip and Start application Find below a table which describes the commands Command Description Performs an erase depending on the settings selected in the drop down box e Sectors Erases all sectors which are effected by the image to be programmed Erase e Sectors if not blank Erases all sectors which are both effected by the image to be programmed and not already blank e Chip Erase the entire chip independent of the con tent Program Programs the data file Table 4 2 Actions performed by Auto J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 44 CHAPTER 4 Settings Command Description Verify Verifies the program data e CRC Verifies data via a high optimized CRC calcula tion recommended verification method e Complete data Verifies data by reading it back Secure chip Secures the device if suppo
71. rtant sections Table 1 1 Typographic conventions J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG SEGGER Microcontroller GmbH amp Co KG develops and distributes software development tools and ANSI b C software components middleware for embedded systems in several industries such as telecom medi cal technology consumer electronics automotive SEGG ER industry and industrial automation SEGGER S intention is to cut software development time for embedded applications by offering compact flexible and easy to use middleware allowing developers to concentrate on their application Our most popular products are emWin a universal graphic software package for embed ded applications and embOS a small yet efficent real time kernel emWin written entirely in ANSI C can easily be used on any CPU and most any display It is comple mented by the available PC tools Bitmap Converter Font Converter Simulator and Viewer embOS supports most 8 16 32 bit CPUs Its small memory footprint makes it suitable for single chip applications Apart from its main focus on software tools SEGGER developes and produces program ming tools for flash microcontrollers as well as J Link a JTAG emulator to assist in devel opment debugging and production which has rapidly become the industry standard for debug access to ARM cores Corporate Office United States Office http www segger com http w
72. rted by algorithm Start application Starts application after programming verify completed Needs reset bin to be conccted to J Link Table 4 2 Actions performed by Auto J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 45 4 2 Global Settings Global settings are available from the Options menu in the main window Global settings Xx lt I Start Stop only E H 4 2 1 Operation You may define the behavior of some operations such as Auto or Program amp Ver ify 4 2 1 1 Disconnect after each operation If this option is checked connection to the target will be closed at the end of each operation 4 2 1 2 Automatically unlock sectors If this option is checked all sectors affected by an erase or program operation will be automatically unlocked if necessary 4 2 1 3 Perform blank check If this option is checked a blank check is performed before any program operation to check if the affected flash sectors are completely empty The user will be asked to erase the affected sectors if they are not empty 4 2 1 4 Skip blank areas on read If this option is checked a blank check is performed before any read back operation to check which flash areas need to be read back from target This improves perfor mance of read back operations since it minimizes the amount of data to be trans ferred via JTAG and USB 4 2 2 Logging You may set some logging opti
73. supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 66 CHAPTER 7 Device specifics 7 3 Freescale 7 3 1 MC13224 J Flash comes with a sample project as well as a RAMCodeV2 allowing to program the internal SPI flash of the Freescale MC13224 device Please note that the device needs some special handling which is in customer s responsibility 1 The first 4 bytes of the flash are reserved for a validation word that is used dur ing boot process to check if the flash contains a valid application The validation word can be OKOK 0x4F 0x4B 0x4F 0x4B or SECU 0x53 0x45 0x43 0x55 It is user s responsibility to ensure that the data file he downloads to flash mem ory contains this validation word Note If SECU is chosen the JTAG interface is disabled the device is secured 2 The next four bytes after the validation word are reserved for a data word that used to determine how many bytes of flash content shall be copied to RAM when the device boots A maximum of 96 KBytes can be copied to RAM This is the whole RAM size Example Your application in flash has 32 KBytes in size then the data word would be 0x8000 32 KB
74. ta in the shadow area When performing chip erase J Flash reads back the censorship regis ters erase the shadow flash and reprogram the censorship registers in order to guarantee that the device will not be locked In case the data image contains data in the shadow area J Flash erases the entire shadow area block and program it with the data from the user data image In this case J Flash does not restore the censorship registers as it assumes that touching the area is done on purpose So when programming the shadow area make sure to program the censorship regis ters with correct values in case of doubt reset values as well in order to ensure that the device will not be locked Note When programming the shadow area the image must contain data for the entire area even if the data to be programmed are OxFF J Flash User Guide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 67 7 4 NXP J Flash supports flash programming for the NXP LPC core family 7 4 1 LPC2xxx J Flash includes ready to use projects for all supported devices For a complete list of supported devices open J Flash and check the available projects If you miss the support of a particular device do not hesitate to contact Segger Refer to J Link J Trace User Guide for device specifics which are not related to flash programming J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 68 CHAPTER 7 Device spec
75. ternal AT91EB40A flash memory AT91RM9200_CSB337 jflash Cogent CSB337 eval board with AT91RM9200 AT91RM9200_CSB637 jflash Cogent CSB637 eval board with AT91RM9200 AT91RM9200_Digi_CC9U jflash Digi CC9U with AT91RM9200 AT91RM9200_EK jflash Atmel AT91RM9200 eval board AT91SAM3S jflash Atmel AT91SAM3S3 with internal flash memory AT91SAM3U4E jflash Atmel AT91SAM34UE with internal flash memory a Atmel AT91SAM7A1 eval board with CFI compli AT91SAM7A1_EK jflash ant flash memory AT91SAM7A3 jflash Atmel AT91SAM7A3 with internal flash memory AT91SAM7L128 jflash Atmel AT91SAM7L128 with internal flash memory AT91SAM7S32 jflash AT91SAM7S EK eval board with SAM7S32 AT91SAM7S64 jflash AT91SAM7S EK eval board with SAM7S64 AT91SAM7S128 jflash AT91SAM7S EK eval board with SAM7S128 AT91SAM7S256 jflash AT91SAM7S EK eval board with SAM7S256 AT91SAM7SE512 jflash AT91SAM7SE EK eval board with SAM7SE512 AT91SAM7X128 jflash AT91SAM7X EK eval board with SAM7X128 AT91SAM7X256 jflash AT91SAM7X EK eval board with SAM7X256 Table 3 2 List of sample J Flash projects J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 25 Project Description AT91 SAM9260_CFI_1x16 jflash AT91SAM9260 eval board with external CFI 1x16 flash memory AT91 SAM9263_CSB737 jflash Cogent CSB337 eval board with AT91SAM9263 AT91 SAM9G20 EK_DataFlash jflash AT91SAM9G20 EK eval board with S
76. ther 32bit data on a declared address is identical to the declared 32bit data Write 8bit Address Hex Data Hex Writes 8bit data to a given address Write 16bit Address Hex Data Hex Writes 16bit data to a given address Write 32bit Address Hex Data Hex Writes 32bit data to a given address Write Register Register Value Writes data into a register Write JTAG IR Command Writes a command in the JTAG instruction register Write JTAG DR NumBits Data Hex Writes a declared number of bits into the JTAG data register Var AND Value Hex Logical AND combination of the internal variable with a given value Var OR Value Hex Logical OR combination of the internal variable with a given value VAR XOR Value Hex Logical XOR combination of the internal variable with a given value VAR BEQ Index Checks if the internal variable is equal to 0 Performs jump to index on match VAR BNE Index Checks if the internal variable is not equal to 0 Performs jump to index on match Writes 8bit data of the internal Var Write 8bit Address Hex Data Hex variable to a given address Writes 16bit data of the internal Var Write 16bit Address Hex Data Hex variable to a given address Var Write 32bit Address Hex Data Hex atea beter orto Internal variable to a given address
77. uide UMO8003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 4 1 3 6 Use target RAM You may enable the use of target RAM to speed up flash operations To use the target RAM a start location in RAM and the amount of RAM to be used must be entered 4 1 3 7 Init steps 39 Many microcontrollers require an initialization sequence for different reasons When powered on the PLL may not be initialized which means the chip is very slow or a watchdog must be disabled manually To use these chips you must first perform the required initialization This dialog allows the user to enter a custom initialization sequence using a pre defined list of operations After choosing an operation and corresponding values to be associated with the operation a comment may be added to make it easier for others to determine its effect The following list shows all valid commands which can be used in an init sequence Command Value0 Value Description Length ofthe Delay delay Sets a delay DisableMMU Disables the MMU Disable Checks Disables JTAG checks Some CPUs e g TMS470R1B1M report JTAG communication errors while initializing so that they can not be programmed if the JTAG communication checks are enabled Enable Checks Enables JTAG checks This option is activated by default Go Starts the CPU Halt Halts the CPU Reset J Link reset type Length of the delay Resets the CPU Refer
78. ved as bin file 0x1000 Ox13FF Data of File1 bin Can be saved in new data file File3 bin Save Saves the data file that currently has focus Save ns Saves the data file that currently has focus using the name and location given New Project Creates a new project using the default settings Open Project Opens a J Flash project file Note that only one project file may be open at a time Opening a project will close any other project currently open Save Project Saves a J Flash project file Save Project As Saves a J Flash project file using the name and location given Close Project Closes a J Flash project file Export Setup File Exports a file that can be used to setup the J Link Please refer to the J Link documentation for more information regarding J Link setup files Recent Files gt Contains a list of the most recently open data files Recent Projects gt Contains a list of the most recently open project files Exit Exits the J Flash application Table 3 3 File menu elements Edit menu elements Command Description Relocate Relocates the start of the data file to the supplied hex offset from the current start location Delete range Deletes a range of values from the data file starting and ending at given addresses The End address must be greater than the Start address otherwise nothing will be done
79. with regard to J Flash Directory Contents The J Flash application Please refer to the J Link man ual for more information about the other J Link related tools Contains the J Flash documentation and the other J Link Doc related manuals Two csv files for the J Flash internal management of RARE supported MCU s und flash chips Contains sample projects with good default settings see section Sample Projects on page 24 for further details Table 3 1 J Flash directory structure Sample JFlash Pro jectFiles J Flash User Guide UM08003 2004 2015 SEGGER Microcontroller GmbH amp Co KG 3 2 Using J Flash for the first time Start J Flash from the Windows Start menu J Flash s main window will appear which contains a log window at the bottom and the Project window of a default project on the left The application log will initially display The version and time of compilation for the J Flash application The version and time of compilation for the J Link DLL The number of supported flash devices The number of supported MCU devices The location of the default project 23 A start dialog to choose a J Flash project will pop up It is recommanded to start from a template project For further information about the start dialog refor to the next chapter The Project window contains an overview of the current project settings initially J Flash opens a default project add Flash A
80. ww segger us com EMBEDDED SOFTWARE SEGGER TOOLS Middleware emWin Flasher Graphics software and GUI Flash programmer emWin is designed to provide an effi Flash Programming tool primarily for microcon cient processor and display control trollers ler independent graphical user interface GUI for any application that J Link operates with a graphical display JTAG emulator for ARM cores Starterkits eval and trial versions are USB driven JTAG interface for ARM cores available J Trace embos JTAG emulator with trace Real Time Operating System USB driven JTAG interface for ARM cores with emb0OS is an RTOS designed to offer Trace memory supporting the ARM ETM Embed TT the benefits of a complete multitasking ded Trace Macrocell EJ system for hard real time applications with minimal resources The profiling J Link J Trace Related Software PC tool embOSView is included Add on software to be used with SEGGER s indus try standard JTAG emulator this includes flash emFile programming software and flash breakpoints File system emFile is an embedded file system with FAT12 FAT16 and FAT32 support emFile has been optimized for mini mum memory consumption in RAM and ROM while maintaining high speed Various Device drivers e g for NAND and NOR flashes SD MMC and Com pactFlash cards are available emUSB USB device stack A USB stack designed to work on any embedded system with a USB client controller Bulk communicatio
81. ytes It is stored in little endian format When viewing the data file in J Flash it would look like as follows 00000 4F 4B 4F 4B 00 80 00 00 XX XX XX XX XX XX XX XX 4 bytes OKOK 4 bytes data word followed by data 7 3 2 MPC560 J Flash supports flash programming of the internal code flash the shadow area and internal data flash for the Freescale MPC560 device family The internal code and data flash can be programmed without further attention Programming the shadow area must be done carefully as this flash area includes the censorship values which are used to configure the Censored mode Depending on the censorship value the debug logic can be disabled The erased state OxFF of all the volatile censored mode registers is the protected state So erasing but not pro gramming the censored mode registers will protect the device Therefore J Flash comes with two different device options for each device One which allows programming the internal code and data area only in order prevent users to lock their devices by chance One which allows programming those areas and the shadow area as well The second configuration is marked by the extension allow shadow Programming the shadow area First the MPC560xx allow shadow device must be selected in order to be able to touch the shadow area Even when selecting the allow shadow variant the shadow area is not touched erased if not necessary data file does not contain da

Download Pdf Manuals

image

Related Search

Related Contents

Autoline 410 Manual  Manual GDA-6000  CMS User Manual  Professionelle Tierschermaschine Professional Animal Clipper  l 1000 Desktop 3G Phone Benutzerhandbuch  Télécharger la Lettre au format pdf  Sweet Notes • Late Fall 1998  Actividades previstas.  HP Key Notes Vol 8 No 2  

Copyright © All rights reserved.
Failed to retrieve file