EmbeddedRelated.com
Forums

Setting Bootloader Mode Via Serial Port (LPC2458)

Started by boru2600 October 3, 2012
Hey guys

I'm currently working with a 2458 and I'm running into some issues with setting the device into bootloader mode from a host machine with both lpc21isp and Flash Magic. I've dropped in a jumper to allow the MCU to be reset via the serial port. I'm now seeing two issues;

When I connect to the board via the serial port with either putty or minicom (The latter from a Linux guest VM on a windows host), the board seems to get stuck in reset mode until I disconnect. My preliminary investigation (putting a logic analyser on the UART) has found that when either minicom or putty connect, DTR is asserted. Is this correct behaviour?

The second problem I'm seeing is that when I attempt setting the board into bootloader mode with lpc21isp (with the -control option), RTS isn't being asserted (confirmed with the logic analyser on the UART).

Has anyone encountered these issues before? Is there something I'm overlooking here? As always, any input or insights are most welcome, and if I can provide any further information, let me know.

Many thanks in advance.

An Engineer's Guide to the LPC2100 Series

Both minicom and putty are terminal/modem orientated, in such application it is often normal to use the control lines. Therfore it is normal that DTR is asserted. It is wise to add a switches or jumpers to the reset and bootloader entry pins.

I can't comment on lpc21isp, since I have never used it.

--
Kevin

--- In l..., "boru2600" wrote:
>
> Hey guys
>
> I'm currently working with a 2458 and I'm running into some issues with setting the device into bootloader mode from a host machine with both lpc21isp and Flash Magic. I've dropped in a jumper to allow the MCU to be reset via the serial port. I'm now seeing two issues;
>
> When I connect to the board via the serial port with either putty or minicom (The latter from a Linux guest VM on a windows host), the board seems to get stuck in reset mode until I disconnect. My preliminary investigation (putting a logic analyser on the UART) has found that when either minicom or putty connect, DTR is asserted. Is this correct behaviour?
>
> The second problem I'm seeing is that when I attempt setting the board into bootloader mode with lpc21isp (with the -control option), RTS isn't being asserted (confirmed with the logic analyser on the UART).
>
> Has anyone encountered these issues before? Is there something I'm overlooking here? As always, any input or insights are most welcome, and if I can provide any further information, let me know.
>
> Many thanks in advance.
>

Thank you for your response, Kevin. I later confirmed what you said measuring the voltages on a RS232 D9 connector plugged into my PC and running putty and minicom.

I'd dropped in a jumper to allow resetting the MCU over the serial port.
This has resulted in the board being stuck in reset mode whilst connected with minicom or putty. Am I missing something glaringly obvious here?

Returning to my original problem, RTS doesn't seem to be asserted by either Flash Magic or lpc21isp -- at least this is what I'm seeing when examining the pins on the UART.

If anyone can suggest what might be the issue in either case, I'd very much appreciate it. Many thanks in advance.

--
Conor.
--- In l..., "Kevin" wrote:
>
> Both minicom and putty are terminal/modem orientated, in such application it is often normal to use the control lines. Therfore it is normal that DTR is asserted. It is wise to add a switches or jumpers to the reset and bootloader entry pins.
>
> I can't comment on lpc21isp, since I have never used it.
>
> --
> Kevin
>
> --- In l..., "boru2600" wrote:
> >
> > Hey guys
> >
> > I'm currently working with a 2458 and I'm running into some issues with setting the device into bootloader mode from a host machine with both lpc21isp and Flash Magic. I've dropped in a jumper to allow the MCU to be reset via the serial port. I'm now seeing two issues;
> >
> > When I connect to the board via the serial port with either putty or minicom (The latter from a Linux guest VM on a windows host), the board seems to get stuck in reset mode until I disconnect. My preliminary investigation (putting a logic analyser on the UART) has found that when either minicom or putty connect, DTR is asserted. Is this correct behaviour?
> >
> > The second problem I'm seeing is that when I attempt setting the board into bootloader mode with lpc21isp (with the -control option), RTS isn't being asserted (confirmed with the logic analyser on the UART).
> >
> > Has anyone encountered these issues before? Is there something I'm overlooking here? As always, any input or insights are most welcome, and if I can provide any further information, let me know.
> >
> > Many thanks in advance.
>

Have you checked the RTS at the PC itself or at the other end of the cable? Not every cable has all the wires, or if its a USB->serial you might also be doomed.
A normal voltage measurement wont work, the pulses given by flash magic are in miliseconds. About 50ms default I think, my settings are non default (my reset logic required more).

In flash magic you should look at the advanced options at the hardware config.

As for the jumper, make sure the reset line is pulled up. And it is probably wise to also place the bootloader entry pin on a jumper, otherwise it might go into the isp bootloader at powerup/reset.

--
Kevin
--- In l..., "boru2600" wrote:
>
> Thank you for your response, Kevin. I later confirmed what you said measuring the voltages on a RS232 D9 connector plugged into my PC and running putty and minicom.
>
> I'd dropped in a jumper to allow resetting the MCU over the serial port.
> This has resulted in the board being stuck in reset mode whilst connected with minicom or putty. Am I missing something glaringly obvious here?
>
> Returning to my original problem, RTS doesn't seem to be asserted by either Flash Magic or lpc21isp -- at least this is what I'm seeing when examining the pins on the UART.
>
> If anyone can suggest what might be the issue in either case, I'd very much appreciate it. Many thanks in advance.
>
> --
> Conor.
> --- In l..., "Kevin" wrote:
> >
> > Both minicom and putty are terminal/modem orientated, in such application it is often normal to use the control lines. Therfore it is normal that DTR is asserted. It is wise to add a switches or jumpers to the reset and bootloader entry pins.
> >
> > I can't comment on lpc21isp, since I have never used it.
> >
> > --
> > Kevin
> >
> >
> >
> > --- In l..., "boru2600" wrote:
> > >
> > > Hey guys
> > >
> > > I'm currently working with a 2458 and I'm running into some issues with setting the device into bootloader mode from a host machine with both lpc21isp and Flash Magic. I've dropped in a jumper to allow the MCU to be reset via the serial port. I'm now seeing two issues;
> > >
> > > When I connect to the board via the serial port with either putty or minicom (The latter from a Linux guest VM on a windows host), the board seems to get stuck in reset mode until I disconnect. My preliminary investigation (putting a logic analyser on the UART) has found that when either minicom or putty connect, DTR is asserted. Is this correct behaviour?
> > >
> > > The second problem I'm seeing is that when I attempt setting the board into bootloader mode with lpc21isp (with the -control option), RTS isn't being asserted (confirmed with the logic analyser on the UART).
> > >
> > > Has anyone encountered these issues before? Is there something I'm overlooking here? As always, any input or insights are most welcome, and if I can provide any further information, let me know.
> > >
> > > Many thanks in advance.
> > >
>