Flash Magic Forum

In-System Programming Support => LPC9xx/LPC9xxx => Topic started by: rbtamd on May 12, 2007, 08:40:44 AM

Title: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 12, 2007, 08:40:44 AM
Hi folks,

I was using flash magic 3.50 and It works good. I installed the latest version (3.59.227) and it can communicate with my system. I am using the same settings. I try to connect via hyperterminal, sending the "U" char and the boot loader echoes it. Is this a bug in this version of flash magic?

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 12, 2007, 02:53:51 PM
Please generate a debug file and send it to me. The steps are here:

  http://www.flashmagictool.com/debugfile.html

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 14, 2007, 01:30:20 PM
Andy, I send you the debug file.

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 15, 2007, 09:25:45 AM
I haven't received anything. Make sure you are sending to support at esacademy dot com.

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 15, 2007, 02:28:49 PM
I don´t know why, any way I send it again.

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 16, 2007, 10:26:22 AM
Got it. The device is not echoing the 'U' back to FM.

How are you placing the device into ISP mode? Flash Magic isn't doing it so you must be doing it manually somehow. Which method are you using?

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 16, 2007, 01:54:28 PM
I´m using no touch to place it in ISP. My condotion is tie the P1.4 to ground. I have a led indication and it is ok. If I use on the same PC hyperterminal I can see the ´U´char. It seems like flash magic doesn´t see the com port. I have the same com port settings.

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 16, 2007, 08:45:49 PM
It appears to me that when you use Flash Magic the device is not going into ISP mode. Are you sure that DTR and RTS from the COM port are not connected to either RST or VDD in some way? If you are using your own entry method such as No Touch you have to ensure that nothing else can cause the device to be reset.

If you are using an MCB900 board then I think you will need to remove the pins for DTR and RTS in your cable or cut some tracks. Note that the logic levels on DTR and RTS always change when a COM port is open (default Windows behaviour), even if you have the option to control DTR and RTS disabled in Flash Magic.

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 17, 2007, 06:42:59 AM
I´m using MCB900 board and it worked good before I installed this version. I don´t know why but if I use DTR and RTS to enter in isp mode flashmagic works good. But with no touch doesn´t work. My confusion is because this no touch was working and I don´t have made any changes. I think the device is in ISP because when I use my version of no touch if I send a "U" via hyperterminal the device returns me "U" and the program have a led indication.

Thanks
Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 17, 2007, 08:45:38 AM
If enabling DTR and RTS in Flash Magic works and disabling it doesn't work, then that tells me the device is not being placed into ISP mode by the no touch method.

Put a scope on VDD and RST and check that when Flash Magic opens the COM Port it is not altering the state of RST or the power supply pin.

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 17, 2007, 09:41:03 AM
I put the scope in VDD and RST, and they are Ok in any case. 
I made another test with the scope and found the following: when I check "Use DTR and RTS to enter in ISP mode" I see the signal in the TX pin of the serial port at the pc side. When is unchecked I don´t see anything on the TX pin. This test was made with MCB900 unplugged. I think that this could be a bug in this version.

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 18, 2007, 07:11:10 AM
I must to correct my last post. I made a cross rs232 cable to test and Flash Magic allways send the "U" char. Sorry it was a mistake, I´ll continue testing.

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 18, 2007, 07:55:00 AM
I think the problem is DTR signal. When "Use DTR and RTS to enter ISP mode" is unchecked Flash Magic still driving DTR when send data, it disable the max3221, an the controller doesn´t see any data. I cut the DTR line and it is Ok, but I think the old version doesn´t drive DTR signal when "Use..." is unchecked.

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 18, 2007, 08:52:01 AM
Recently we made sure that when the COM port is opened both DTR and RTS are unasserted. This was to fix a problem - I guess on some PCs the state of DTR could be different than the norm. By default DTR and RTS should always be set to the unasserted state by Windows when a COM port is opened (if handshaking is disabled), and Flash Magic now ensures this.

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 18, 2007, 09:14:04 AM
I think handshking isn´t disable and this maybe the problem.

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 18, 2007, 09:30:15 AM
Flash Magic configures the COM port to disable handshaking, otherwise it wouldn't be able to control DTR and RTS.

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 18, 2007, 10:02:19 AM
It´s ok, but when "Use..." is unchecked there is no reason to use DTR. In this case, Flash Magic must control DTR and leave it asserted to permit max3221 be enabled in the MCB900 circuit.

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 21, 2007, 11:13:33 AM
The MCB900 is designed to use DTR and RTS to control RST and VDD. I would say that any other use w.r.t. ISP entry will require you to modify the circuit because you are no longer using it in the intended way.

Andy
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: rbtamd on May 21, 2007, 01:01:39 PM
Why the difference between the versions? FM 3.50 holds DTR, why 3.59 doesn´t?

Thanks

Roberto
Title: Re: Flash Magic 3.59.227 can´t communicate
Post by: Andy Ayre on May 21, 2007, 01:18:42 PM
Version 3.50 lets DTR stay at the default level that Windows sets it to. Version 3.59 explicitly deasserts DTR when the COM port is opened. This is part of a workaround we had to implement to get around a bug in the DTR and RTS handling in the Windows USB COM port driver.

As more and more people are resorting to using USB to RS232 cables it is important that DTR and RTS function correctly, despite a bug in the Windows implementation of the COM port driver used for these cables.

Andy