Yahoo Groups archive

Lpc2000

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

Message

Re: IAP and then strange behavior

2006-02-04 by Jayasooriah

Bob,

Those who feel offended when I point out deficiencies in boot loader 
implementation please do not read further.

I found that the need to specify CPU clock frequency at run-time IMO causes 
a number of problems including the one you pointed out.  Sometimes CPU 
clock is changed at runtime based for power considerations you have to keep 
track of this for IAP calls.

Flash programming requires three parameters relating to CPU clock.  The 
first two of these, relating to writing to LPC timing registers #1 and #2 
appear to accept a large degree of variation, at least 1:4 in my case.

I did away with the need for CPU clock at the third instance where boot 
loader IAP implementation uses CPU clock parameter.  After issuing a flash 
command, it is possible to determine when this is complete by examining LPC 
flash controller status register.  I do this, but boot loader code does 
not.  Instead, it waits for a programmed number of cycles based on the 
supplied clock frequency.

When the programmer inadvertently supplies a low clock speed, the IAP call 
terminates before the flash controller is ready, and you can see that what 
happens after this is indeterminate.  Worse, it can permanently destroy the 
part.

It appears that for the timing register parameters accept quite a large 
variance, at least 1 to 4 variance in my case.  If Philips would disclose 
what are these limits are, it is possible one could do away with need for 
CPU clock frequency altogether for IAP or ISP calls.

My experience is limited to boards with 14M7456 crystals and with  PLL 
speeds between 1 to 4 times that.

Regards,

Jaya

--- In lpc2000@yahoogroups.com, "lpc2100_fan" <lpc2100_fan@...> wrote:
 >
 > Tom,
 >
 > I am absolutely certain about this, it has been verified with Philips.
 > Each IAP call needs to have the frequence the device is currently
 > running at. If the PLL is active the parameter needs to be PLL*ext. Freq.
 >
 > The "funny" part is, it works ALMOST all the time even with the wrong
 > frequency.
 >
 > Bob

Send instant messages to your online friends http://au.messenger.yahoo.com

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.