Author Topic: AT45DB642D 1056 vs. 1024 Page Size  (Read 9611 times)

Offline kmjackson

  • Newbie
  • *
  • Posts: 33
    • View Profile
AT45DB642D 1056 vs. 1024 Page Size
« on: December 30, 2010, 05:57:15 PM »
Hi All,

If you are using the AT45DB642D with a page size of 1024 versus the 1056(standard), some code modification is needed... See posting
titled Different FileLength  

Kenneth

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: AT45DB642D 1056 vs. 1024 Page Size
« Reply #1 on: December 30, 2010, 07:07:27 PM »
Hi Kenneth

The power-of-two's mode has been used recently and so the latest development code supports this for chips with 256, 512 and 1024 byte page options.

I have attached the files as reference. The changes that you made look correct for the larger parts.
Search for #if SPI_FLASH_PAGE_LENGTH == 1024 to see the relevant code sections.

spi_flash_sam7x_atmel.h also includes a check of the present mode and the command to the power-of-two's mode if the option is selected (as you probably already know, it is then necessary to repower the board for the actual change to be accepted). Note also that (as you probably also know) this change can only be set and then the chip remains in that mode forever and can not be returned to the original mode.

WinSim.c contains the simulation support for the ATMEL chips in this mode too.

The power-of-two's mode is useful when working with a file system that starts in internal FLASH and is contiguous, overflowing into external SPI FLASH. This allows the file granularity to be set to match with internal granularity.

The default 1056 page size means that the chip's content is about 3% larger by default. Usually this default mode is retained since there is no real disadvantage with it in the majority of uses. It is also useful for implementing a file system with sector remapping and level wear management since the extra bytes at the end of the 1024 byte sectors can be used for a sectror check sum and bad-block management (typically implemented like this with NAND FLASH).

Regards

Mark

Offline kmjackson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: AT45DB642D 1056 vs. 1024 Page Size
« Reply #2 on: December 31, 2010, 03:39:49 AM »
Thanks

Offline kmjackson

  • Newbie
  • *
  • Posts: 33
    • View Profile
Re: AT45DB642D 1056 vs. 1024 Page Size
« Reply #3 on: December 31, 2010, 09:07:39 AM »
What is the lastest version of AVR32 uTasker?



Regards,
Kenneth

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3234
    • View Profile
    • uTasker
Re: AT45DB642D 1056 vs. 1024 Page Size
« Reply #4 on: December 31, 2010, 02:40:28 PM »
Kenneth

The present release is still V1.4.3 from 3.1.2010.

The development version contains quite a lot of new stuff which may be released in form of a new version shortly.

Regards

Mark