Yahoo Groups archive

Lpc2000

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

Thread

Reading from flash

Reading from flash

2005-06-28 by albin_martinsson

Hi

Anyone knows why I get some bit-errors when I am reading from the 
flashmemory. In my program I store some data (texts and other 
configurations) with the IAP routines. But if I compare the recently 
written data from RAM with the programmed data from Flash there are 
some bits that has changed, resulting in a checksum error for the 
data I have written to Flash. But!  when i do a memory dump from the 
flash memory with the LPC2100-program I always read the correct data.

I read from Flash by pointing a byte pointer like this:

tU8 *ptr;
flashaddress = 0x00020000;
...
ptr = (tU8 *)flashaddress;

When i turned off the MAM funktion the error reduced but there are 
still some errors. 

Can someone explain why this is so?

B.R  /Fredrik Martinsson

RE: [lpc2000] Reading from flash

2005-06-28 by Dan Beadle

The JTAG dump does not run at the same speed as the internal FLASH.
(Generally slower).  I would GUESS that you might have the MAM set up
too fast or the PLL too fast.  This could cause FLASH to read back
incorrectly at execution time, but the slower JTAG dump would read it
correctly.  


Dan

 

 

  _____  
Show quoted textHide quoted text
From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf
Of albin_martinsson
Sent: Monday, June 27, 2005 11:29 PM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] Reading from flash

 

Hi

Anyone knows why I get some bit-errors when I am reading from the 
flashmemory. In my program I store some data (texts and other 
configurations) with the IAP routines. But if I compare the recently 
written data from RAM with the programmed data from Flash there are 
some bits that has changed, resulting in a checksum error for the 
data I have written to Flash. But!  when i do a memory dump from the 
flash memory with the LPC2100-program I always read the correct data.

I read from Flash by pointing a byte pointer like this:

tU8 *ptr;
flashaddress = 0x00020000;
...
ptr = (tU8 *)flashaddress;

When i turned off the MAM funktion the error reduced but there are 
still some errors. 

Can someone explain why this is so?

B.R  /Fredrik Martinsson





  _____  

YAHOO! GROUPS LINKS 

 

*	 Visit your group "lpc2000
<http://groups.yahoo.com/group/lpc2000> " on the web.
	  
*	 To unsubscribe from this group, send an email to:
	 lpc2000-unsubscribe@yahoogroups.com
<mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
	  
*	 Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> . 

 

  _____  



[Non-text portions of this message have been removed]

Re: Reading from flash

2005-06-28 by albin_martinsson

Hi
Thanks for the quick answer,

the MAM is disabled,
PLL is set to MUL with 4  (clock freq * (4+1))
Im using the MCB2100 so the clock freq is 12 MHz and with the PLL 
the running speed is 60MHz. 

Do you think its better to slower down the PLL or should I configure 
the MAM function?

/FM


--- In lpc2000@yahoogroups.com, "Dan Beadle" <dan.beadle@i...> wrote:
> The JTAG dump does not run at the same speed as the internal FLASH.
> (Generally slower).  I would GUESS that you might have the MAM set 
up
> too fast or the PLL too fast.  This could cause FLASH to read back
> incorrectly at execution time, but the slower JTAG dump would read 
it
> correctly.  
> 
> 
> Dan
> 
>  
> 
>  
> 
>   _____  
> 
> From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On 
Behalf
> Of albin_martinsson
> Sent: Monday, June 27, 2005 11:29 PM
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] Reading from flash
> 
>  
> 
> Hi
> 
> Anyone knows why I get some bit-errors when I am reading from the 
> flashmemory. In my program I store some data (texts and other 
> configurations) with the IAP routines. But if I compare the 
recently 
> written data from RAM with the programmed data from Flash there 
are 
> some bits that has changed, resulting in a checksum error for the 
> data I have written to Flash. But!  when i do a memory dump from 
the 
> flash memory with the LPC2100-program I always read the correct 
data.
Show quoted textHide quoted text
> 
> I read from Flash by pointing a byte pointer like this:
> 
> tU8 *ptr;
> flashaddress = 0x00020000;
> ...
> ptr = (tU8 *)flashaddress;
> 
> When i turned off the MAM funktion the error reduced but there are 
> still some errors. 
> 
> Can someone explain why this is so?
> 
> B.R  /Fredrik Martinsson
> 
> 
> 
> 
> 
>   _____  
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *	 Visit your group "lpc2000
> <http://groups.yahoo.com/group/lpc2000> " on the web.
> 	  
> *	 To unsubscribe from this group, send an email to:
> 	 lpc2000-unsubscribe@yahoogroups.com
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
> 	  
> *	 Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
>  
> 
>   _____  
> 
> 
> 
> [Non-text portions of this message have been removed]

