EmbeddedRelated.com
Forums

Low level on RESET and P.014

Started by Hard...@allenvanguard.com March 2, 2011
--- In l..., "rtstofer" wrote:
>
> --- In l..., "cfbsoftware1" wrote:
> >
> > --- In l..., "Hardeep Gida" wrote:
> > >
> > > I have tried using the Flash Magic Tool and I keep getting the same
> > > error "Failed to Autobaud". I've gone through the Flash Magic Forum and
> > > tried debugging the possible reasons given, but I continue to get the
> > > same error. The only difference on my board is that I have an FTDI chip
> > > that converts UART to USB. I'm not sure whether this is the problem?
> > >
> >
> > If you can't get FlashMagic to work you have less than 0% chance of ever uploading a file by programming it yourself.
> >
> > Apart from looking in the FlashMagic forum did you try all of the tests listed in App Note 4 "What to do if ISP does not work" on the Resources page?
> >
> > http://www.flashmagictool.com/resources.html
> >
> > We've successfully programmed different commercial LPC2000 development boards via the USB port using RS232 to USB convertor cables, FTDI breakout boards and onboard UART to USB chips, using both FlashMagic and our own ISP upload code so it *should* work.
> >
> > If the FlashMagic tips did not help you need to isolate the problem somehow. I'd suggest a few different experiments:
> >
> > a) Try using a different USB port on your computer
> > b) Try using a different USB cable
> > c) Acquire a commercial LPC2000 development board with a USB programming connector (e.g. one of the low-cost Embedded Artists or Coridium Corp boards) and check whether that works with the rest of your system etc. etc.
> >
> > Regards,
> > Chris
> >
> Has ISP ever worked on that particular chip/board? One thought is that the FTDI chip isn't wired properly. Carefully evaluate which direction Tx and Rx are really going.
>
> Hold the LPC in reset and short the Tx and Rx lines at the FTDI chip. Then use the terminal program in FlashMagic to see if you can loop back characters.
>
> Be careful! You need to hold the LPC in reset in order to prevent conflicts. If you let the chip come out of reset, existing code may cause a pin to conflict with the jumper between Tx and Rx
>
> Richard
>

I use an FTDI chip and it works fine all the time for ISP.

This is to follow up on what Richard said about the Tx and RX Lines being wired correctly.

The Tx on the FTDI goes to the Rx on the LPC.

The RX on the FTDI goes to the TX on the LPC.

If you have TX to TX and RX to RX you will never autobaud.

Also make sure you have good solid connections and a good ground from the FTDI to the LPC. This is especially important if you are using a breadboard.

Then try FlashMagic again.

Report back on your progress.

An Engineer's Guide to the LPC2100 Series

Hello,

"Hardeep Gida" H...@allenvanguard.com wrote:
> I have tried using the Flash Magic Tool and I keep getting the same
> error "Failed to Autobaud". I've gone through the Flash Magic Forum and
> tried debugging the possible reasons given, but I continue to get the
> same error. The only difference on my board is that I have an FTDI chip
> that converts UART to USB. I'm not sure whether this is the problem?
>

We had similar problems with Flashmagic when using an FTDI adapter over an USB hub. Connecting the USB cable directly to the PC solved the problem for us.

Regards,
Stefan

Hi Larry,

Initially we did have TX to TX and RX to RX, however after changing the
wiring, Flash Magic continued to give same error. I know that the FTDI
chip is functioning properly because I can transmit data from my program
to UART0 and see the transmitted data in the hyper terminal. I can also
write data on the hyper terminal and my program can read it.

I had DTR and RTS on the FTDI chip controlling the RST and ISP lines. In
Flash Magic, I chose the option that let it control those lines. I was
able to see these two lines set and reset on the oscilloscope, but I
continued to get the same autobaud error. Can I use the DTR and RTS on
the FTDI chip to control the RST and ISP lines? Or should I use the
CBUS lines?

I haven't tried changing the USB port or the USB cable that I use
because I guess I figured that UART to USB is working.

Thanks.
Hardeep

