Yahoo Groups archive

Lpc2000

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

Message

IAP throwing Undefined Instruction on some units

2006-02-23 by sig5534

CPU: LPC2104
Compiler: GCCARM

This is a really strange problem.  I am using IAP on some of my 
internal routines, my code was basically done for sometime now.  
Everything was working.  I built somemore proto boards and now a 
problem has shown up on 2 out of 11 boards.

When the IAP call executes to do a CopyRamToFlash, the CPU locks up 
going into the UIE vector (Undefined Instruction Exception). I ran a 
trace over and over again and the flash parameters are all setup 
right, but after the jump up into the high mem builtin IAP handler, 
it locks up the CPU at the UIE vector (0x38).  It never comes back 
from the IAP(CopyRamToFlash) call.

I can't understand this.  On 9 of the boards it works but on these 2 
it does not.  Same problem on both.  I have a 24MHz xtal and PLL set 
to 48Mhz.  I have tried calling the IAP() routine using either 24 or 
48 MHz but it makes no difference.  The built in IAP routine is going 
into the weeds, but only on some units.

Everything else on the PCBs is working normally, and the CPU is 
executing the rest of the code fine.  It is just that IAP() routine 
that is going nuts, and only on the CopyRamToFlash function.  The 
other calls like IAP erase sectors etc. are fine.

Other than the flashparameters, I do not see much else I can do to 
control the situation.  The IAP routine goes into the weeds on some 
LC2104 units but not on others.  Same code.  Really strange.  About 
the only thing I see left to do is change the CPUs.  Yet they take 
programming up the UART0 port.  Bizarre.

Anyone have any ideas on this?

Thanks,  Chris.

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.