Yahoo Groups archive

Lpc2000

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

Thread

Power up sequence

Power up sequence

2003-12-04 by skulchak

Hello group,

I am trying to come up with a simple power up sequence
for my application using IAR. So that I could just FLASH
application into the part, and run it from RESET. I am
using NOHAU J-TAG loader.

I just read in the manual "Criterion for the valid user
code". I am not sure if there is a mechanism in IAR or
any other existing compiler for LPC2100 to create a valid
checksum block around interrupt vectors. I could write
a utility to update target binary file and insert a
proper checksum there, or write vectors in assembly and use 
jumps to the fixed secondary jump-table to keep values in 
the interrupt area constant, hence, predictable for the local
checksum.

I just can't believe that things need to be that complex to
power up an embedded processor and pass control to main().

I would highly appreciate any suggestions how to create
a FLASH-based power up sequence.

Regards,

Skulchak.

Re: [lpc2100] Power up sequence

2003-12-04 by Robert Adsett

At 07:17 PM 12/4/03 +0000, you wrote:
>Hello group,
>
>I am trying to come up with a simple power up sequence
>for my application using IAR. So that I could just FLASH
>application into the part, and run it from RESET. I am
>using NOHAU J-TAG loader.

I don't understand.  Why not just use Philips' download utility?  Also does 
Nohau's utility not deal with this already?


>I just read in the manual "Criterion for the valid user
>code". I am not sure if there is a mechanism in IAR or
>any other existing compiler for LPC2100 to create a valid
>checksum block around interrupt vectors. I could write
>a utility to update target binary file and insert a
>proper checksum there, or write vectors in assembly and use
>jumps to the fixed secondary jump-table to keep values in
>the interrupt area constant, hence, predictable for the local
>checksum.
>
>I just can't believe that things need to be that complex to
>power up an embedded processor and pass control to main().

Considering that the processor has NO hardware protection against 
inadvertent writes into the flash by the application that's a pretty 
minimal check.  Philips' download utility takes care of it automatically.

As far as complex setups go, I've seen a lot worse.


>I would highly appreciate any suggestions how to create
>a FLASH-based power up sequence.

I don't understand.  What is the problem you are having on power up?  And 
what does that have to do with the download?

Re: Power up sequence

2003-12-04 by Richard

Skulchak,
     The valid code "signature" at 0x14 is merely the two's complement
of the sum of the vector table.  That way when the checksum for the
whole vector table is 0x00 for valid flash code.  This is checked by
the bootloader automatically.  In your case the signature at 0x14 is
generated autmatically by the Nohau debugger.  You don't need to worry
about it.  
In Seehau, under Config/Emulator/Misc Setup, make sure the "remap
after reset" and "Flash written as RAM....." are unchecked to run from
flash.  You will also have to use/modify your IAR linker file to link
the code to flash.

Hope this helps. 

Richard


--- In lpc2100@yahoogroups.com, "skulchak" <skulchak@y...> wrote:
Show quoted textHide quoted text
> Hello group,
> 
> I am trying to come up with a simple power up sequence
> for my application using IAR. So that I could just FLASH
> application into the part, and run it from RESET. I am
> using NOHAU J-TAG loader.
> 
> I just read in the manual "Criterion for the valid user
> code". I am not sure if there is a mechanism in IAR or
> any other existing compiler for LPC2100 to create a valid
> checksum block around interrupt vectors. I could write
> a utility to update target binary file and insert a
> proper checksum there, or write vectors in assembly and use 
> jumps to the fixed secondary jump-table to keep values in 
> the interrupt area constant, hence, predictable for the local
> checksum.
> 
> I just can't believe that things need to be that complex to
> power up an embedded processor and pass control to main().
> 
> I would highly appreciate any suggestions how to create
> a FLASH-based power up sequence.
> 
> Regards,
> 
> Skulchak.

Re: Power up sequence

2003-12-04 by skulchak

Thank you Richard. 

I did not know that Nohau compiles check
sum automatically. I assumed that I had to do it. 

Regards,

Skulchak.

--- In lpc2100@yahoogroups.com, "Richard" <richas@y...> wrote:
> Skulchak,
>      The valid code "signature" at 0x14 is merely the two's 
complement
> of the sum of the vector table.  That way when the checksum for the
> whole vector table is 0x00 for valid flash code.  This is checked by
> the bootloader automatically.  In your case the signature at 0x14 is
> generated autmatically by the Nohau debugger.  You don't need to 
worry
> about it.  
> In Seehau, under Config/Emulator/Misc Setup, make sure the "remap
> after reset" and "Flash written as RAM....." are unchecked to run 
from
> flash.  You will also have to use/modify your IAR linker file to 
link
Show quoted textHide quoted text
> the code to flash.
> 
> Hope this helps. 
> 
> Richard
> 
> 
> --- In lpc2100@yahoogroups.com, "skulchak" <skulchak@y...> wrote:
> > Hello group,
> > 
> > I am trying to come up with a simple power up sequence
> > for my application using IAR. So that I could just FLASH
> > application into the part, and run it from RESET. I am
> > using NOHAU J-TAG loader.
> > 
> > I just read in the manual "Criterion for the valid user
> > code". I am not sure if there is a mechanism in IAR or
> > any other existing compiler for LPC2100 to create a valid
> > checksum block around interrupt vectors. I could write
> > a utility to update target binary file and insert a
> > proper checksum there, or write vectors in assembly and use 
> > jumps to the fixed secondary jump-table to keep values in 
> > the interrupt area constant, hence, predictable for the local
> > checksum.
> > 
> > I just can't believe that things need to be that complex to
> > power up an embedded processor and pass control to main().
> > 
> > I would highly appreciate any suggestions how to create
> > a FLASH-based power up sequence.
> > 
> > Regards,
> > 
> > Skulchak.

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.