From: l... [mailto:l...] On Behalf
Of Larry Viesse
Sent: March 16, 2011 2:09 AM
To: l...
Subject: [lpc2000] Re: Low level on RESET and P.014

--- In l... ,
"rtstofer" wrote:
>
> --- In l... ,
"cfbsoftware1" wrote:
> >
> > --- In l... ,
"Hardeep Gida" wrote:
> > >
> > > I have tried using the Flash Magic Tool and I keep getting the
same
> > > error "Failed to Autobaud". I've gone through the Flash Magic
Forum and
> > > tried debugging the possible reasons given, but I continue to get
the
> > > same error. The only difference on my board is that I have an FTDI
chip
> > > that converts UART to USB. I'm not sure whether this is the
problem?
> > >
> >
> > If you can't get FlashMagic to work you have less than 0% chance of
ever uploading a file by programming it yourself.
> >
> > Apart from looking in the FlashMagic forum did you try all of the
tests listed in App Note 4 "What to do if ISP does not work" on the
Resources page?
> >
> > http://www.flashmagictool.com/resources.html
> >
> > We've successfully programmed different commercial LPC2000
development boards via the USB port using RS232 to USB convertor cables,
FTDI breakout boards and onboard UART to USB chips, using both
FlashMagic and our own ISP upload code so it *should* work.
> >
> > If the FlashMagic tips did not help you need to isolate the problem
somehow. I'd suggest a few different experiments:
> >
> > a) Try using a different USB port on your computer
> > b) Try using a different USB cable
> > c) Acquire a commercial LPC2000 development board with a USB
programming connector (e.g. one of the low-cost Embedded Artists or
Coridium Corp boards) and check whether that works with the rest of your
system etc. etc.
> >
> > Regards,
> > Chris
> >
> Has ISP ever worked on that particular chip/board? One thought is that
the FTDI chip isn't wired properly. Carefully evaluate which direction
Tx and Rx are really going.
>
> Hold the LPC in reset and short the Tx and Rx lines at the FTDI chip.
Then use the terminal program in FlashMagic to see if you can loop back
characters.
>
> Be careful! You need to hold the LPC in reset in order to prevent
conflicts. If you let the chip come out of reset, existing code may
cause a pin to conflict with the jumper between Tx and Rx
>
> Richard
>

I use an FTDI chip and it works fine all the time for ISP.

This is to follow up on what Richard said about the Tx and RX Lines
being wired correctly.

The Tx on the FTDI goes to the Rx on the LPC.

The RX on the FTDI goes to the TX on the LPC.

If you have TX to TX and RX to RX you will never autobaud.

Also make sure you have good solid connections and a good ground from
the FTDI to the LPC. This is especially important if you are using a
breadboard.

Then try FlashMagic again.

Report back on your progress.

This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes.
--- In l..., "Hardeep Gida" wrote:
>
> Hi Larry,
>
>
>
> Initially we did have TX to TX and RX to RX, however after changing the
> wiring, Flash Magic continued to give same error. I know that the FTDI
> chip is functioning properly because I can transmit data from my program
> to UART0 and see the transmitted data in the hyper terminal. I can also
> write data on the hyper terminal and my program can read it.
>
>
>
> I had DTR and RTS on the FTDI chip controlling the RST and ISP lines. In
> Flash Magic, I chose the option that let it control those lines. I was
> able to see these two lines set and reset on the oscilloscope, but I
> continued to get the same autobaud error. Can I use the DTR and RTS on
> the FTDI chip to control the RST and ISP lines? Or should I use the
> CBUS lines?
>
>
>
> I haven't tried changing the USB port or the USB cable that I use
> because I guess I figured that UART to USB is working.
>
>
>
> Thanks.
> Hardeep
>
If you are echoing chars through the uC, I assume you have JTAG working so the only obvious reason ISP won't work is that P0.14 isn't low when coming out of reset.

How are you handling P0.14? Before bothering with RTS and DTR, can you hold P0.14 grounded? You don't need to release the signal so holding it too long is not an issue. You just need to release it when you reset to execute your new program. Both of my development boards have a switch that I set to ISP BEFORE I reset the device. Seems to work pretty good.