RE: [lpc2000] Re: Reading from flash

2005-06-28 by Dan Beadle

It sure sounds like you have it configured correctly.  I would try going
with the default speeds and see if you have any issues (12MHz).  If the
symptom goes away, you know you are on the right track.

 

Dan

 

  _____  
Show quoted textHide quoted text
From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On Behalf
Of albin_martinsson
Sent: Monday, June 27, 2005 11:50 PM
To: lpc2000@yahoogroups.com
Subject: [lpc2000] Re: Reading from flash

 

Hi
Thanks for the quick answer,

the MAM is disabled,
PLL is set to MUL with 4  (clock freq * (4+1))
Im using the MCB2100 so the clock freq is 12 MHz and with the PLL 
the running speed is 60MHz. 

Do you think its better to slower down the PLL or should I configure 
the MAM function?

/FM


--- In lpc2000@yahoogroups.com, "Dan Beadle" <dan.beadle@i...> wrote:
> The JTAG dump does not run at the same speed as the internal FLASH.
> (Generally slower).  I would GUESS that you might have the MAM set 
up
> too fast or the PLL too fast.  This could cause FLASH to read back
> incorrectly at execution time, but the slower JTAG dump would read 
it
> correctly.  
> 
> 
> Dan
> 
>  
> 
>  
> 
>   _____  
> 
> From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On 
Behalf
> Of albin_martinsson
> Sent: Monday, June 27, 2005 11:29 PM
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] Reading from flash
> 
>  
> 
> Hi
> 
> Anyone knows why I get some bit-errors when I am reading from the 
> flashmemory. In my program I store some data (texts and other 
> configurations) with the IAP routines. But if I compare the 
recently 
> written data from RAM with the programmed data from Flash there 
are 
> some bits that has changed, resulting in a checksum error for the 
> data I have written to Flash. But!  when i do a memory dump from 
the 
> flash memory with the LPC2100-program I always read the correct 
data.
> 
> I read from Flash by pointing a byte pointer like this:
> 
> tU8 *ptr;
> flashaddress = 0x00020000;
> ...
> ptr = (tU8 *)flashaddress;
> 
> When i turned off the MAM funktion the error reduced but there are 
> still some errors. 
> 
> Can someone explain why this is so?
> 
> B.R  /Fredrik Martinsson
> 
> 
> 
> 
> 
>   _____  
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *      Visit your group "lpc2000
> <http://groups.yahoo.com/group/lpc2000> " on the web.
>         
> *      To unsubscribe from this group, send an email to:
>       lpc2000-unsubscribe@yahoogroups.com
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
>         
> *      Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
>  
> 
>   _____  
> 
> 
> 
> [Non-text portions of this message have been removed]





  _____  

YAHOO! GROUPS LINKS 

 

*	 Visit your group "lpc2000
<http://groups.yahoo.com/group/lpc2000> " on the web.
	  
*	 To unsubscribe from this group, send an email to:
	 lpc2000-unsubscribe@yahoogroups.com
<mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
	  
*	 Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> . 

 

  _____  



[Non-text portions of this message have been removed]

Re: Reading from flash

2005-06-28 by albin_martinsson

Ok,

I have now set the system clock to 24 MHz and it works fine. Thanks 
for all help, now I am going to trim up the speed to see were the 
limit is. But i still think it is strange that it can't run at 
60MHz, it should according to the DS. In the real application were 
running with a 20Mhz osc so I think the limit there would be 40 MHz. 

