| Welcome to AT91SAM Community Forum http://www.at91.com/samphpbb/ |
|
| EFC internal latch buffer http://www.at91.com/samphpbb/viewtopic.php?f=15&t=19540 |
Page 1 of 1 |
| Author: | Kokonut [ Thu Sep 09, 2010 1:36 pm ] |
| Post subject: | EFC internal latch buffer |
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 |
|
| Author: | dfridley [ Thu Sep 09, 2010 3:05 pm ] |
| Post subject: | Re: EFC internal latch buffer |
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, |
|
| Author: | Kokonut [ Thu Sep 09, 2010 6:34 pm ] |
| Post subject: | Re: EFC internal latch buffer |
Hi, yes thanks, it helped a lot and also makes sence Everything is clear now. Thanks again, Bas |
|
| Page 1 of 1 | All times are UTC + 1 hour [ DST ] |
| Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |
|



Forum