How to run a program using ISP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to run a program using ISP

2,671 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Mon Jan 19 01:58:02 MST 2015
Hi all,

I have a program that can erase and upload program using the ISP. I need to run your program. The UM is written that the program starts with the command "GO", but I do not know what the address is. How do I know what is the address to start the program?
Labels (1)
0 Kudos
Reply
11 Replies

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Wed Jan 21 06:40:41 MST 2015

Quote: masterboy
Can be run ISP mode from user code?



Which MCU are you using?

[color=#f00]IAP57 + ISP_Select_Pin[/color] is starting the selected ISP mode...

If you are using a LPC11 with more than one ISP mode (LPC11Cxx) this ISP_Select_Pin (PIO0_3) is selecting UART- or CAN-ISP...
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArneB on Wed Jan 21 05:06:57 MST 2015

Quote: masterboy
Can be run ISP mode from user code?


Yes, IAP command 57 (Reinvoke ISP)
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Wed Jan 21 04:21:45 MST 2015
Can be run ISP mode from user code?
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Mon Jan 19 06:31:17 MST 2015

Quote: ArneB
As far as I know, at address 0 is the branch instruction + reset vector located.


This is true for ARM7 but not for Cortex-M.

In Cortex-M at address 0 there is the initial SP and at address 4 the reset vector (not a branch instruction!).

The user manual for LPC81x also requires that address to be at least 0x200, so I'm a bit surprised it is working.  Maybe NXP implemented special handling for 0 without documenting it?
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by masterboy on Mon Jan 19 05:56:32 MST 2015
It works, thank you. But, this works only when it is set CRP_WORD = CRP_NO_CRP. Is it possible for this to work when set CRP_WORD = CRP_CRP1?
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Jan 19 04:52:32 MST 2015

Quote: ArneB

Quote: 1234567890
In doubt use NVICSystemReset().


Yep, this is the clean way, if your application is running....



And of course in ISP, too  :bigsmile: 
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArneB on Mon Jan 19 04:43:34 MST 2015

Quote: 1234567890
In doubt use NVICSystemReset().


Yep, this is the clean way, if your application is running. But the OP asks for a solution in ISP mode, if I understand it correctly...
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArneB on Mon Jan 19 04:38:00 MST 2015

Quote:
Ary you sure that works on Cortex-M?

According to the user manual you are not allowed to use an address less than 0x200.



It works at least for the LPC8XX family, therefore its worth a try for the LPC11XX. As far as I know, at address 0 is the branch instruction + reset vector located.
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by 1234567890 on Mon Jan 19 04:33:20 MST 2015
In doubt use NVICSystemReset().
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Mon Jan 19 04:30:53 MST 2015

Quote: ArneB
Try "G 0 T" + CRLF


Ary you sure that works on Cortex-M?

According to the user manual you are not allowed to use an address less than 0x200.
0 Kudos
Reply

2,638 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ArneB on Mon Jan 19 03:39:59 MST 2015
Try "G 0 T" + CRLF
0 Kudos
Reply