Yahoo Groups archive

Lpc2000

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

Message

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.

________________________________________
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.

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.