Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: EFC internal latch buffer
PostPosted: Thu Sep 09, 2010 1:36 pm 
Offline

Joined: Thu Sep 09, 2010 1:18 pm
Posts: 3
Hello,

I have a basic understanding problem regarding the EFC internal latch buffer.

The datasheet mentions:
Quote:
Data to be written are stored in an internal latch buffer. The size of the latch buffer corresponds
to the page size. The latch buffer wraps around within the internal memory area address space
and appears to be repeated by the number of pages in it.


Basically this is clear, and should be the data source, which has to be written to the flash. However, I do not understand how to tell the EFC which buffer to use. In the examples they use the

uint8_t pPageBuffer[AT91C_IFLASH_PAGE_SIZE];

but I did not find the spot, where the EFC is told to use this buffer. However, it seems to work but I just don't understand this.

Can someone shine a light on this?

Thanks,
Bas


Top
 Profile  
 
 Post subject: Re: EFC internal latch buffer
PostPosted: Thu Sep 09, 2010 3:05 pm 
Offline

Joined: Thu Feb 25, 2010 5:02 pm
Posts: 88
Hello -

Quote:
In the examples they use the

uint8_t pPageBuffer[AT91C_IFLASH_PAGE_SIZE];

but I did not find the spot, where the EFC is told to use this buffer. However, it seems to work but I just don't understand this.


The EFC doesn't actually use this buffer it is just a staging buffer, what the EFC requires is the page number to write the latch buffer data to.

If you study the code you should see that:
- this staging buffer is populated with the data to be written.
- then, this staging buffer is copied to flash memory addresses (this copy is actually storing the data into the latch buffer).
- finally, this is followed by an EFC command to write the latch buffer data to a page number in flash (data is written a page at a time).

Hope this helps.

Regards,

_________________
Duane P. Fridley, IEEE CSDP
Viable Bytes, Inc.


Top
 Profile  
 
 Post subject: Re: EFC internal latch buffer
PostPosted: Thu Sep 09, 2010 6:34 pm 
Offline

Joined: Thu Sep 09, 2010 1:18 pm
Posts: 3
Hi,

yes thanks, it helped a lot and also makes sence ;).

Everything is clear now.

Thanks again,
Bas


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: