EmbeddedRelated.com
Forums

Flashmagic and the EA LPC2103 Education Board 1.1

Started by Dennis Clark January 21, 2009
Hi all,

I've just started out here. I'm trying to verify an ISP capability
using the latest Flashmagic to my EA LPC2103 board (has a FTDI
USB/serial chip on it) and all I get when I set it up for 115200 and
tell it to use DTR/RTS for reset and bootloader is this:
Operation failed (Failed to autobaud, step 1)

??? The board is working, it is talking on the COM port at the
desired speed and Flashmagic is doing something since the board is
resetting.

Any hints would be invaluable.

thanks,
DLC

An Engineer's Guide to the LPC2100 Series

--- In l..., "Dennis Clark"
wrote:
>
> Hi all,
>
> I've just started out here. I'm trying to verify an ISP capability
> using the latest Flashmagic to my EA LPC2103 board (has a FTDI
> USB/serial chip on it) and all I get when I set it up for 115200 and
> tell it to use DTR/RTS for reset and bootloader is this:
> Operation failed (Failed to autobaud, step 1)
>
> ??? The board is working, it is talking on the COM port at the
> desired speed and Flashmagic is doing something since the board is
> resetting.
>
> Any hints would be invaluable.
>
> thanks,
> DLC
>

this may sound stupid, but have you tried a lower baud rate?
i think the max speed i was able to get my 2138 to download at was 38400
also are you sure you have DTR and RTS connected to the correct lines,
ie not backwards? i did that too :P

--- In l..., "Dennis Clark"
wrote:
>
> Hi all,
>
> I've just started out here. I'm trying to verify an ISP
capability
> using the latest Flashmagic to my EA LPC2103 board (has a FTDI
> USB/serial chip on it) and all I get when I set it up for 115200 and
> tell it to use DTR/RTS for reset and bootloader is this:
> Operation failed (Failed to autobaud, step 1)
>
> ??? The board is working, it is talking on the COM port at the
> desired speed and Flashmagic is doing something since the board is
> resetting.
>
> Any hints would be invaluable.
>
> thanks,
> DLC
>

I'm not familiar with the EA board or "Flashmagic". I have done quite
a bit with the Olimex LPC-P2103 board and the NXP LPC2100 Flash
Utility (which I believe is the predecessor to Flashmagic).

I'd recommend getting the schematic for your board and looking at how
the serial port is connected to both RST and P0.14 (BSL) of the
LPC2103. Get the LPC2101/02/03 User Manual

http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/
user.manual.lpc2101.lpc2102.lpc2103.pdf

... and read the following...

The Chapter 19 Flash Memory System and Programming, Section 4
Description, page 229, first two paragraphs. Pay close attention to
the description of the function of P0.14 (BSL).

>From your description it seems that P0.14 is NOT asserted low when RST
is released. On the Olimex board there was a jumper that had to be
inserted so that both RST and P0.14 could be controlled from the
serial port (via RTS and DTR I believe). I suspect you will find the
same thing on your EA board. Look at the schematic.

Also, The LPC2103 Flash Utility I used was a little funky with its
control of RST and P0.14. I had to connect it to a scope to make sure
I understood that it was operating as expected ( BSL (P0.14) must be
low when RST transitions low to high).

TC

--- In l..., "Dennis Clark"
wrote:
>
> Hi all,
>
> I've just started out here. I'm trying to verify an ISP capability
> using the latest Flashmagic to my EA LPC2103 board (has a FTDI
> USB/serial chip on it) and all I get when I set it up for 115200 and
> tell it to use DTR/RTS for reset and bootloader is this:
> Operation failed (Failed to autobaud, step 1)
>
> ??? The board is working, it is talking on the COM port at the
> desired speed and Flashmagic is doing something since the board is
> resetting.
>
> Any hints would be invaluable.
>
> thanks,
> DLC
>

You have to use UART0 with Flash Magic! It won't work via the FTDI chip.

You ought to get a JTAG I/F, it makes things much easier.

Leon

Leon Heller wrote:
> --- In l..., "Dennis Clark"
> wrote:
>> Hi all,
>>
>> I've just started out here. I'm trying to verify an ISP capability
>> using the latest Flashmagic to my EA LPC2103 board (has a FTDI
>> USB/serial chip on it) and all I get when I set it up for 115200 and
>> tell it to use DTR/RTS for reset and bootloader is this:
>> Operation failed (Failed to autobaud, step 1)
>>
>> ??? The board is working, it is talking on the COM port at the
>> desired speed and Flashmagic is doing something since the board is
>> resetting.
>>
>> Any hints would be invaluable.
>>
>> thanks,
>> DLC
>> You have to use UART0 with Flash Magic! It won't work via the FTDI chip.
>
> You ought to get a JTAG I/F, it makes things much easier.

The setup does use UART0. EA would be surprised I think to hear that
you can't go through a FTDI USB/serial converter to use the bootloader.

DLC

> Leon
>
>
> The setup does use UART0. EA would be surprised I think to hear that
> you can't go through a FTDI USB/serial converter to use the bootloader.
>
> DLC

We haven't tried Flash Magic with an EA board, but there are a couple
of things you can look at to see what might be going on.

Failing to autobaud at step one typically means that Flash Magic has
sent the autobaud character '?' to the device and it expecting
"Sychronized" back, but didn't receive it. Can you please put a scope
on the RxD and TxD pins of the microcontroller and see if anything is
going in or coming out? If the device is not receiving the '?' then
you will need to investigate the communications path between the PC
and the microcontroller.

Andy
ESAcademy
Andrew Ayre wrote:
>> The setup does use UART0. EA would be surprised I think to hear that
>> you can't go through a FTDI USB/serial converter to use the bootloader.
>>
>> DLC
>
> We haven't tried Flash Magic with an EA board, but there are a couple
> of things you can look at to see what might be going on.
>
> Failing to autobaud at step one typically means that Flash Magic has
> sent the autobaud character '?' to the device and it expecting
> "Sychronized" back, but didn't receive it. Can you please put a scope
> on the RxD and TxD pins of the microcontroller and see if anything is
> going in or coming out? If the device is not receiving the '?' then
> you will need to investigate the communications path between the PC
> and the microcontroller.
>
> Andy
> ESAcademy
>
Dennis Clark wrote:
> Andrew Ayre wrote:
>>> The setup does use UART0. EA would be surprised I think to hear that
>>> you can't go through a FTDI USB/serial converter to use the bootloader.
>>>
>>> DLC
>> We haven't tried Flash Magic with an EA board, but there are a couple
>> of things you can look at to see what might be going on.
>>
>> Failing to autobaud at step one typically means that Flash Magic has
>> sent the autobaud character '?' to the device and it expecting
>> "Sychronized" back, but didn't receive it. Can you please put a scope
>> on the RxD and TxD pins of the microcontroller and see if anything is
>> going in or coming out? If the device is not receiving the '?' then
>> you will need to investigate the communications path between the PC
>> and the microcontroller.
>>
>> Andy
>> ESAcademy
>>
And finally, solved! It just goes to show, RTFM.

In the advanced options I selected the "Use DTR and RTS to control RST
and P0.14". I thought that I was done. In further reading of the
manual I discovered what the "T1" and "T2" settings were. These handle
the approximate pulse widths and delays of the two signals. I changed
T2 to be much longer (500ms instead of 100ms) and everything talks
properly now.

Thanks for the efforts all,
DLC

Dennis Clark wrote:
> Dennis Clark wrote:
>> Andrew Ayre wrote:
>>>> The setup does use UART0. EA would be surprised I think to hear that
>>>> you can't go through a FTDI USB/serial converter to use the bootloader.
>>>>
>>>> DLC
>>> We haven't tried Flash Magic with an EA board, but there are a couple
>>> of things you can look at to see what might be going on.
>>>
>>> Failing to autobaud at step one typically means that Flash Magic has
>>> sent the autobaud character '?' to the device and it expecting
>>> "Sychronized" back, but didn't receive it. Can you please put a scope
>>> on the RxD and TxD pins of the microcontroller and see if anything is
>>> going in or coming out? If the device is not receiving the '?' then
>>> you will need to investigate the communications path between the PC
>>> and the microcontroller.
>>>
>>> Andy
>>> ESAcademy
>>>
>>>
>>>
>>>
>>>