Author Topic: LPC1768H and FlashMagic  (Read 6887 times)

bikebogota

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
LPC1768H and FlashMagic
« on: May 17, 2011, 07:49:52 am »
Hello,

I have a LPC1768H (blueboard), it has a usb port and a JTAG port. Currently I flash through JTAG and a openOCD usb dongle. With a sec bootloader, the LPC1768H could be seen as an external storage device, without it, the PC does not detect any device.
My OpenOCD dongle allows me to communicate my PC to the UART0 in the blueboard, so I have used UART (through TeraTerm) in code that uses the UART0.

My questions are:

- With FlashMagic, do I still need my OpenOCD-usb dongle?
- Should my LPC1768H appear as a new device with its own COM port?
- Do I need a USB_to_RS232 cable (my current dongle does it)?
- Is there any more detailed guide than the FlashMagic users guide?

Thanks

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC1768H and FlashMagic
« Reply #1 on: May 18, 2011, 01:37:47 am »
We have never used an openOCD dongle so unfortunately we cannot answer your questions, except to suggest you give it a try. Many USB devices when connected add a virtual COM port to the PC, which you can see in Device Manager. Open it and look at your COM ports then connect the dongle and see what is added. Flash Magic needs a COM port (virtual or real).

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com

bikebogota

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
Re: LPC1768H and FlashMagic
« Reply #2 on: May 18, 2011, 07:53:21 am »
Hello again,

Thanks for your reply. Im sorry I have to asks some new questions, since In the product site: http://shop.ngxtechnologies.com/product_info.php?products_id=65, all they say is it supports ISP and: "ISP programming: Programming through the on chip boot loader using UART interface and Flash Magic":

- FlashMagic uses the UART to flash my target, but do I need to pre-load any program to my target, so the UART is possible?
- There is no circuit example in the FlashMAgic user guide, so how to the hardware? USB-to-RS232 converter and then 2 cables to UART0? or 4 cables to UART0 and BSL and RTS?
- I am using a USB-to-RS232 cable, I connect the target as said here: http://www.flashmagictool.com/assets/resources/PoUSB12LPCProg.pdf, I reset the board and push a switch called "ISP" (I guessed that, I haven't found any guide), then when I open the FlashMagic terminal tool, I get rubish in the reply... is that correct? I have tried all baudrates.
- FlashMagic answers "failed to autobaud". What is missing?

Thanks for your answers

« Last Edit: May 18, 2011, 09:07:11 am by bikebogota »

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2172
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: LPC1768H and FlashMagic
« Reply #3 on: May 18, 2011, 09:22:03 am »
No, the device contains the UART-based bootloader, however you need to ensure it is started. That is typically achieved by pressing a button and holding it down while resetting the device.

The board should come with a schematic diagram and what is what you should refer to. Whether the board supports DTR and RTS depends on the design - consult the schematic diagram.

Once connected in a terminal program such as Hyperterminal, send a single '?' and you should get "Synchronized" back. This is all documented in the user manual from NXP. If you can't get that to work then Flash Magic won't work either.

Andy
Embedded Systems Academy, Inc.
support at esacademy dot com