It MIGHT make a difference which 'Interface' you select in FlashMagic. I would try a baud rate no higher than 38400 to start and that 'Oscillator' setting is also important. I have Interface None(ISP) and Oscillator 12 MHz and I usually use a USB->Serial cable with the Prolific chip.

I don't use FlashMagic. I much prefer lpc21isp mostly because I can use it from a makefile. I suppose FlashMagic could be similarly used but I haven't tried it. You can get the latest version from the lpc21isp group here on Yahoo. On Win7 (x64 but it doesn't matter), I am using version 1.31. On Linux, I am using version 1.73 - probably part of a Ubuntu package. I don't recall...

Richard

Hi Hardeep,

I have had mixed results with using the FTDI chip to control the RST and ISP lines and have reservations about using them.

I also had problems with hyper terminal and use TeraTerm instead.

Try the following:

Cycle power on the LPC.

Manually ground LPC ISP. You can leave it connected during ISP and only remove it after programming to be able to run your application.

Momentarily ground LPC reset. This will cause LPC to enter ISP.

In FlashMagic use 19200 baud and make sure the Oscillator setting is correct.

Try to Read Device Signature in FlashMagic. It should work, If it doesn't then it may be a hardware problem. Do you have anything else tied to the ISP pin? Is something pulling reset low again while doing ISP?
Larry

--- In l..., "Hardeep Gida" wrote:
>
> Hi Larry,
>
>
>
> Initially we did have TX to TX and RX to RX, however after changing the
> wiring, Flash Magic continued to give same error. I know that the FTDI
> chip is functioning properly because I can transmit data from my program
> to UART0 and see the transmitted data in the hyper terminal. I can also
> write data on the hyper terminal and my program can read it.
>
>
>
> I had DTR and RTS on the FTDI chip controlling the RST and ISP lines. In
> Flash Magic, I chose the option that let it control those lines. I was
> able to see these two lines set and reset on the oscilloscope, but I
> continued to get the same autobaud error. Can I use the DTR and RTS on
> the FTDI chip to control the RST and ISP lines? Or should I use the
> CBUS lines?
>
>
>
> I haven't tried changing the USB port or the USB cable that I use
> because I guess I figured that UART to USB is working.
>
>
>
> Thanks.
> Hardeep
>
>
>
>
>
> From: l... [mailto:l...] On Behalf
> Of Larry Viesse
> Sent: March 16, 2011 2:09 AM
> To: l...
> Subject: [lpc2000] Re: Low level on RESET and P.014
>
>
>
>
>
> --- In l... ,
> "rtstofer" wrote:
> >
> >
> >
> > --- In l... ,
> "cfbsoftware1" wrote:
> > >
> > > --- In l... ,
> "Hardeep Gida" wrote:
> > > >
> > > > I have tried using the Flash Magic Tool and I keep getting the
> same
> > > > error "Failed to Autobaud". I've gone through the Flash Magic
> Forum and
> > > > tried debugging the possible reasons given, but I continue to get
> the
> > > > same error. The only difference on my board is that I have an FTDI
> chip
> > > > that converts UART to USB. I'm not sure whether this is the
> problem?
> > > >
> > >
> > > If you can't get FlashMagic to work you have less than 0% chance of
> ever uploading a file by programming it yourself.
> > >
> > > Apart from looking in the FlashMagic forum did you try all of the
> tests listed in App Note 4 "What to do if ISP does not work" on the
> Resources page?
> > >
> > > http://www.flashmagictool.com/resources.html
> > >
> > > We've successfully programmed different commercial LPC2000
> development boards via the USB port using RS232 to USB convertor cables,
> FTDI breakout boards and onboard UART to USB chips, using both
> FlashMagic and our own ISP upload code so it *should* work.
> > >
> > > If the FlashMagic tips did not help you need to isolate the problem
> somehow. I'd suggest a few different experiments:
> > >
> > > a) Try using a different USB port on your computer
> > > b) Try using a different USB cable
> > > c) Acquire a commercial LPC2000 development board with a USB
> programming connector (e.g. one of the low-cost Embedded Artists or
> Coridium Corp boards) and check whether that works with the rest of your
> system etc. etc.
> > >
> > > Regards,
> > > Chris
> > >
> >
> >
> > Has ISP ever worked on that particular chip/board? One thought is that
> the FTDI chip isn't wired properly. Carefully evaluate which direction
> Tx and Rx are really going.
> >
> > Hold the LPC in reset and short the Tx and Rx lines at the FTDI chip.
> Then use the terminal program in FlashMagic to see if you can loop back
> characters.
> >
> > Be careful! You need to hold the LPC in reset in order to prevent
> conflicts. If you let the chip come out of reset, existing code may
> cause a pin to conflict with the jumper between Tx and Rx
> >
> > Richard
> > I use an FTDI chip and it works fine all the time for ISP.
>
> This is to follow up on what Richard said about the Tx and RX Lines
> being wired correctly.
>
> The Tx on the FTDI goes to the Rx on the LPC.
>
> The RX on the FTDI goes to the TX on the LPC.
>
> If you have TX to TX and RX to RX you will never autobaud.
>
> Also make sure you have good solid connections and a good ground from
> the FTDI to the LPC. This is especially important if you are using a
> breadboard.
>
> Then try FlashMagic again.
>
> Report back on your progress.
> This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes.
>

