Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | Using ISP commands...

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

Using ISP commands... - Leonardo Silva - Aug 20 12:48:01 2008

I'm looking for a way to use ISP commands in my code, more specifically the
command GO, because ill save some instructions in flash memory and according
to some conditions i want to jump the execution flow to this instructions,
without the need to return to the original instruction flow because they
have their own loop forever. I'm already able to write this instructions in
binary in flash, i just cant use the command to execute them.
I'm using LPC2138 and the IAR compiler.
Thanks
[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


Re: Using ISP commands... - "Glazar, Bostjan" - Aug 21 3:11:45 2008

Why do you want to use ISP (or bootloader)?
It is more strait forward to use goto sentence (if writing in C), or an assembler instruction to load the address to program counter (R15 = PC).

> I'm looking for a way to use ISP commands in my code, more specifically the
> command GO, because ill save some instructions in flash memory and according
> to some conditions i want to jump the execution flow to this instructions
[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Using ISP commands... - Foltos - Aug 21 3:48:42 2008

Hi,

instead of ISP you can do something like this:

void (*func_ptr)(void) = 0x123456;
(*func_prt)();

this will make a call to address 123456. Also you can use assembly to
jump to an address:

asm(" mov r0,=0x123456\n"
" bx r0");

Foltos

Leonardo Silva wrote:
> I'm looking for a way to use ISP commands in my code, more specifically the
> command GO, because ill save some instructions in flash memory and according
> to some conditions i want to jump the execution flow to this instructions,
> without the need to return to the original instruction flow because they
> have their own loop forever. I'm already able to write this instructions in
> binary in flash, i just cant use the command to execute them.
> I'm using LPC2138 and the IAR compiler.
> Thanks
> [Non-text portions of this message have been removed]
> ------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Using ISP commands... - Leonardo Silva - Aug 21 7:52:08 2008

I was trying to use ISP because based on UM it was the way to jump to an
address, but this solution worked just fine. My intention was to make a
basic firmware to run the real firmware that can be received by uart, for
remote version control.
Thanks
2008/8/21 Foltos

> Hi,
>
> instead of ISP you can do something like this:
>
> void (*func_ptr)(void) = 0x123456;
> (*func_prt)();
>
> this will make a call to address 123456. Also you can use assembly to
> jump to an address:
>
> asm(" mov r0,=0x123456\n"
> " bx r0");
>
> Foltos
> Leonardo Silva wrote:
> > I'm looking for a way to use ISP commands in my code, more specifically
> the
> > command GO, because ill save some instructions in flash memory and
> according
> > to some conditions i want to jump the execution flow to this
> instructions,
> > without the need to return to the original instruction flow because they
> > have their own loop forever. I'm already able to write this instructions
> in
> > binary in flash, i just cant use the command to execute them.
> > I'm using LPC2138 and the IAR compiler.
> > Thanks
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> > ------------------------------------
> >
> >



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: Using ISP commands... - dentadura_unb - Aug 28 9:05:27 2008

Hi Foltos,

I'm using the func_ptr like u said but i noticed that if i try to jump
to any flash address i go to the beginnig of my firmware, and if i try
to jump to any RAM address the program counter gets lost and does nothing.
The assembly function always return compliation errors, like illegal
address or that im trying to access memory position 0x30 that cant be
read, any address i try.
My program stores binary instructions in ram and in flash, and i need
to jump to any of them...
Thanks for ur help!

--- In l...@yahoogroups.com, Foltos wrote:
>
> Hi,
>
> instead of ISP you can do something like this:
>
> void (*func_ptr)(void) = 0x123456;
> (*func_prt)();
>
> this will make a call to address 123456. Also you can use assembly to
> jump to an address:
>
> asm(" mov r0,=0x123456\n"
> " bx r0");
>
> Foltos
>
> Leonardo Silva wrote:
> > I'm looking for a way to use ISP commands in my code, more
specifically the
> > command GO, because ill save some instructions in flash memory and
according
> > to some conditions i want to jump the execution flow to this
instructions,
> > without the need to return to the original instruction flow
because they
> > have their own loop forever. I'm already able to write this
instructions in
> > binary in flash, i just cant use the command to execute them.
> > I'm using LPC2138 and the IAR compiler.
> > Thanks
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> > ------------------------------------
> >
> >



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )