Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Re: Bootloader not always invoked after reset with P0.14 low

2006-02-24 by Guillermo Prandi

Oh, thanks Richard!

After your words, the following sequence in my startup code seems to 
do the trick:

WDMOD = 0; // I don't know if this is actually required
WDFEED = 0xaa;
WDFEED = 0x55;

Guille

--- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@...> 
wrote:
>
> The bootloader does not look at the RISR register. It looks at the
> WDTOF flag in WDMOD register.
> Even clearing of watchdog flag in user application may not help (if
> timeout is too small) because the bootloader runs before 
application.
> 
> If you are using the watchdog only to trigger ISP then Reinvoke ISP
> command might be a better choice. This was added to 213x,214x 
devices. 
> Restore Timer1 to reset state if your application uses it.
> Refer to Table 218 on page 235 of the user manual
> 
http://www.semiconductors.philips.com/acrobat_download/usermanuals/UM1
0120_1.pdf
> 
> The LPC213x/214x user manual will be updated to reflect the WTOF 
clear
> conditions.
> 
> Regards
> Philips Apps
> 
> --- In lpc2000@yahoogroups.com, "Guillermo Prandi"
> <yahoo.messenger@> wrote:
> >
> > My code is clearing the RISR flags at boot time by doing:
> > 
> > #define RSIR (*((volatile unsigned char *) 0xE01FC180))
> > 
> > RSIR = 0x0f;
> > 
> > After that, the boards still ignores P0.14 after a watchdog 
reset. 
> > Since I cleared the watchdog reset flag, I expected the 
bootloader to 
> > invoke ISP. Is there anything else I could do from software in 
order 
> > to make the bootloader honor the P0.14 pin?
> > 
> > Guille
> > 
> > --- In lpc2000@yahoogroups.com, "philips_apps" <philips_apps@> 
> > wrote:
> > >
> > > Hello Guille,
> > > 
> > > In case of a watchdog triggered reset, P0.14 pin is ignored by 
the
> > > bootloader and the valid user application is executed. If valid 
user
> > > application is not found then only isp is entered. In LPC2138 
the 
> > WDT
> > > flag is not cleared by pin reset. POR reset clears the WDT 
flag. 
> > What
> > > you are observing is expected behavior. I am assuming that WD 
reset
> > > happened since you have mention it.
> > > 
> > > Regards
> > > Philips Apps
> > > 
> > > --- In lpc2000@yahoogroups.com, "Guillermo Prandi"
> > > <yahoo.messenger@> wrote:
> > > >
> > > > Hi, I wonder if anyone has seen this before.
> > > > 
> > > > While developing the firmware for my LPC2138-featured board, 
I 
> > noticed 
> > > > that the bootloader is not always invoked after a reset with 
> > P0.14 low. 
> > > > Even when the bootloader is not invoked, the device still 
> > responds to 
> > > > reset.
> > > > 
> > > > I tested with the Philips bootloader utility, which, measured 
at 
> > the 
> > > > reset and P0.14 pins, gives me:
> > > > 
> > > > 1) At T+0, P0.14 goes down from 3.3V to 0V sharply.
> > > > 2) At T+0, Reset starts going down from 3.3V to 0V in an RC-
type 
> > curve 
> > > > of 750�S.
> > > > 3) At T+750�S both Reset and P0.14 are now 0V.
> > > > 4) At T+500 mS reset starts going up, having been effectively 
low 
> > for 
> > > > 499mS. The rising curve is also RC-type and takes about 2 mS 
to 
> > reach 
> > > > 85%.
> > > > 5) At T+840 mS, P0.14 goes up sharply. This is 338 mS *after* 
> > reset 
> > > > went high.
> > > > 
> > > > By the spec, these figures should be large enough to trigger 
the 
> > > > bootloader, and it does, except when I've been playing around 
> > with my 
> > > > firmware for a while (several cycles of compile+flash 
> > programming, 
> > > > tests, an occasional crash, watchdog triggered, etc.). When 
the 
> > > > bootloader stops responding, the only way to regain the 
> > bootloader is 
> > > > by removing power.
> > > > Any ideas?
> > > > 
> > > > Guille
> > > >
> > >
> >
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.