Hello.
I'm looking at a project at our company that was done on an LPC 2468.
One of the things these folks did is write a FLAG in the USB RAM space, force a
watchdog reset, and when the board boots back up see what the FLAG is set to.
The FLAG determines weather to boot into a primary or secondary image
basically.
Apparently doing a watchdog reset does not clear the USB RAM
I'm doing a similar project on an LPC 2103.
How do I know what RAM is cleared when a Watchdog reset is forced?
I can't really find any documentation on this?
But being able to carry a flag anywhere (besides FLASH) in the LPC 2103 across a
watchdog reset would be nice.
Watchdog Reset Question
Started by ●December 13, 2010
Reply by ●December 13, 20102010-12-13
Hello,
Tuesday, December 14, 2010, 1:07:07 AM, you wrote:
> Hello.
> I'm looking at a project at our company that was done on an LPC 2468.
> One of the things these folks did is write a FLAG in the USB RAM
> space, force a watchdog reset, and when the board boots back up see what the FLAG is set to.
> The FLAG determines weather to boot into a primary or secondary image basically.
> Apparently doing a watchdog reset does not clear the USB RAM
I would hope that it's more than a single byte/word flag given that
the contents of USB RAM are going to effectively be random after a
power-on reset.
> I'm doing a similar project on an LPC 2103.
> How do I know what RAM is cleared when a Watchdog reset is forced?
I suggest you experiment; fill RAM with a known pattern, do the reset,
and see what is changed. I wouldn't expect much to change, if
anything at all.
> I can't really find any documentation on this?
I think you might rely on the fact that the top 32 words (IIRC) or RAM
are reserved for IAP. It might be 32 bytes, I forget. That *is*
documented.
I don't expect NXP to document this as the bootloader probably changes
between device revisions. So, there's no reason to believe it will
stay the same in future, but the probability is fairly low that a
device rev will make a difference. I don't think the 2103 has a
replaceable bootloader either, which is good for you.
> But being able to carry a flag anywhere (besides FLASH) in the LPC
> 2103 across a watchdog reset would be nice.
From what I remember of the reset sequence, there is very little that
is changed by a reset--JTAG is conditionally disabled, the app is
validated and if valid, it's entered.
-- Paul.
Tuesday, December 14, 2010, 1:07:07 AM, you wrote:
> Hello.
> I'm looking at a project at our company that was done on an LPC 2468.
> One of the things these folks did is write a FLAG in the USB RAM
> space, force a watchdog reset, and when the board boots back up see what the FLAG is set to.
> The FLAG determines weather to boot into a primary or secondary image basically.
> Apparently doing a watchdog reset does not clear the USB RAM
I would hope that it's more than a single byte/word flag given that
the contents of USB RAM are going to effectively be random after a
power-on reset.
> I'm doing a similar project on an LPC 2103.
> How do I know what RAM is cleared when a Watchdog reset is forced?
I suggest you experiment; fill RAM with a known pattern, do the reset,
and see what is changed. I wouldn't expect much to change, if
anything at all.
> I can't really find any documentation on this?
I think you might rely on the fact that the top 32 words (IIRC) or RAM
are reserved for IAP. It might be 32 bytes, I forget. That *is*
documented.
I don't expect NXP to document this as the bootloader probably changes
between device revisions. So, there's no reason to believe it will
stay the same in future, but the probability is fairly low that a
device rev will make a difference. I don't think the 2103 has a
replaceable bootloader either, which is good for you.
> But being able to carry a flag anywhere (besides FLASH) in the LPC
> 2103 across a watchdog reset would be nice.
From what I remember of the reset sequence, there is very little that
is changed by a reset--JTAG is conditionally disabled, the app is
validated and if valid, it's entered.
-- Paul.
Reply by ●December 13, 20102010-12-13
--- In l..., "xxavatarxx" wrote:
>
> But being able to carry a flag anywhere (besides FLASH) in the LPC 2103 across a watchdog reset would be nice.
>
If you have Rev A or later of the LPC2103 see if registers GPREG0, GPREG1 and GPREG2 (see the chapter on RTC) are of any use to you.
Regards,
Chris Burrows
CFB Software
Astrobe v3.2: LPC2000 Oberon-07 Development System
http://www.astrobe.com
>
> But being able to carry a flag anywhere (besides FLASH) in the LPC 2103 across a watchdog reset would be nice.
>
If you have Rev A or later of the LPC2103 see if registers GPREG0, GPREG1 and GPREG2 (see the chapter on RTC) are of any use to you.
Regards,
Chris Burrows
CFB Software
Astrobe v3.2: LPC2000 Oberon-07 Development System
http://www.astrobe.com
Reply by ●December 14, 20102010-12-14
You can save your flag into any of the RTC alarm register ( ALHOUR,
ALMON,...)
As explained in the LPC2103 User Manual, those registers are not changed by a (watchdog) reset.
And they exist in any revision of the LPC2103.
We use them to save pre-watchdog reset state.
Jef
--- In l..., "cfbsoftware1" wrote:
>
> --- In l..., "xxavatarxx" wrote:
> >
> > But being able to carry a flag anywhere (besides FLASH) in the LPC 2103 across a watchdog reset would be nice.
> > If you have Rev A or later of the LPC2103 see if registers GPREG0, GPREG1 and GPREG2 (see the chapter on RTC) are of any use to you.
>
> Regards,
> Chris Burrows
>
> CFB Software
> Astrobe v3.2: LPC2000 Oberon-07 Development System
> http://www.astrobe.com
>
As explained in the LPC2103 User Manual, those registers are not changed by a (watchdog) reset.
And they exist in any revision of the LPC2103.
We use them to save pre-watchdog reset state.
Jef
--- In l..., "cfbsoftware1" wrote:
>
> --- In l..., "xxavatarxx" wrote:
> >
> > But being able to carry a flag anywhere (besides FLASH) in the LPC 2103 across a watchdog reset would be nice.
> > If you have Rev A or later of the LPC2103 see if registers GPREG0, GPREG1 and GPREG2 (see the chapter on RTC) are of any use to you.
>
> Regards,
> Chris Burrows
>
> CFB Software
> Astrobe v3.2: LPC2000 Oberon-07 Development System
> http://www.astrobe.com
>
Reply by ●December 14, 20102010-12-14
Thanks jean-francois, I'll try those registers.
--- In l..., "jean-francois" wrote:
> You can save your flag into any of the RTC alarm register ( ALHOUR, ALMON,...)
> As explained in the LPC2103 User Manual, those registers are not changed by a (watchdog) reset.
> And they exist in any revision of the LPC2103.
> We use them to save pre-watchdog reset state.
> Jef
>
> --- In l..., "cfbsoftware1" wrote:
> >
> > --- In l..., "xxavatarxx" wrote:
> > >
> > > But being able to carry a flag anywhere (besides FLASH) in the LPC 2103 across a watchdog reset would be nice.
> > >
> >
> > If you have Rev A or later of the LPC2103 see if registers GPREG0, GPREG1 and GPREG2 (see the chapter on RTC) are of any use to you.
> >
> > Regards,
> > Chris Burrows
> >
> > CFB Software
> > Astrobe v3.2: LPC2000 Oberon-07 Development System
> > http://www.astrobe.com
>
--- In l..., "jean-francois" wrote:
> You can save your flag into any of the RTC alarm register ( ALHOUR, ALMON,...)
> As explained in the LPC2103 User Manual, those registers are not changed by a (watchdog) reset.
> And they exist in any revision of the LPC2103.
> We use them to save pre-watchdog reset state.
> Jef
>
> --- In l..., "cfbsoftware1" wrote:
> >
> > --- In l..., "xxavatarxx" wrote:
> > >
> > > But being able to carry a flag anywhere (besides FLASH) in the LPC 2103 across a watchdog reset would be nice.
> > >
> >
> > If you have Rev A or later of the LPC2103 see if registers GPREG0, GPREG1 and GPREG2 (see the chapter on RTC) are of any use to you.
> >
> > Regards,
> > Chris Burrows
> >
> > CFB Software
> > Astrobe v3.2: LPC2000 Oberon-07 Development System
> > http://www.astrobe.com
>