Author Topic: Urgent: Flashmagic for LPC936 (more inside)  (Read 3692 times)

Bonny Gijzen

  • Guest
Urgent: Flashmagic for LPC936 (more inside)
« on: October 18, 2005, 11:50:53 pm »
Hi guys,


First of all, thank you for maintaining Flashmagic.
It is a nice and easy product. (I have used it for P89LV51RD2)

Recently we started to use the LPC936 mcu, which I really love! (I am 8051 programmer for some years now.)
This week I received our circuit boards with LPC936 mounted on it and was trying to program them using the hardware ISP method.

Using my hardware layout and latest Flashmagic I am *NOT* able to get the LPC936 in bootloader mode.
It seems Flashmagic always needs one of the 2 supported programmers (KEIL or CEIBO), and cannot control reset of the mcu directly.

Now, using a quick test I did I am able to get the LPC936 in bootloader mode by toggling the reset pin as the datasheet explains.
The reset pin of the mcu is connected to the RTS signal using just a MAX232 as level converter, nothing more.

I had hoped that if using my own tool I could get the LPC936 in bootloader mode, that I could continue programming the device using Flashmagic.
Unfortunately, this doesnt work. It seems that Flashmagic always wants to do some sort of reset/bootloader start thingy by itself prior to programming ...

I see 2 possible solutions:

1) Some way to let Flashmagic know that it can send programming commands immediately, without worrying about getting the MCU in bootloader mode.

or (and this one I would prefer)

2) Add a 3rd programmer option to Flashmagic, that it is able to control the RTS (=reset) signal directly. This will probably not work on slow pc's because of the 32us max limit, but will for sure work on the majority of pc's.


Now, is the Flashmagic support team willing to help me with one of these issues?

Please, atleast respond and comment to this, because it is urgent for me.
If I dont get Flashmagic to work then I need to write a programmer tool myself, which I can easily do (I am author of www.ic-prog.com) but it would simply be a waste of time if I could get Flashmagic to work.


Many regards,

Bonny.

PS. For stability reasons I do not want to enable the uart break option. Some sort of glitch on the communications bus could put devices in bootloader mode, which is unacceptable imho.

Bonny Gijzen

  • Guest
Re: Urgent: Flashmagic for LPC936 (more inside)
« Reply #1 on: October 19, 2005, 12:43:30 am »
Hi,


After some measuring, I found out that Flashmagic always seems to toggle RTS/DTR, regardless of the setting "Use DTR and RTS to enter ISP mode"

I dont know if this is correct behaviour or not, but if you could make some option so that Flashmagic would leave RTS/DTR alone, then I would be happy already.


Thank you,

Bonny

Andy Ayre

  • ESAcademy Staff
  • Sr. Member
  • *****
  • Posts: 2178
    • View Profile
    • Embedded Systems Academy, Inc.
    • Email
Re: Urgent: Flashmagic for LPC936 (more inside)
« Reply #2 on: October 19, 2005, 08:38:19 am »
Because Flash Magic needs to work reliably and on all PCs, we decided that it was not possible to guarantee correct generation of such tight timing requirements for the reset pin pulses. Therefore in collaboration with Philips and Keil, the circuit that is implemented on the MCB900 was developed. This have proven to be a reliable solution.

To disable any kind of DTR and RTS functionality, uncheck use DTR and RTS to enter ISP mode. However, when a COM port is opened the COM port hardware changes the voltage levels of DTR and RTS, so this is probably the cause of the toggling you see.

You might want to consider experimenting with the command line version of Flash Magic. The HARDWARE direction provides a bit more control over DTR and RTS than is available in the Windows user interface.

Embedded Systems Academy, Inc.
support at esacademy dot com