Thanks for all help Dan.

/FM

--- In lpc2000@yahoogroups.com, "Dan Beadle" <dan.beadle@i...> wrote:
> It sure sounds like you have it configured correctly.  I would try 
going
> with the default speeds and see if you have any issues (12MHz).  
If the
> symptom goes away, you know you are on the right track.
> 
>  
> 
> Dan
> 
>  
> 
>   _____  
> 
> From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] On 
Behalf
> Of albin_martinsson
> Sent: Monday, June 27, 2005 11:50 PM
> To: lpc2000@yahoogroups.com
> Subject: [lpc2000] Re: Reading from flash
> 
>  
> 
> Hi
> Thanks for the quick answer,
> 
> the MAM is disabled,
> PLL is set to MUL with 4  (clock freq * (4+1))
> Im using the MCB2100 so the clock freq is 12 MHz and with the PLL 
> the running speed is 60MHz. 
> 
> Do you think its better to slower down the PLL or should I 
configure 
> the MAM function?
> 
> /FM
> 
> 
> --- In lpc2000@yahoogroups.com, "Dan Beadle" <dan.beadle@i...> 
wrote:
> > The JTAG dump does not run at the same speed as the internal 
FLASH.
> > (Generally slower).  I would GUESS that you might have the MAM 
set 
> up
> > too fast or the PLL too fast.  This could cause FLASH to read 
back
> > incorrectly at execution time, but the slower JTAG dump would 
read 
> it
> > correctly.  
> > 
> > 
> > Dan
> > 
> >  
> > 
> >  
> > 
> >   _____  
> > 
> > From: lpc2000@yahoogroups.com [mailto:lpc2000@yahoogroups.com] 
On 
> Behalf
> > Of albin_martinsson
> > Sent: Monday, June 27, 2005 11:29 PM
> > To: lpc2000@yahoogroups.com
> > Subject: [lpc2000] Reading from flash
> > 
> >  
> > 
> > Hi
> > 
> > Anyone knows why I get some bit-errors when I am reading from 
the 
> > flashmemory. In my program I store some data (texts and other 
> > configurations) with the IAP routines. But if I compare the 
> recently 
> > written data from RAM with the programmed data from Flash there 
> are 
> > some bits that has changed, resulting in a checksum error for 
the 
> > data I have written to Flash. But!  when i do a memory dump from 
> the 
> > flash memory with the LPC2100-program I always read the correct 
> data.
> > 
> > I read from Flash by pointing a byte pointer like this:
> > 
> > tU8 *ptr;
> > flashaddress = 0x00020000;
> > ...
> > ptr = (tU8 *)flashaddress;
> > 
> > When i turned off the MAM funktion the error reduced but there 
are 
> > still some errors. 
> > 
> > Can someone explain why this is so?
> > 
> > B.R  /Fredrik Martinsson
> > 
> > 
> > 
> > 
> > 
> >   _____  
> > 
> > YAHOO! GROUPS LINKS 
> > 
> >  
> > 
> > *      Visit your group "lpc2000
> > <http://groups.yahoo.com/group/lpc2000> " on the web.
> >         
> > *      To unsubscribe from this group, send an email to:
> >       lpc2000-unsubscribe@yahoogroups.com
> > <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
> >         
> > *      Your use of Yahoo! Groups is subject to the Yahoo! Terms 
of
Show quoted textHide quoted text
> > Service <http://docs.yahoo.com/info/terms/> . 
> > 
> >  
> > 
> >   _____  
> > 
> > 
> > 
> > [Non-text portions of this message have been removed]
> 
> 
> 
> 
> 
>   _____  
> 
> YAHOO! GROUPS LINKS 
> 
>  
> 
> *	 Visit your group "lpc2000
> <http://groups.yahoo.com/group/lpc2000> " on the web.
> 	  
> *	 To unsubscribe from this group, send an email to:
> 	 lpc2000-unsubscribe@yahoogroups.com
> <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> 
> 	  
> *	 Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service <http://docs.yahoo.com/info/terms/> . 
> 
>  
> 
>   _____  
> 
> 
> 
> [Non-text portions of this message have been removed]