Richard and I both posted at the same time (cosmic) try using our suggestions.

--- In l..., "rtstofer" wrote:
>
> --- In l..., "Hardeep Gida" wrote:
> >
> > Hi Larry,
> >
> >
> >
> > Initially we did have TX to TX and RX to RX, however after changing the
> > wiring, Flash Magic continued to give same error. I know that the FTDI
> > chip is functioning properly because I can transmit data from my program
> > to UART0 and see the transmitted data in the hyper terminal. I can also
> > write data on the hyper terminal and my program can read it.
> >
> >
> >
> > I had DTR and RTS on the FTDI chip controlling the RST and ISP lines. In
> > Flash Magic, I chose the option that let it control those lines. I was
> > able to see these two lines set and reset on the oscilloscope, but I
> > continued to get the same autobaud error. Can I use the DTR and RTS on
> > the FTDI chip to control the RST and ISP lines? Or should I use the
> > CBUS lines?
> >
> >
> >
> > I haven't tried changing the USB port or the USB cable that I use
> > because I guess I figured that UART to USB is working.
> >
> >
> >
> > Thanks.
> > Hardeep
> >
> If you are echoing chars through the uC, I assume you have JTAG working so the only obvious reason ISP won't work is that P0.14 isn't low when coming out of reset.
>
> How are you handling P0.14? Before bothering with RTS and DTR, can you hold P0.14 grounded? You don't need to release the signal so holding it too long is not an issue. You just need to release it when you reset to execute your new program. Both of my development boards have a switch that I set to ISP BEFORE I reset the device. Seems to work pretty good.
>
> It MIGHT make a difference which 'Interface' you select in FlashMagic. I would try a baud rate no higher than 38400 to start and that 'Oscillator' setting is also important. I have Interface None(ISP) and Oscillator 12 MHz and I usually use a USB->Serial cable with the Prolific chip.
>
> I don't use FlashMagic. I much prefer lpc21isp mostly because I can use it from a makefile. I suppose FlashMagic could be similarly used but I haven't tried it. You can get the latest version from the lpc21isp group here on Yahoo. On Win7 (x64 but it doesn't matter), I am using version 1.31. On Linux, I am using version 1.73 - probably part of a Ubuntu package. I don't recall...
>
> Richard
>

--- In l..., "wuethrich_stefan" wrote:
>
> Hello,
>
> "Hardeep Gida" Hardeep.Gida@... wrote:
> > I have tried using the Flash Magic Tool and I keep getting the same
> > error "Failed to Autobaud". I've gone through the Flash Magic Forum and
> > tried debugging the possible reasons given, but I continue to get the
> > same error. The only difference on my board is that I have an FTDI chip
> > that converts UART to USB. I'm not sure whether this is the problem?
> > We had similar problems with Flashmagic when using an FTDI adapter over an USB hub. Connecting the USB cable directly to the PC solved the problem for us.
>
> Regards,
> Stefan
>

I didn't check all the replies but are you using the correct UART/USART on the LPC?

I don't have a 2138 mine is a 1769 but the ISP should work similarly.

Thank you for your comments everyone. I will try your suggestions this
afternoon.

Larry, I'm using UART0 which according to the manual is the correct UART
(pg.6 of UM10120). Can someone using LPC2138 please confirm this?

Thanks.

From: l... [mailto:l...] On Behalf
Of Larry Viesse
Sent: March 16, 2011 1:47 PM
To: l...
Subject: [lpc2000] Re: Low level on RESET and P.014

--- In l... ,
"wuethrich_stefan" wrote:
>
> Hello,
>
> "Hardeep Gida" Hardeep.Gida@... wrote:
> > I have tried using the Flash Magic Tool and I keep getting the same
> > error "Failed to Autobaud". I've gone through the Flash Magic Forum
and
> > tried debugging the possible reasons given, but I continue to get
the
> > same error. The only difference on my board is that I have an FTDI
chip
> > that converts UART to USB. I'm not sure whether this is the problem?
> > We had similar problems with Flashmagic when using an FTDI adapter
over an USB hub. Connecting the USB cable directly to the PC solved the
problem for us.
>
> Regards,
> Stefan
>

I didn't check all the replies but are you using the correct UART/USART
on the LPC?

I don't have a 2138 mine is a 1769 but the ISP should work similarly.

This message is intended only for the use of the named addressee. It may contain information that is copywritten, privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this in error, please notify the sender immediately and delete it from your system. Communications using this system are monitored and recorded for lawful business purposes.











On 3/16/2011 1:57 PM, Hardeep Gida wrote:
cite="mid:7...@exchange.allenvanguard.local"
type="cite">







Thank you for your comments everyone. I will try
your suggestions this afternoon.


 


Larry, I’m using UART0 which according to the
manual is the correct UART (pg.6 of UM10120). Can someone
using LPC2138 please confirm this?


 


Thanks.


 




From: style="font-size: 10pt; font-family:
"Tahoma","sans-serif";">
l... [mailto:l...]
On Behalf Of Larry Viesse

Sent: March 16, 2011 1:47 PM

To: l...

Subject: [lpc2000] Re: Low level on RESET and
P.014




 


 









--- In href="mailto:lpc2000%40yahoogroups.com">l...,
"wuethrich_stefan" <cokesitter@...> wrote:

>

> Hello,

>

> "Hardeep Gida" Hardeep.Gida@... wrote:

> > I have tried using the Flash Magic Tool and I
keep getting the same

> > error "Failed to Autobaud". I've gone through
the Flash Magic Forum and

> > tried debugging the possible reasons given,
but I continue to get the

> > same error. The only difference on my board is
that I have an FTDI chip

> > that converts UART to USB. I'm not sure
whether this is the problem?

> >

>

> We had similar problems with Flashmagic when using
an FTDI adapter over an USB hub. Connecting the USB
cable directly to the PC solved the problem for us.

>

> Regards,

> Stefan

>



I didn't check all the replies but are you using the
correct UART/USART on the LPC?



I don't have a 2138 mine is a 1769 but the ISP should
work similarly.














Confirmed that UART0 should be only be used with ISP and Flashmagic.
Also (as stated with everyone else) that you:



1) Have the P0.14 LOW when you release RESET



2) That you have Flashmagic oscillator setting correct for your
clock.



3) That you also have a baud rate that will match the oscillator
setting (12.0MHz = 38400).





Regards,

Charles

cite="mid:7...@exchange.allenvanguard.local"
type="cite">
















__._,_.___






stime00298693













__,_._,___
--- In l..., "Hardeep Gida" wrote:

> Larry, I'm using UART0 which according to the manual is the correct UART
> (pg.6 of UM10120). Can someone using LPC2138 please confirm this?
>
Yes, according to section 1.8 of the User Manual. No reason for it to be different than the LPC2148 that I use and it is definitely UART0

Richard