LPCreFlash is a free, versatile tool for programming hex files into boards containing LPC series ARM chips from NXP. It uses the chips' native ISP protocol, and is an alterative to FlashMagic.
Standard Features
The LPCreFlash program, in end-user mode, is designed for people who have a piece of equipment containing a controller with an "LPC" microcontroller chip, and who need to update the program (firmware) in their controller. A typical scenario is that you bought a product containing the LPC-based controller, and the manufacturer of that product has advised you to update your firmware. Very likely they have emailed you new firmware, or you have downloaded an update from the manufacturer's website. For power users, Advanced modes are also available.
Once the required file is in your computer, it has to be transferred to the controller board and the LPC chip. That is what the LPCreFlash program is for.
Getting further support
This program was written by SPLat Controls. We make controller boards that contain LPC chips, and made this program primarily to support our own customers.
The controller board in your product may or may not have been made by us. We sell controllers to a large number of equipment makers, who use them in their products. However, we have also made this program available to the general community, so it is quite possible that you are updating a board that we have had nothing to do with. Therefore, if you need any personal assistance please contact whoever sold you the controller, be it as a board or as part of another piece of equipment.
End User Mode - General description
Important notes:
- Use this program only if you have been advised by the controller/equipment supplier to use it with the controller your are about to update.
- This instructions on this help page should be used to supplement instructions provided to you by your equipment supplier.
File selection
The firmware program you will need to update your controller is contained in a file. This file will have been provided to you by the maker of the controller or of the equipment that uses the controller. Suitable files have the filename extension .hex. With this kind of work it pays to configure Windows to show filename extensions.
If you got to this program by double-clicking a .hex file, the file name will be visible in the filename box on the "Load file" window. If you started this program by double-clicking the program icon itself, then you need to located the file now. Click the [...] button and then browse to the file.
Hint: When you download a file off a website, it pays to carefully note where on your computer it is saved, so you can find it again. The desktop is a good place. If you received the file as an email attachment, you will need to save it to disc. The procedure for this depends on your email program.
Cabling
The controller you are going to update needs to be connected to your computer. This required a suitable cable. What kind of cable depends on where your controller came from:
If the controller was made by us (SPLat Controls)
Controllers made by us have a connector for programming. Typically this is a small plastic connector with 4 closely spaced pins set in a single line. The connector will be marked "Coms" (for communications) or "Prog" or "Pgm". The documentation that came with the controller board and/or with product it is embedded in should identify the correct connector. This connector is designed to accept a standard SPLat Controls PC232 programming cable.
The PC232 programming cable has a 4-pin female connector that plugs onto the controller board at one end. At the other end it has a female connector with 9 pins in two rows, known as a DB9S. The DB9S is designed to plug into a "COM port" on your computer. If your computer does not have a COM port, you will also need a "USB to COM" adaptor ... more on this in the next section.
If the controller was not made by us
This may also apply to a custom controller made by us but "embedded" in someone else's equipment.
You will need to refer to the equipment manufacturer's product documentation, or seek help from them, regarding the correct cable to connect the controller to your computer.
COM port selection
The "Select COM port" screen is for telling the program which COM port you will use to communicate with the controller.
This program communicates with the controller, and the LPC chip in the controller, via a "COM port" (also known as a "serial port" or "RS232 port"). Historically PCs were fitted with COM ports. In recent years COM ports have become all but extinct, in favour of USB. However, old fashioned COM/serial is much easier and less expensive to implement, especially in low-volume products, so it persists in many non-consumer applications.
You will know if your computer has a COM port by the presence of a male 9-pin connector. If it lacks one, you will also need a "USB to COM" adaptor. These can be purchased in most computer stores. Unfortunately, not all such adaptors work equally well. We recommend ones that use converter chips made by FTDI. You can shop around for an FTDI-based adaptor, or buy one from us.
Identifying the correct COM port (and associated challenges)
If you are using a USB to COM adaptor, you need to have it plugged into your computer and recognised by the computer before you can make the necessary COM port selection from the drop-down list on the "Select COM port" screen. Use the [Refresh] button next to the list each time you plug or unplug an adaptor.
On rare occasions, LPCreFlash will be unable to use COM ports numbered greater than 16. If your USB to COM adaptor happens to get "mapped" to a higher number, it might get a bit challenging. You will have to "re-map" the adaptor. To do this, go to the Windows Device Manager and locate your adaptor under Ports. You can now right-click the entry for your adaptor, and follow the context menu to re-map it to a port number 16 or less. If there no unassigned COM port number 16 or less, disable one numbered close to but less than 16. You do this by right-clicking on its entry and following the context menu. (Some computers may list a large number of phantom ports, due to a peculiarity in Windows. This is especially prevalent when the computer is using Bluetooth connections.)
Note: It is not inconceivable that a controller could have a USB port on it for reprogramming. If this is the case you must get clear advice from the controller or end-product manufacturer regarding port selection and cabling. There are two ways a controller could have a USB port ... one will work with this program, the other will not.
Connecting
When you go to the Connect screen, the program will start trying to "connect with" the controller, i.e. establish communications with it. At this stage it is assumed that you have:
- Correctly cabled the controller to the computer
- Selected the right COM port
- Powered the controller
- Set the controller into the proper mode to be receptive to this program
Setting the controller to the proper mode
Updating the firmware in an LPC chip can only take place when the chip is in the right mode (or mood!) This is called ISP (In System Programming) mode. In normal operation the chip is never in ISP mode. It has to be forced into it.
There are two possible ways of getting into ISP mode:
- On some controllers there will be a small jumper or configuration link especially for this purpose. Applying power when the jumper is in place forces the chip into ISP mode.
- It is also possible that a controller has a special menu selection or other user selectable way of getting it into ISP mode. This would be the case particularly where the equipment designer did not want end-users opening up the equipment in order to update the firmware.
Please refer to the instructions provided by the equipment maker to determine how to get the controller into ISP mode.
Note: If you have to insert a jumper to get into ISP mode, you must apply power after the jumper is inserted. Also, don't forget to remove the jumper after you have completed the upgrade.
Signatures
The Signatures screen will appear once the program has established communications (connected) with the controller. It is now very nearly ready to do the actual firmware transfer.
The Signatures screen supports a scheme that is proprietary to SPLat Controls, for identifying firmware applications, controller models and LPC chip types. It provides some measure of protection against accidentally "burning" the wrong firmware into a controller. In essence, a signature is kept in the chip and in the .hex file, and the LPCreFlash program checks for a match.
The documentation that came with the product containing the controller will tell you if the SPLat signature convention is followed or not. If it is, you may or may not receive warnings about any compatibility issues. If signatures are not supported, you simply have to be very sure you are burning the right program into the controller.
Note: One comforting aspect of the LPC/ISP system is that even if a totally wrong program is burned into a board, or the burn fails, the board can still respond to ISP and be re-programmed.
Once you are satisfied with the signature comparison, you can click the big red [BURN]button.
Burn screen
The Burn screen displays progress while the file is actually being "burned" into the chip, with some technical information and a progress bar. The burn will take a noticeable amount of time. Do not disconnect anything, attempt to close down LPCreFlash or turn off power while this is happening. You are not likely to actually break anything, but once the burn has started any interruption will render the controller useless until a proper, full burn has been completed.
The program will report the outcome of the burn, including any problems that may arise. If there is a problem, you are advised to try again. If the problem persists you should double-check everything you have done. If that doesn't help, contact the company that sold you the controller.