SSP_SPI1 Read

2005-06-28 by sudip nag

Hi Everyone,

I am using LPC2138's SSP Controller (SPI1) in SPI mode. I am successful in sending data to SPI slave device. But confused how to read data from slave. If not mistaken, during read operation SPI master will provide the SCK signal to the slave. How to do this task with SSP.

Thanks.

Sudip Nag


		
---------------------------------
How much free photo storage do you get? Store your friends n family photos for FREE with Yahoo! Photos. 
 http://in.photos.yahoo.com

[Non-text portions of this message have been removed]

Re: [lpc2000] SSP_SPI1 Read

2005-06-28 by Don Williams

Im about to implement this design in copper and assume (hope?) I know whats
happening - but I dont understand ur question. With LPC2138 as master in
receive mode the data sheet is clear about SCK1 being asserted afetr SSEL1
goes low - where it will stay for the duration of the 8 or 16 bit transfer.
After 8 or 16th clk edge sck1 is disabled and SSEL1 goes hi again so the
transaction is over.
Whats the problem ?
Don Williams

----- Original Message ----- 
From: "sudip nag" <sudipnag1@...>
To: <lpc2000@yahoogroups.com>
Sent: Tuesday, June 28, 2005 8:13 PM
Subject: [lpc2000] SSP_SPI1 Read


>
>
> Hi Everyone,
>
> I am using LPC2138's SSP Controller (SPI1) in SPI mode. I am successful in
sending data to SPI slave device. But confused how to read data from slave.
If not mistaken, during read operation SPI master will provide the SCK
signal to the slave. How to do this task with SSP.
>
> Thanks.
>
> Sudip Nag
>
>
>
> ---------------------------------
> How much free photo storage do you get? Store your friends n family photos
for FREE with Yahoo! Photos.
Show quoted textHide quoted text
>  http://in.photos.yahoo.com
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

Re: [lpc2000] SSP_SPI1 Read

2005-06-29 by sudip nag

Hi Don,
I am using 8-bit mode with DS1306 RTC. The 8bit address+command is to be supplied from master and 8bit data from slave will go to the master (DS1306 read). After I send 8bit from MCU, SCK stops. Thus MISO do not receive anything. Thus I never read any data in MCU. 
 
Sudip

Don Williams <donw@...> wrote:
Im about to implement this design in copper and assume (hope?) I know whats
happening - but I dont understand ur question. With LPC2138 as master in
receive mode the data sheet is clear about SCK1 being asserted afetr SSEL1
goes low - where it will stay for the duration of the 8 or 16 bit transfer.
After 8 or 16th clk edge sck1 is disabled and SSEL1 goes hi again so the
transaction is over.
Whats the problem ?
Don Williams
Show quoted textHide quoted text
----- Original Message ----- 
From: "sudip nag" <sudipnag1@...>
To: <lpc2000@yahoogroups.com>
Sent: Tuesday, June 28, 2005 8:13 PM
Subject: [lpc2000] SSP_SPI1 Read


>
>
> Hi Everyone,
>
> I am using LPC2138's SSP Controller (SPI1) in SPI mode. I am successful in
sending data to SPI slave device. But confused how to read data from slave.
If not mistaken, during read operation SPI master will provide the SCK
signal to the slave. How to do this task with SSP.
>
> Thanks.
>
> Sudip Nag
>
>
>
> ---------------------------------
> How much free photo storage do you get? Store your friends n family photos
for FREE with Yahoo! Photos.
>  http://in.photos.yahoo.com
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>



---------------------------------
YAHOO! GROUPS LINKS 


    Visit your group "lpc2000" on the web.
  
    To unsubscribe from this group, send an email to:
 lpc2000-unsubscribe@yahoogroups.com
  
    Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


---------------------------------



		
---------------------------------
 Too much spam in your inbox? Yahoo! Mail gives you the best spam protection for FREE!
http://in.mail.yahoo.com

[Non-text portions of this message have been removed]

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.