(Created page with "category: LPC2148 Tutorials =Objective= In this tutorial, we will be discussing how to upload the .hex and .bin files to Lpc1768 board.<br> For flashing the hex files, we...")
 
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
=Objective=
 
=Objective=
 
In this tutorial, we will be discussing how to upload the .hex and .bin files to Lpc1768 board.<br>
 
In this tutorial, we will be discussing how to upload the .hex and .bin files to Lpc1768 board.<br>
For flashing the hex files, we will be using the flash magic software along with a Usb to Serial converter.<br> To upload the .bin, no external hardware is required but  board should have the secondary boot loader.<br><br><br>
+
For flashing the hex files, we will be using the flash magic software along with a Usb to Serial converter.<br><br><br>
  
<font size="3" color="red">The board is shipped with USB bootloader. If you want to use it directly follow the steps on how to flash the bin file.</font>
+
<font size="3" color="red">The board is shipped with USB bootloader. If you want to use it directly check [[LPC2148: Uploading .bin file|this tutorial]].</font>
 
'
 
'
  
 
=Generating .hex File=
 
=Generating .hex File=
Check the tutoial [[LPC1768: Keil Project For Hex File|LPC1768 Keil Setup]]  for generating the .hex file using keil.<br><br><br>
+
Check the tutoial [[LPC2148 Keil Setup for .hex file|LPC2148 Keil Setup]]  for generating the .hex file using keil.<br><br><br>
  
 
=.Hex Using Flash Magic=
 
=.Hex Using Flash Magic=
 
You need a USB to Serial(UART) converter in order to get this working. The neat thing about the NXP controllers is, they come with a UART bootloader from the factory.
 
You need a USB to Serial(UART) converter in order to get this working. The neat thing about the NXP controllers is, they come with a UART bootloader from the factory.
[[File:FlashMagicConnection.jpg|x400px]]
+
[[File:LPC2148FlashMagicConnection.jpg]]
 
<br><br>
 
<br><br>
  
Line 33: Line 33:
 
#Once the hex file is flashed, Reset the board. Now the controller should run your application code.<br><br>
 
#Once the hex file is flashed, Reset the board. Now the controller should run your application code.<br><br>
  
[[File:0_Lpc1768FlashMagic.jpg|x400px]]
+
[[File:0_Lpc2148FlashMagic.jpg]]
<br><br><br>
+
<br><br>
----
+
=Generating .bin File=
+
Check this tutoial [[LPC1768: Keil Project For Bin File|LPC1768 Keil Setup]]  for generating the .bin file using keil.<br><br><br>
+
 
+
=.Bin File Using Secondary Boot Loader=
+
For uploading the .bin file, secondary(USB) boot-loader needs to be flashed to the controller. Even though we put a USB bootloader, the serial bootloader will be still present to flash the hex files using Flash Magic.
+
 
+
Follow the below steps to upload the new .bin file to LPC1768 board:
+
#Connect the USB Jumpers.
+
#Connect the ExploreLpc2148 to the system using a USB cable.
+
#Hold the USB_Btlr switch.
+
#Press the Reset Switch.
+
#Release the Reset Switch.
+
#Release the USB_Btlr switch.
+
#Now the board will be detected as Explore2148
+
#Delete the old firmware.bin file.
+
#Paste the new .bin file.
+
#Reset the Board.
+
#Now your Application code should be running on the board.<br><br>
+
 
+
[[File:LPc1768_UsbBootLoader.jpg|x400px]]
+
<br><br><br>
+
  
 
Have an opinion, suggestion , question or feedback about the article let it out here!
 
Have an opinion, suggestion , question or feedback about the article let it out here!
 
{{DISQUS}}
 
{{DISQUS}}

Latest revision as of 15:55, 18 July 2016

Objective

In this tutorial, we will be discussing how to upload the .hex and .bin files to Lpc1768 board.
For flashing the hex files, we will be using the flash magic software along with a Usb to Serial converter.


The board is shipped with USB bootloader. If you want to use it directly check this tutorial. '

Generating .hex File

Check the tutoial LPC2148 Keil Setup for generating the .hex file using keil.


.Hex Using Flash Magic

You need a USB to Serial(UART) converter in order to get this working. The neat thing about the NXP controllers is, they come with a UART bootloader from the factory. LPC2148FlashMagicConnection.jpg

Lpc1768 Usb2Serial.jpg


Note: If your converter does not have DTR and RTS lines, "hold down the ISP/PRI_BLD switch, RESET the board(press and release reset switch) and then release the ISP switch ". Now the Boot Controller will be in ISP/PRI_BLD mode and you can flash the hex file using flash magic.

Now open the flash magic software and follow the below steps.

  1. Select the IC from Select Menu.
  2. Select the COM Port. Check the device manager for detected Com port.
  3. Select Baud rate from 9600-115200
  4. Select None Isp Option.
  5. Oscillator Freq 12.000000(12Mhz).
  6. Check the Erase blocks used by Hex file option
  7. Browse and Select the hex file.
  8. Check the Verify After Programming Option.
  9. If DTR and RTS are used then go to Options->Advanced Options-> Hardware Config and select the Use DTR and RTS Option.
  10. Hit the Start Button to flash the hex file.
  11. Once the hex file is flashed, Reset the board. Now the controller should run your application code.

0 Lpc2148FlashMagic.jpg

Have an opinion, suggestion , question or feedback about the article let it out here!