Home

Getting started with Flash Magic

image

Contents

1. Line Feed followed by Carriage Retum Send Break Condition not the BoothROM before using the Start BootROM feature otherwise the BoothOM will become confused i WARNING Ensure device it executing firmware and Cancel Start BootROM Join the Technical Community Today http www pantechsolutions net Select to either send a textual command or a break condition The baud rate used is completely independent from the baud rate in the main window This allows the user s application to use the UART at say 9600 baud but allow Flash Magic to use say 19200 baud either with or without high speed communications turned on However the COM Port used is the same as the one selected in the main window Select the baud rate enter the textual command which may be anything you desire select the append option you want and click on Start Boot loader to send If successful the ISP features of Flash Magic can now be used The append options allow a carriage return and line feed to be added to the command This is useful if your application implements a command line via the serial port and expects all commands to end in these control characters Select the setting that matches your implementation Join the Technical Community Today http www pantechsolutions net Combined with the automatic Reset after programming option devices may be programmed and tested repeatedly without ever having to touch the hardwa
2. Some devices support protecting the device configuration along with the boot vector and status bit byte On these devices a Clear configuration Protect button will be shown which when clicked will send the command to clear the protection for the configuration of the device 3 13 Cyclic Redundancy Check Some devices instead of a verify option provide a Cyclic Redundancy Check CRC option where the device can calculate a 32 bit CRC value for a single Flash Block or the entire device CRCs are a form of checksum therefore if the contents of the memory change there is a very high probability the CRC will also change If the selected device supports CRCs then the Cyclic Redundancy Check item on the ISP menu will be enabled Selecting it displays the CRC window Join the Technical Community Today http www pantechsolutions net Cyclic Redundancy Check Device CRC Hex Files CRC D O0000 0 03FF OABSEC476 Ox5201B556 1 Ox0400 0x07FF Ox00000000 Ox00000000 2 Ox0800 0x08FF Ox00000000 0x00000000 3 OxOCOO OxOFFF Ox00000000 0x00000000 4 0 1000 0 1 3FF Ox00000000 Ox00000000 x Hex Files C temp ptrtest PTRTEST HEX C temp rx2test rx2test hex Add Remove Calculate CRC Close rl El When the window is first opened the CRC value is read from the device for each Flash Block and the entire device These values are shown in the Device CRC column Click on the Add button and sel
3. erasing and performing blank checks Join the Technical Community Today http www pantechsolutions net The default settings are four seconds for the regular timeout and 60 seconds for the long timeout It is strongly recommended to use the default settings If you are using a USB to COM port converter then you may find that increasing the timeouts will resolve communication problems that are sometimes present with those converters 4 7 Misc In the Misc section miscellaneous settings relating to Flash Magic can be found Flash Magic includes the ability to play a Wave file when programming is completed To do this check the option to play a Wave file then either enter the path to the Wave file into the box or click on the Browse button and select the Wave file For hearing the Wave file click on the purple arrow Join the Technical Community Today http www pantechsolutions net Pantech solutions creates information packed technical documents like this one every month And our website is a rich and trusted resource used by a vibrant online community of more than 1 00 000 members from organization of all shapes and sizes Join the Technical Community Today http www pantechsolutions net What do we sell Our products range from Various Microcontroller development boards DSP Boards FPGA CPLD boards Communication Kits Power electronics Basic electronics Robotics Sensors Electronic compo
4. 3 15 GO 48 3 16 Serial NUMBER sesser 48 3 17 Update Boot loader esesesesesesesesesececeoecsesecsececeoe 51 3 18 Additional Security Bits ccscsscsccsccsccecsccecs 52 4 Advanced OptiOnS sesesesecececececececesececesececesececesecee 53 4 1 High Speed COMMUNICATIONS s sesesesesesesececesececseceo 53 4 2 Half duplex Communications sesesesesesesesecesesesececeo 54 4 3 Hardware Configuration sesesecesececececececesececsesee 55 4 4 P8OVXXX ccccesccesccescoees Error Bookmark not defined A5 Protect ISP sasscscsccssnnnntesncnenternonsseceaseeneraennensensaranens 57 AG TEO S un 59 Ts MiS Cssccn E 60 Join the Technical Community Today http www pantechsolutions net 1 Introduction of Flash Magic NXP Semiconductors produce a range of Microcontrollers that feature both on chip Flash memory and the ability to be reprogrammed using In System Programming technology Flash Magic is Windows software from the Embedded Systems Academy that allows easy access to all the ISP features provided by the devices These features include e Erasing the Flash memory individual blocks or the whole device e Programming the Flash memory e Modifying the Boot Vector and Status Byte e Reading Flash memory e Performing a blank check on a section of Flash memory e Reading the signature bytes Join the Technical Community Today http www pantechsolutions net e Reading and writing th
5. After Programming ccccsccscsccsccscsccscenes 22 Join the Technical Community Today http www pantechsolutions net 2 4 2 Fill Un sed Fl sh csc cevacesewssseceavaboauiaseiccstvcseceosneneas 22 2 4 3 General Block CheckSums cccssccssscceseeeeseeees 23 2 4 4 Execute Option esessssscesesessececesescececeseecececeseeee 23 2 5 Step 5 Performing the Operations scsccseesses 24 3 Additional ISP Features ccsscccssccsssccesecceseeeeeecees 26 3 1 SAVING a Hex File ssecticccssvsdedecivsinaiccteuctisecssd ncevenwinctec 26 32 Blank CHECK cage cvrcecetosseecaccucsvimensrteneecacat cetnecesaenceceoas 27 3 3 Reading the Security Settings scsccscssceecseeees 28 3 4 Reading the Device Signature sscsccscsscsscseeees 29 3 5 Modifying the Boot Vector and Status Byte 30 3 6 Displaying MeMOry sscsccscsscsccsccsccccsccsceccscencs 34 3 7 Erasing FIASM ecnnennnn 35 3 8 Verifying a Hex File sesesesesesesecesecececececececsosceceoe 36 3 9 Reset and EX CUtG sarna 38 3 10 Start Boot loader Description ccccscsscsecseeees 39 3 11 Ease PAGS sccticcie ve ceccwecesscewscaseesunsacswantecoustsdnessentes 42 3 12 Device Configuration cscsscsccsccsccccsccsceccsccncs 43 3 13 Cyclic Redundancy Check ccscsscsccsccsccccsccees 44 SAA MIOR r E E 46 Join the Technical Community Today http www pantechsolutions net
6. completed it is possible to change both the Boot Vector and Status Byte by selecting Boot Vector and Status Byte from the ISP menu You will be presented with the following window Boot Yector and Status Byte x WARNING Changing the Boot Vector to a IN value other than the default of OxFC may result IN in the inability to communicate with the device using ISP Below are shown the curent settings IF you wish to change them then make the changes and click on Aeprogram Mote that FlashMagic ALWiay S sets the Boot Vector to OxFC and the Statue Byte to 0x00 after programming a Hes file Also note that after performing a full Flash erase the Boot Vector is set to DFC and the Status Bute is set to UxFF Boot Yector Status Byte 0x IFC C Run Boot Loader Status Byte OxFF Check PSEN Status Byte 0x00 Cancel Reprogram The current Boot Vector and Status Byte settings will be shown Modify the settings as desired and click on the Reprogram button Join the Technical Community Today http www pantechsolutions net Setting the Boot Vector to a value other than the default may result in the inability to run the Boot loader on the device This will mean that the ISP features of the device cannot be accessed until the device has been erased in a Parallel Programmer Because of this danger you will be presented with a confirmation window if you try to reprogram the Boot Vector to a non default value
7. flash will be programmed followed by the RAM Programs loaded into RAM via a hex file may be executed using such features as the Go option Join the Technical Community Today http www pantechsolutions net 2 4 Step 4 Options Flash Magic provides various options that may be used after the Hex File has been programmed This section is optional however verify After Programming Fill Unused Flash and Gen Block Checksums may only be used if a Hex File is selected and therefore being programmed as they all need to know either the Hex File contents or memory locations used by the Hex File step 4 Options Verky after programming Set Code Read Prot Fil n Flash p F er fi ER He mr peed ey Join the Technical Community Today http www pantechsolutions net 2 4 1 Verify After Programming Checking the Verify after Programming option will result in the data contained in the Hex File being read back from Flash and compared with the Hex File after programming This helps to ensure that the Hex File was correctly programmed If the device does not support verifying then this item will be disabled 2 4 2 Fill Unused Flash Checking the Fill Unused Flash option will result in every memory location not used by the Hex File being programmed with the value that sets all the bits to a programmed state Once a location has been programmed with this feature it cannot be reprogrammed with any other valu
8. Confirm Changing Boot Yector x WARNING Changing the Boot Yector to a value other than the default of OxFC may result In the mability to communicate with the device wing ISP You have selected to reprogram the Boot Vector to a value that is not the default of OXFC To confirm this operation answer the question below Any answer other than yes or YES will cancel this operation Are You sure you wish to reprogram the Boot Vector E Cancel Ok Join the Technical Community Today http www pantechsolutions net Following the below instructions in the window carefully to reprogram the Boot Vector Once the Boot Vector and Status Byte have been reprogrammed a confirmation message will be displayed Some devices do not support a Boot Vector However the Status Byte may still be changed by selecting Status Byte from the ISP menu The following dialog window will be displayed Below are shown the current settings Ifyou wish to change them then make the changes and click on Reprogram Mote that FlashMagic ALWAYS sets the Status Byte to 0x00 after programming a Hex file Also note that after performing a full Flash erase the Status Byte is set to OxFF Status Byte Run Boot Loader Status Byte OxFF Cancel Reprogram Modify the settings and click on the Reprogram button Join the Technical Community Today http www pantechsolutions net 3 6 Displaying Memory A useful feat
9. EAS Help D a Q A Terminal Step 1 Communications COM Pott comi x Baud Rate s00 o Device sv5IRD2 Interface None ISP Erase all Flash V Erase blocks used by Hex File The Help menu contains items that link directly to useful web pages and also open the Help About window showing the version number hy r Flash Magic NON PRODUCTION USE ONLY File ISP Options Tools p26 Dala a 4 vO Step 1 Communications Flash Magic Home Page COM Port COM Flash Magic Production System 2 Flash Magic Discussion Forum Baud Rate 9600 f NXP MCU Datasheets Information Device 8975 NXP MCU Discussion Forum eee Enter Access Code S About ex File Join the Technical Community Today http www pantechsolutions net 1 3 Tooltips Throughout the Flash Magic user interface extensive use has been made of tooltips These are small text boxes that appear when you place the pointer over something and keep it still for a second or two Note that tooltips do not appear for items that are disabled grayed out 1 4 Saving Options The options in the main window and the Advanced Options window are automatically saved to the registry whenever Flash Magic is closed This removes the need for an explicit save operation When Flash Magic is restarted the main window and the Advanced Options window will appear as you left it so you do not have to repeatedly make the same selections every time you
10. This document is owned by www pantechsolutions net PANTEC SOLUTIONS Republishing or redistribution is prohibited Technology Beyond the Dreams 8051 HOW TO GUIDE Getting started with Flash Magic FlashMagie wersion 5 67 2022 Developed for NFP Semiconductors Embedded Systems Academy Inc 2000 2010 Al Feights Reserved Contents at a Glance 1 Introduction of Flash Magic csccsccscssceccscesceccnees 5 1 1 Screenshot of Flash Magic Window csscscssees 7 Dis 2 Menus scpivocasveintucansuiancatncedoasgerwasenerwdertuvainsuntecssauses 8 13 TOQMUDS ccnvscevetinsceveseciccsccisnccdcsvsatesedinncivesenceceonssaceds 12 1 4 Saving OptiOnS sssseseseseesececesescecesesescececesescecesese 12 2 Five Step Programming sesesessececesescececeseecececesesee 13 2 1 Step 1 Connection Settings ccsccscsecscecceens 13 2 1 1 COM Port Settings sesseseesesoesescecesceseecesceseecesee 14 2 1 2 Baud Rate Settings sesesesesesecesececececsecececseoececeoe 14 2 1 3 Device SELECTION swcsecaesiesccceinavecesnciceusexeceiscextuevecctas 15 2 1 4 Interface Selection sossssesossssssossssssossssssossssssoe 15 2 1 5 Oscillator Frequency sesesesesesesecececececeseseosceosos 16 22 Step 2 Eras nencai aa 16 2 3 Step 3 Selecting the Hex File ccsccscsecseeees 19 24 STEP 4 ODtONS scicnissinscanewiacsinssineenssenssisnastaseneneds 21 2 4 1 Verify
11. e e A full device erase will be achieved by erasing Flash blocks and pages to erase the Flash without erasing the section of Flash containing the ISP code e A block erase for a block that contains the ISP code will be achieved by erasing pages in the block if they exist on the device to avoid erasing the ISP code e The programming of any Hex file containing data that would corrupt the ISP code will be aborted e The section of Flash containing the ISP code will not be filled e Any checksums that are in the same locations as ISP code will not be programmed Join the Technical Community Today http www pantechsolutions net If the Protect ISP option is unchecked then erasing or programming a device has the potential to erase or corrupt the ISP code Any attempt to perform one of these operations will result in Flash Magic asking for confirmation first Erasing or corrupting the ISP code will immediately render the ISP functionality of the device non functional 4 6 Timeouts In the Timeouts section the timeouts Flash Magic should use when performing ISP operations are specified Normally default settings are used however if you wish to change the timeouts then check the option to use my timeouts and fill in the values in the boxes Flash Magic uses two timeouts regular and long Each timeout is specified in seconds The regular timeout is used for most ISP operations The long timeout is used for
12. e preventing someone from programming the device with a small program to read out the contents of Flash or altering the application s operation Join the Technical Community Today http www pantechsolutions net 2 4 3 General Block Checksums Checking the Gen Block Checksums option will instruct Flash Magic to program the highest location in every Flash block used by the Hex File with a special checksum adjuster value This value ensures that when a checksum is calculated for the whole Flash Block it will equal 55H providing the contents of the Flash block have not be altered or corrupted Please refer to the Block Checksums section for more information 2 4 4 Execute option Checking the Execute option will cause the downloaded firmware to be executed automatically after the programming is complete Note that this will not work if using the Hardware Reset option or a device that does not support this feature Join the Technical Community Today http www pantechsolutions net 2 5 Step 5 Performing the Operations Step 5 contains a Start button Step 5 Start Clicking the Start button will result in all the selected operations in the main window taking place They are e Erasing Flash e Programming the Hex File e Verifying the Hex File e Filling Unused Flash e Generating Checksums e Programming the clocks bit e Programming the Security Bits e Executing the firmware Join the Technical Co
13. e datasheet for the exact details of the implementation If the selected device supports serial numbers then the Serial Number item on the ISP menu will be enabled Selecting it displays the serial number window Set Seal Number Enter Geral Number Eee fasci Fe enter Serial Humber ee Set Serial Number Reset Serial Number WARNING Resetting the serial numbe will erase the device Reset Serial Number Unlock Device Enter Geral Number o fasc Unlock Device To set a serial number enter it into box boxes indicated The contents of the boxes must match Then click on Set Serial Number Join the Technical Community Today http www pantechsolutions net For reset a serial number click on the Reset Serial Number button To unlock a device using a serial number enter the correct serial number into the box and click on Unlock Device Serial numbers may be entered in ASCII or Hexadecimal by selecting from the drop down list Examples of ASCII serial numbers e 2A45bc2 e foobar e MyOldMan Examples of Hexadecimal serial numbers e 23BD4C2101ED3451 e 112233AABBCC Serial numbers may be any length up to the maximum allowed Hexadecimal serial numbers must not include the Ox prefix or the H h suffix Join the Technical Community Today http www pantechsolutions net 3 17 Update Boot loader Some devices allow the boot loader to be updated via ISP This can only be performed usin
14. e security bits e Direct load of a new baud rate high speed communications e Sending commands to place device in Boot loader mode Flash Magic provides a clear and simple user interface to these features Under Windows only one application may have access the COM Port at any one time preventing other applications from using the COM Port Flash Magic only obtains access to the selected COM Port when ISP operations are being performed This means that other applications that need to use the COM Port such as debugging tools may be used while Flash Magic is loaded Join the Technical Community Today http www pantechsolutions net 1 1 Screenshot of Flash Magic Window 2 Flash Magic NON PRODUCTION USE ONLY pile ISP Options Tools Help MENUS HiIQGS vBeiv a 0L Step 1 Communications COM Port comi x Baud Rate 3600 SECTION 1 Device jeqv5IRD2s SECTION 2 Interface None SP Erase all Flash V Erase blocks used by Hex File Hex File D embeded file PS TYRO 4RM 214 POLYSCode Ex Keypad Browse Modified Thursday September 16 2010 3 21 48 PM more info Step 4 Options JV Verify after programming Set Security Bit 1 Fill unused Flash Gen block checksums Execute Prog Clocks Bit Technical on line articles about 8051 and XA programming EMBEDDED HINTS www esacademy com fag docs PROGRESS BAR PROGRESS INFORMATION PROGRAMMED COUNT The window is divided up into five s
15. ect 9600 and start increasing until the problems appear 4 2 Half duplex Communications When communicating with the device Flash Magic can send and receive data at the same time to achieve the fastest data rate This type of transmission is called full duplex Turning the half duplex option on will cause Flash Magic to only transmit one byte at a time waiting for the byte to be echoed from the Boot loader before transmitting the next byte While this will slow the data rate down it allows ISP to be performed via half duplex serial buses Join the Technical Community Today http www pantechsolutions net Note however that you must design your hardware such that the PC and the Boot loader do not receive the bytes they transmit otherwise each will be confused 4 3 Hardware Configuration For some devices Flash Magic can control DTR and RTS to enter ISP mode or execute newly downloaded code To implement this requires a hardware design that supports controlling of the device using DTR and RTS The options for controlling this feature are accessed by clicking on the Hardware Configuration tab The advantages of this feature include e Faster development e ISP is now possible on hardware that is hard to reach or enclosed in a box e Removes the need for switches or jumpers on the hardware Join the Technical Community Today http www pantechsolutions net 4 4 89XX DTR and RTS need to be connected to RST and to a
16. ect each of the Hex files programmed into the device Each Hex file will appear in the list at the bottom of the window To remove a Hex file from the list select it in the list and click on the Remove button Join the Technical Community Today http www pantechsolutions net Click on the Calculate CRC button to calculate the CRCs for each block and the whole device as if the chosen Hex files were programmed into the device These values will appear in the Hex Files CRC column If the contents of the device exactly match the contents of the chosen Hex files then the CRCs on each row of the table will match 3 14 MISR Some devices instead of a verify option provide a MISR option where the device can calculate a 128 bit MISR value for a single Flash Block or the entire device MISR values are a form of checksum therefore if the contents of the memory change there is a very high probability the MISR value will also change If the selected device supports MISR values then the Read MISR item on the ISP menu will be enabled Selecting it displays the MISR window which is functionally identical to the CRC window described in the previous section Join the Technical Community Today http www pantechsolutions net When the window is first opened the MISR value is read from the device for each Flash Block and the entire device These values are shown in the Device MISR column Click on the Add button and
17. ections Work your way from section 1 to section 5 to program a device using the most common functions Join the Technical Community Today http www pantechsolutions net At the very bottom left of the window is an area where progress messages will be displayed and at the very bottom right is where the progress bar is displayed In between the messages and the progress bar is a count of the number of times the currently selected hex file has been programmed since it was last modified or selected Just above the progress information Embedded Hints are displayed These are rotating Internet links that you can click on to go to a web page using your default browser 1 2 Menus There are five menus File ISP Options Tools and Help Fash Magic NON PRODUCTION USE ONLY cioR File SP Coume Tools Hep DH UGGVED 9H Oe Join the Technical Community Today http www pantechsolutions net The File menu provides access to loading and saving Hex Files loading and saving settings files and exiting the application iai Flash Magic NON PRODUCTION USE ONLY aA AET I5P Options Tools Help Open f 3 Save 4s Step 2 Erase Information Erase block 0 02000000 0 000FFF Erase block 1 0x007000 0 001 FFF Erase block 2 0x002000 04002FFF Erase block 3 04003000 0 003F FF Erase block 4 Ox004000 0x004FFF gt open Settings H Save Settings f Save Command Line D
18. es support high speed communications 2 1 3 Device Selection Select the device being used from the drop down list Ensure you select the correct one as different devices have different feature sets and different methods of setting up the serial communications 2 1 4 Interface Selection Select the interface being used if any An interface is a device that connects between your PC and the target hardware If you simply have a serial cable or USB to serial cable connecting your COM port to the target hardware then you can choose None ISP Choosing the correct interface will automatically configure Flash Magic for that interface along with enabling and disabling the relevant features Join the Technical Community Today http www pantechsolutions net 2 1 5 Oscillator Frequency Enter the oscillator frequency used on the hardware Do not round the frequency instead enter it as precisely as possible Some devices do not require the oscillator frequency to be entered so this field will not be displayed Once the options are set ensure the device is running the on chip Boot loader if you are using a manual ISP entry method Note that the connection settings affect all ISP features provided by Flash Magic 2 2 Step 2 Erasing This step is optional however if you attempt to program the device without first erasing at least one Flash block then Flash Magic will warn you and ask you if you are sure you want t
19. from the ISP menu Join the Technical Community Today http www pantechsolutions net You will be presented with the following dialog window K Hex File D kavihalKeNLPCZT2LPC2I2ahek Browse Cancel Venty Select a Hex File to verify either by entering the path to the file of clicking on the Browse button and choosing it If checksums were used when the device was programmed then check the option to ignore checksum locations as they will be different in memory to any reserved checksum locations stored in the Hex file Click on the Verify button to start verification Progress information is shown at the bottom of the window Join the Technical Community Today http www pantechsolutions net 3 9 Reset and Execute Selecting the Reset item on the ISP menu will cause a reset command to be sent to the device Depending on the hardware and the status byte the device is either reset to the execute code or reset to the Boot loader If the Reset command is sent after successfully programming the device then the reset will execute the downloaded code If the Reset command is sent after erasing the device then the device will reset to the Boot loader Selecting the Execute item on the ISP menu will cause Flash Magic to program the Boot Vector to the default and the Status Byte to zero for devices that have this feature followed by sending a reset command to the dev
20. g a special boot loader update hex file supplied by NXP Semiconductors Flash Magic supports these hex files If the currently selected device supports this feature then Update Boot loader on the ISP menu will be enabled Choosing the menu item displays the dialog window Update Bootloader Only use bootloader update hex files from Philips Semiconductors that are marked as compatible with this feature Failure to do so could render your device unusable Bootloader Update Hex File C Ahexfles B9LV51 AD 2B ootloader pdate hex Browse Simply select the boot loader update hex file by entering the path to the file or clicking on the Browse button to select it Click on Update to start the update process Join the Technical Community Today http www pantechsolutions net Status information will be shown at the bottom of the dialog window Once complete Flash Magic will indicate that the boot loader was updated or the reason why the update failed Only use special boot loader update hex files supplied by NXP Semiconductors that are created for this feature Do not interrupt the power supply or reset the device during the update Failure to follow these warnings may result in a device that no longer has a functional boot loader 3 18 Additional Security Bits Some devices support additional security bits that are not related to specific section of Flash memory If the selected device has this feature then
21. ice This will force any downloaded code to be executed Join the Technical Community Today http www pantechsolutions net 3 10 Start Boot loader Description The Start Boot loader feature allows a textual command or break condition to be sent to the device to place it into Boot loader mode In order for this to work however it must be supported by the user s application or the device For textual commands the user s application must watch the UART for the command to be received Once received the application must echo back the command and a single full stop then use In Application Programming to program the Boot Vector to the default and the Status Bit Byte to non zero and then reset the device Once the device completes the reset the Boot loader will be executed allowing the device to be reprogrammed Join the Technical Community Today http www pantechsolutions net If a break condition is sent then Flash Magic does not expect the break condition to be echoed back and assumes the device has been placed in Boot loader mode Choosing Start Boot loader from the ISP menu accesses the Start Boot loader feature The following dialog window will be displayed Start BootROM ae x Send Command Start BootROk Command boot Baud Aate 9600 Append to Command f Nothing Carriage Return ASCI 13 Line Feed ASCII 10 i Carriage Return followed by Line Feed
22. in the text box or clicking on the Browse button and browsing to a folder Finally click on the Save button to start save Progress information on the save will be shown at the bottom of the window Join the Technical Community Today http www pantechsolutions net 3 2 Blank Check Choose Blank Check from the ISP menu to perform a blank check on all the Flash blocks present on the device Blank Check Not blank 1 Ox001000 04001FFF Blank 2 0x002000 0x002FFF Blank 3 0x003000 0x003FFF Blank 4 0x004000 0x004FFF Blank Mark non blank blocks to be erased Close Once complete the Blank Check window will look something like the following e The status column indicates if a block is blank or not Join the Technical Community Today http www pantechsolutions net Checking the option to Mark non blank blocks to be erased will have the effect of checking the relevant items in the Erase section of the main window For example if Block O is not blank then checking the Mark option will result in Block O in the Erase section of the main window being checked 3 3 Reading the Security Settings When Flash Magic is first started it will attempt to read the security bits of any device that is connected to the specified COM Port aiid Bits ES Join the Technical Community Today http www pantechsolutions net If no device is connected then you may connect a device and choo
23. irectives S Erase black F O 005000 0 005F FF 4 st Erase all Flash Code Ad Prot Ext Erase blocks used by Hex File The Options menu allows access to the advanced options and includes an item to reset all options COM Port COM 1 Baud Rate 9600 Device BV51RD2 Join the Technical Community Today http www pantechsolutions net The ISP menu provides access to the less commonly used ISP features T Flash Magic NON PRODUCTION USE ONLY i Options Tools Help Blank Check Read Security Step 2 Erase Read Device Signature Erase block 0 0x000000 0 000FFF Book vector and Status Byte Erase block 1 0001 000 0007 FFF Q Disolay M Erase block 2 O 002000 02002F FF i ENE i Erase block 3 Ox003000 0 003FFF Erase Flash Erase block 4 0 004000 02004F FF Erase Flash Pages Erase block 5 O 005000 02005F FF rase Flash Pages i veri Erase all Flash Code Ad Prot gt oe Iv Erase blocks used by Hex File Execute Reset He Start Bootloader Read Clocks E Device Configuration a i y Cyclic Redundancy Check M Vif Read MISR L Serial Number Enable SoftICE Additional Security Bits Update Bootloader EEPROM Join the Technical Community Today http www pantechsolutions net The Tools menu provides features that support the operation and use of Flash Magic Flash Magic NON PRODUCTION USE ONLY File ISP Options M
24. llow Flash Magic to control the reset and ISP entry of the device The following simplified circuit diagram for an 89XX is one possible way of connecting the DTR and RTS signals to RST of the device When the COM Port is not in use or the serial cable is not connected the RS232 signals are pulled low by the transceiver This results in the TTL signals being high Therefore when the TTL DTR and RTS signals are high RST must be in a state that allows the device to reset normally and execute code Join the Technical Community Today http www pantechsolutions net By checking the option to assert RTS while the COM Port is open the RTS signal will remain asserted while the ISP operation is performed This allows hardware to be designed that can reset or reconfigure hardware for an ISP Operation 4 5 Protect ISP Some devices contain the ISP code which allows Flash Magic to communicate with the device in the main Flash memory This means that it is possible to erase or corrupt the ISP code Once erased or corrupted ISP operations can no longer be performed and the device would have to be physically removed from the hardware Join the Technical Community Today http www pantechsolutions net In order to stop the ISP code from being accidentally erased the Protect ISP option is provided When checked Flash Magic will modify erase and programming operations such that the ISP code is not erased or corrupted For exampl
25. mmunity Today http www pantechsolutions net Once started the progress information and a progress bar will be displayed at the bottom of the main window In addition the Start button will change to a cancel button Click on the cancel button to cancel the operation Note that if you cancel during erasing all the Flash it may take a few seconds before the operation is cancelled Once the operations have finished the progress information will briefly show the message Finished The Programmed Count shown next to the progress bar will increment This shows the total number of times the hex file has been programmed Modifying the hex file or selecting another hex file will reset the count Alternatively right clicking over the count provides a menu with the option to immediately reset the count Join the Technical Community Today http www pantechsolutions net 3 Additional ISP Features 3 1 Saving a Hex File Once connected choosing Save As from the File menu opens the Hex File save window It is possible to save a section of Flash memory to a Hex File Enter the start address and the end address inclusive that you wish to save Note that the start and end addresses do not have to correspond to a Flash block If desired you can save a single memory location by entering it as both the start and end address Next select the location and name of the Hex file to save by either entering a path
26. nents and much more Our goal is to make finding the parts and information you need easier and affordable so you can create awesome projects and training from Basic to Cutting edge technology Join the Technical Community Today http www pantechsolutions net
27. o program the device Join the Technical Community Today http www pantechsolutions net Erase all Flash jf Erase blocks used by Hex File e Select each Flash block that you wish to erase by clicking on its name e If you wish to erase all the Flash then check that option e If you want to check to erase a Flash block and all the Flash then the Flash block will not be individually erased e If you wish to erase only the Flash blocks used by the hex file you are going to select then check that option Join the Technical Community Today http www pantechsolutions net For most devices erasing all the Flash also results in the Boot Vector and Status Byte being set to default values which ensure that the Boot loader will be executed on reset regardless of the state of the PSEN pin or other hardware requirements Only when programming a Hex File has been completed will the Status Byte be set to OOH to allow the code to execute This is a safeguard against accidentally attempting to execute when the Flash is erased On some devices erasing all the Flash will also erase the security bits This will be indicated by the text next to the Erase all Flash option On some devices erasing all the Flash will also erase the speed setting of the device the number of clocks per cycle setting it back to the default This will be indicated by the text next to the Erase all Flash option Join the Technical Communit
28. re 3 11 Erase Pages Some devices allow the flash to be erased in pages If this feature is supported by the device then the Erase Flash Pages item on the ISP menu will be enabled Erase Pages Erase page 0 Ox0000 0003F Erase page 1 00040 0400 7F ase page 2 00080 0006 F Erase page 3 Ox00C0 0 00FF Erase page 4 0 0700 0 01 SF Erase page 5 0x01 40 0201 F Erase page 6 0x01 80 0201 BF Erase page 7 0x01 C0 Os0O1FEI Erase page 9 0s020p 0s023F1 Erase page 9 00240 002 7F Erase paoe 10 00280 00 25F1 d Clase Erase SS Select the pages to erase and click on the Erase button to erase them Join the Technical Community Today http www pantechsolutions net 3 12 Device Configuration Some devices allow configuration via ISP If the selected device supports this feature then the Device Configuration item on the ISP menu will be enabled When selected the current configuration will be read from the device and displayed in the configuration dialog window The configuration may then be changed and by clicking on Reprogram the new configuration will be programmed into the device eat k Pah Bien cc LPC 2 iku UCFGI v Enable Watchdog Enable Reset Pin M Enable Watchdog Safety Enable Brownout Detection Clock Medium Frequency Crystal Resonator 1 UkHz 4MHz J Cancel reo Join the Technical Community Today http www pantechsolutions net
29. se Read Security from the ISP menu The security settings will be read and the following window opened e If a security bit is set then it will be highlighted 3 4 Reading the Device Signature The device signature is comprised of two or three bytes that identify the device or a single 32 bit value To read the device signature choose Read Device Signature from the ISP menu J Device ID Ox 336955267 Bootloader Wer 1 70 Close Join the Technical Community Today http www pantechsolutions net The signature will be read and the following window will open showing the three bytes e A manufacturer ID of 15H corresponds to NXP Semiconductors e Some devices will also display the boot loader version in this window 3 5 Modifying the Boot Vector and Status Byte The Status Byte indicates how the device will operate after a reset A value of OOH will result in the device checking the PSEN pin to determine whether it should run the Boot loader or the user application Any other value will result in the device running the Boot loader The Boot Vector contains the page that the Boot loader or user boot loader starts at The default varies depending on the device but as an example FCH corresponds to the address FCOOH for 8051 non LPC devices and F8H corresponds to the address F800H for the XA devices Join the Technical Community Today http www pantechsolutions net Once programming is
30. select each of the Hex files programmed into the device Each Hex file will appear in the list at the bottom of the window To remove a Hex file from the list select it in the list and click on the Remove button Click on the Calculate MISR button to calculate the MISR values for each block and the whole device as if the chosen Hex files were programmed into the device These values will appear in the Hex Files MISR column If the contents of the device exactly match the contents of the chosen Hex files then the MISR values on each row of the table will match Join the Technical Community Today http www pantechsolutions net 3 15 Go Some devices support executing from specific addresses in flash or RAM and using specific options or modes for example the ARM devices To perform a Go operation and start execution choose Go from the ISP menu Enter the address to start execution from and choose the mode to execute in Click on Go to start execution 3 16 Serial Number Some devices provide a serial number feature which protects access to the device via ISP If a serial number is supplied to the device then on the next reset the device will block most ISP operations until it is unlocked by supplying the correct serial number The serial number may be reset being erased stopping unauthorized access to the code Join the Technical Community Today http www pantechsolutions net Check the devic
31. start the application If you wish to reset the options to the original defaults then choose Reset from the Options menu Join the Technical Community Today http www pantechsolutions net 2 Five Step Programming For each step there is a corresponding section in the main window as described in the User Interface Tour 2 1 Step 1 Connection Settings Before the device can be used the settings required to make a connection must be specified Step 1 Communications COM Port COM1 Baud Aate a00 Device jeveIRD2 Intertace None SP Join the Technical Community Today http www pantechsolutions net 2 1 1 COM Port Settings Select the desired COM port from the drop down list or type the desired COM port directly into the box If you enter the COM port yourself then you must enter it in one of the following formats e COM n en Any other format will generate an error So if you want to use COM 1 which is not present on the drop down list you can directly type in either COM 1 or 1 2 1 2 Baud Rate Settings Select the baud rate to connect at Try a low speed first The maximum speed that can be used depends on the crystal frequency on your hardware You can try connecting at higher and higher speeds until connections fail Then you have found the highest baud rate to connect at Join the Technical Community Today http www pantechsolutions net Alternatively some devic
32. starting at the address given at the start of the line If a line contains question marks then data has not yet been read in for those locations The memory is read in the background allowing viewing of the memory that has been loaded in without having to wait for all of it to be read At any time a new range may be selected or the window closed Each line shows the 16 bytes of data first in hexadecimal format then in ASCII format For characters that are not printable a period is displayed instead 3 7 Erasing Flash There are two ways Flash can be erased Either as part of the five step process described earlier in this manual or without performing any other ISP operations by choosing Erase Flash from the ISP menu Join the Technical Community Today http www pantechsolutions net The Erase Flash window will be opened Its operation is identical to the erase section in the main window Once settings have been chosen click on the Erase button to erase Erase Flash HSER black 4 0r00a000 0 009FFF aa block 5 Ox004000 0 008 FFF Erase block 6 Ox00CO00 0 00DFFF Select ang 5 Erase block 7 000E 000 0s00FFFF Erase all Flash Code Ad Prot Erase blocks used by Hex File Close Erase Progress information is displayed at the bottom of the window 3 8 Verifying a Hex File A Hex File can be verified without programming it into the device first To access the verify feature choose Verify
33. the Additional Security Bits option on the ISP menu will be available Choosing the option will display a dialog window showing the additional security bits for that device Join the Technical Community Today http www pantechsolutions net When the window is opened the current settings for the security bits will be read from the device and displayed in the window Checking a security bit will set that bit Un checking a security bit will attempt to unset it Note that setting these security bits may have significant repercussions on the functionality of the device It is strongly recommended to consult the data sheet or user manual and understand the functionality of these bits before setting them 4 Advanced Options 4 1 High Speed Communications Some devices feature the ability to switch from the initial baud rate to a high speed communications mode allowing speeds higher than the auto baud method in the Boot loader would be able to accurately measure Join the Technical Community Today http www pantechsolutions net Flash Magic will calculate the highest possible baud rate that may be used by both the device and the PC COM Port and automatically switch to it after connecting at the initial baud rate specified in the main window If you experience problems with this feature then try limiting how fast the high speed communications mode can go Select the maximum speed from the drop down list If in doubt sel
34. ure is the ability to view the contents of memory Choosing Display Memory from the ISP menu accesses this feature Memory is shown one block at a time The block being displayed may be selected from the drop down list at the bottom of the Display Memory window Display Memory 00000000 1SFOSFESISFOSFESISFOSFESISFOSFES 00000010 1S8FO9SFESSOSFZ0B9FOFFIFESISFOSFES oo00000z0 40000000CC0z20000C80z20000C4020000 amp 00000030 CoOozo000000000000BC0zZ0000B8020000 00000040 BOOOSFESAALOADESSSZ0A0E3Z430A0E3 O00000S0 O43080ESO1LS0A0E3003080ESOC1LOSOES 00000060 OCZ080ESO83090ESO1L3SBISEZFCFFFFOA 00000070 OS30A0E3003080ESOCLOSOESOCZ0S8S0ES5 00000080 74009FES0410A0E3041080ES021040E3 00000090 OOLOSOES64009FESDBFOZ1LESOODOAOE 00000040 O40040E2D7F0Z1E300D0A0E1040040E2 OOOOOOBO DP1LFOZLESOODOADELO40040E2D2F0Z21E3 oo00000CO CODOADE1LSO0040EZD3F0Z1E300D0A0E1 OOO00ODO O40040EZ2Z10FOZ1ESOODOADELZOOO9SFES OOOOOOEO OLOOLOESLCEOSFOSICEOSFIS1LOFFZFE1L OOOOOOFO FEFFFFEAFEE CO4680CO1FEOOOCO1LFEO 00000100 300400400S0z20000F0000000FS000000 00000110 ODZ0414E31203D202564202020202041 ta Ca eae 000000000 mi Fllurassed Flach paaa I Gen block checksums OxO00006000 Ox00007FFF Im TERECE 000008000 0x00009FFF 0x00004000 0 00008 FFF Did you read the article Using Flash Memof 9x0000C000 Ox0000DFFF Ox0000E000 Ox0000FFFF Join the Technical Community Today http www pantechsolutions net Each line shows 16 bytes of data
35. y Today http www pantechsolutions net 2 3 Step 3 Selecting the Hex File This step is optional If you do not wish to program a Hex File then do not select one Step 3 Hex File Hex File D PANTECH KEILAKEIL hed Browse Modified Unknown more into You can either enter a path name in the text box or click on the Browse button to select a Hex File by browsing to it Also you can choose Open from the File menu Note that the Hex file is not loaded or cached in any way This means that if the Hex File is modified you do not have to reselect it in Flash Magic Every time the Hex File is programmed it is first re read from the location specified in the main window Join the Technical Community Today http www pantechsolutions net The date the Hex file was last modified is shown in this section This information is updated whenever the hex file is modified The hex file does not need to be reselected Clicking on more info or choosing Information from the File menu will display additional information about the Hex file The information includes the range of Flash memory used by the Hex file the number of bytes of Flash memory used and the percentage of the currently selected device that will be filled by programming the Hex file If the device supports programming and execution from RAM for example the ARM devices then the hex file may contain records for the RAM First the

Download Pdf Manuals

image

Related Search

Related Contents

quantifier les faits langagiers - Lexicometrica  LSP-Bー 取扱説明書 sps エス・デ~イ  HART® Transmitter Calibration  NX-4V2 LED Keypad User Manual  Danses de toutes les Bretagnes  Be Waterwise for businesses and organisations  講演資料ダウンロード - IPA 独立行政法人 情報処理推進機構  S125 USER MANUAL    取り扱い説明書  

Copyright © All rights reserved.
Failed to retrieve file