Yahoo Groups archive

Lpc2000

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

Thread

In-Application Programming

In-Application Programming

2004-05-03 by Milos Prokic

Hi everyone,

I'm interested in trying the in-application programming feature of the
LPC2100. I was wondering if anyone has tried it. Any pointers regarding the
issue, maybe even some sample code will be of great help. 

The idea is to try and explore possibilities of ROM updates through simple
software code, but not through serial. For example to be able to wirelessly
reprogram the flash for firmware upgrades. The low level drivers for
wireless could be copied to ram together with the function to trigger the
IAP routines. Then by sending small packets I think one should be able to
reprogram the entire flash area.  

Thank you all in advance,

Cheers,

m.

Re: [lpc2000] In-Application Programming

2004-05-03 by Lewin A.R.W. Edwards

> to be able to wirelessly reprogram the flash for firmware upgrades.
> The low level drivers for wireless could be copied to ram together
> with the function to trigger the IAP routines. Then by sending small
> packets I think one should be able to reprogram 

Ow. This sounds like a recipe for disaster to me. Wireless is about as
unreliable a network medium as one can imagine...

  * -- 
     -- Lewin A.R.W. Edwards (http://www.zws.com/)
    Learn how to develop high-end embedded systems on a tight budget!
    http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20

Re: [lpc2000] In-Application Programming

2004-05-03 by microbit

> > to be able to wirelessly reprogram the flash for firmware upgrades.
> > The low level drivers for wireless could be copied to ram together
> > with the function to trigger the IAP routines. Then by sending small
> > packets I think one should be able to reprogram
>
> Ow. This sounds like a recipe for disaster to me. Wireless is about as
> unreliable a network medium as one can imagine...
>
> * --
> ; -- Lewin A.R.W. Edwards (http://www.zws.com/)
> Learn how to develop high-end embedded systems on a tight budget!
> http://www.amazon.com/exec/obidos/ASIN/0750676094/zws-20
Ever done Power Line Carrier Networks - that's the pits I reckon.
(Maybe better nowadays, haven't kept up anymore)
Milos' scheme could work, _proviso_ the old firmware is retained
until the complete RF network session is final, then the vectors are reprogrammed.
If you however set up things in RAM, experience a link failure mid-session,
followed by a Brown Out or whatever that trashes RAM, it's bye-bye system.
Wireless CAN be very reliable, providing proper link budget studies are done,
and account for the environment. (blocking, jamming, multipath etc)
I once designed a very low power RF (medical) system, one that used wireless
transfer of critcal real time acquistion data (EEG,ECG,EMG etc) where full reliability
(meaning - NO missing concurrent data from any of a dozen or so nodes at all times)
was paramount.
This was at 915 MHz ISM with ~ +6 dBm TX - it is possible - but it's the hardest
mixed system I ever designed from the ground up.
It probably retarded me for years to come :-)
The least reliable component probably was the Host PC .....
-- Kris

In-Application Programming

2004-05-03 by Stephen Pelc

> From: "Milos Prokic" <mproki@...>
> Subject: In-Application Programming
> I'm interested in trying the in-application programming feature
> of the LPC2100. I was wondering if anyone has tried it. Any
> pointers regarding the issue, maybe even some sample code will be
> of great help.
Everything we needed for the LPC2106 is in the datasheet and App 
Note AN10256. Our Forth Stamp board (available "Real Soon Now": 
LPC2106, USB and user programmable CPLD) reprograms itself very 
reliably over USB.

We copy a small program (about 3kb) to RAM, execute it from RAM 
and then reboot the system using the watchdog.

Our interface to the IAP routines from ARM mode is this:

5 cells buffer: IAPcmd	\ -- addr ; max 5 cells
\ *G Command input buffer for IAP routines.
3 cells buffer: IAPres	\ -- addr ; max 3 cells
\ *G Result output buffer from IAP routines.

l: ^IAP
  IAPentry 1 or ,			\ entry address, Thumb 
mode

code IAP	\ *cmd *res --
\ *G The primitive to call the IAP routines.
  str	link, [ rsp, # -4 ] !
  ldr   r0, [ psp ], # 4		\ R0 = *cmd
  mov   r1, tos				\ R1 = *res
  ldr   r5, ^IAP			\ get entry address
  stmfd rsp ! { r2-r12 }
  mov   link, pc			\ link set to after BX
  bx    r5
  ldmfd rsp ! { r2-r12 }
  ldr   tos, [ psp ], # 4		\ restore TOS
  ldr   pc, [ rsp ], # 4		\ return
end-code

Stephen

--
Stephen Pelc, stephen@...
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads

RE: [lpc2000] In-Application Programming

2004-05-03 by Milos Prokic

Thanks a lot for the info.
Stephen , I am interested in the board you mentioned (USB, CPLD & LPC). I
was wondering if you have the schematics available so that I can get a
closer look.
Thanks,
m.

________________________________________
Show quoted textHide quoted text
From: Stephen Pelc [mailto:stephen@...] 
Sent: Monday, May 03, 2004 11:36 AM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] In-Application Programming

> From: "Milos Prokic" <mproki@...l.ca>
> Subject: In-Application Programming
> I'm interested in trying the in-application programming feature
> of the LPC2100. I was wondering if anyone has tried it. Any
> pointers regarding the issue, maybe even some sample code will be
> of great help.
Everything we needed for the LPC2106 is in the datasheet and App 
Note AN10256. Our Forth Stamp board (available "Real Soon Now": 
LPC2106, USB and user programmable CPLD) reprograms itself very 
reliably over USB.

We copy a small program (about 3kb) to RAM, execute it from RAM 
and then reboot the system using the watchdog.

Our interface to the IAP routines from ARM mode is this:

5 cells buffer: IAPcmd      \ -- addr ; max 5 cells
\ *G Command input buffer for IAP routines.
3 cells buffer: IAPres      \ -- addr ; max 3 cells
\ *G Result output buffer from IAP routines.

l: ^IAP
  IAPentry 1 or ,                  \ entry address, Thumb 
mode

code IAP      \ *cmd *res --
\ *G The primitive to call the IAP routines.
  str      link, [ rsp, # -4 ] !
  ldr   r0, [ psp ], # 4            \ R0 = *cmd
  mov   r1, tos                        \ R1 = *res
  ldr   r5, ^IAP                  \ get entry address
  stmfd rsp ! { r2-r12 }
  mov   link, pc                  \ link set to after BX
  bx    r5
  ldmfd rsp ! { r2-r12 }
  ldr   tos, [ psp ], # 4            \ restore TOS
  ldr   pc, [ rsp ], # 4            \ return
end-code

Stephen

--
Stephen Pelc, stephen@...
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads


Yahoo! Groups Sponsor
ADVERTISEMENT




________________________________________
Yahoo! Groups Links
• To visit your group on the web, go to:
http://groups.yahoo.com/group/lpc2000/
  
• To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
  
• Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

In-Application Programming

2004-05-04 by Stephen Pelc

>    From: "Milos Prokic" <mproki@...>
> Stephen , I am interested in the board you mentioned (USB, CPLD &
> LPC). I was wondering if you have the schematics available so
> that I can get a closer look. Thanks, m.

I'll but the hardware and software manuals on our web site when 
we've finished them. I'll post an announcement here. If you want 
to get going quickly there are some pre-production boards 
available.

Stephen

--
Stephen Pelc, stephen@...
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads

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.