Reinvoke ISP issue on a LPC802?

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

Reinvoke ISP issue on a LPC802?

1,656 Views
t123456
Contributor II

Does anyone have an example of implementing the reinvoke_isp on a LPC802?
Also what is meant by this line in the manual "If using USART ISP mode, enable the clocks to the default before calling this command."? Are the clocks in default after a power reset?


int main(void)
{
command[0] = (uint32_t) 57;
command[1] = 1;
iap_entry(command, result);
return 0;
}


I know the hardware is correct because when I reset without any code loaded or reset and pull the ISP pin low I enter the Autobaud detection routine.
However, when I try to enter through software it goes to address 0x0F0003B6 and hangs. If I change the Type to anything other than one the iap_entry returns with an error.

I have tried setting the clocks in all sorts of ways without any luck.

Labels (1)
Tags (2)
7 Replies

574 Views
jrevans
Contributor III

I just thought I'd mention that I was experiencing the same problem, but we found a solution.  The thread is here:  https://community.nxp.com/t5/LPC-Microcontrollers/LPC802-Reinvoke-ISP-not-working-with-LPCXpresso802...

 

Summary:

Remove calls to __disable_irq(); from my code before I call the library's IAP_ReinvokeISP() function.  Additionally, modify the library's iap_entry() function to remove the call to __disable_irq(); from there also!

0 Kudos

940 Views
koenvda
Contributor I

Hi Tad,

I'm facing the same issue. Did you ever found the solution? 

Thanks!

 

 

1,552 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello   Tad Masek,

You can refer to the code about  Chip_IAP_ReinvokeISP() in below thread:

How to reinvoke bootloader in LPC824 with iap command?  

Regards,

Alice

0 Kudos

1,552 Views
t123456
Contributor II

Hi Alice,

Thank you for the reply. I actually tried that code early on in my testing. Here is the output:

Part ID is: 00008023
Unique Part ID is:0x20480C028055AE63012614110A14F5000D03
Enter UART ISP mode

This code stops at the same location in memory as mine did.

PC = 0F00025A, CycleCnt = 00000000
R0 = 00000000, R1 = 00000001, R2 = 000000FF, R3 = 00000000
R4 = 00000001, R5 = 00000000, R6 = 00000001, R7 = 10000738
R8 = FFFFFFFF, R9 = FFFFFFFF, R10= 0FFF07E0, R11= 00000000
R12= 00000015
SP(R13)= 10000338, MSP= 100006C8, PSP= 10000338, R14(LR) = 0F0003BD
XPSR = 61000000: APSR = nZCvq, EPSR = 01000000, IPSR = 000 (NoException)
CFBP = 02000001, CONTROL = 02, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 01
FPU regs: FPU not enabled / not implemented on connected CPU.

So calling Reinvoke ISP seems to be working. If I give it any other type than 1 (serial) it will exit. However it just hangs. This only happen when entering ISP through software. It would fine if I enter using the ISP pin. This makes me wonder if its a clock setup issue or something but i cant find any details on how to setup to call reinvoke isp other than "If using USART ISP mode, enable the clocks to the default before calling this command."

0 Kudos

1,551 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Tad,

You can use Flash Magic test whether enter ISP mode, refer to this thread:

https://community.nxp.com/message/1104337 

Regards,

Alice

0 Kudos

1,551 Views
t123456
Contributor II

Hi Alice,

Thank you for this link but testing if I entered it has not been a issue? ISP works find when I enter through hardware. The micro controller just hangs when I enter ISP through software.

Well I am making the assumption that when entering ISP through software it will enter at the autobaud routine so I need to send the ? until I get the "Synchronize" in return. Is this correct? I have tried initializing the UART before calling reinvoke isp but that didnt make a difference.

Tad

1,552 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Tad,

After enter ISP mode use software API, You can also refer to my video in that thread to check whether

successfully entered ISP, 

Open flash magic, "- Using Flash Magic -> ISP ->Read Device Signature .".

 

Regards,

Alice

0 Kudos