Author Topic: AT26DF081A SPI_EEPROM  (Read 8532 times)

Offline evgenik

  • Newbie
  • *
  • Posts: 18
    • View Profile
AT26DF081A SPI_EEPROM
« on: March 17, 2008, 11:09:37 AM »
Hi Mark.
Now before me there is a problem: to write to EEPROM, and then to read writed data from EEPROM. I am configured system for working with SPI_FILE_SYSTEM , EEPROM configuration:
#define uFILE_START 0x0
#define EEPROM_1024K
...
#ifdef EEPROM_1024K
  #define EEPROM_PAGE_SIZE 256                                 // respect larger page size in SPI EEPROM
  #define FILE_GRANULARITY (4 * 1024)                         // File made up of 4k byte FLASH blocks
  #define SINGLE_FILE_SIZE (FILE_GRANULARITY)            // each file a multiple of 4k
  #define FILE_SYSTEM_SIZE (256 * SINGLE_FILE_SIZE)   // 1024k reserved for file system (including parameter blocks)
#endif

#define SPI_FLASH_PAGE_LENGTH 256                           // size when power of 2 mode selected (only possible on D-device)
#define SPI_FLASH_BLOCK_LENGTH (16 * SPI_FLASH_PAGE_LENGTH)      // block size 4k - a block can be deleted
#define SPI_FLASH_SECTOR_LENGTH (64 * SPI_FLASH_BLOCK_LENGTH)  // exception sector 0a is 64k and sector 0 is 64k
#define SPI_FLASH_PAGES (SPI_FLASH_PAGE_LENGTH * 4 * 1024)                 
#define SPI_DATA_FLASH_SIZE (SPI_FLASH_PAGES * SPI_FLASH_PAGE_LENGTH)

, on to write down parameters at me it is impossible: the program strated loop( on function :
 fnSetPar((PAR_DEVICE | TEMPORARY_PARAM_SET), (unsigned char *)&temp_pars->temp_parameters, sizeof(PARS)); ->
fnWaitWriteComplete(void); and not get out from it (ucStatus every time = 255).
. What I need to check up to be confidence, what the configuration of parameters is true or I don't forgotten do any operation with EEPROM?

Thanks.
Evgeni Kosakovski.
« Last Edit: March 17, 2008, 11:12:14 AM by evgenik »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3236
    • View Profile
    • uTasker
Re: AT26DF081A SPI_EEPROM
« Reply #1 on: March 17, 2008, 12:01:10 PM »
Hi Evgeni

The AT26DF081A is an SPI FLASH chip. How to work with SPI FLASH devices is explained in http://www.utasker.com/docs/uTasker/uTaskerFileSystemSPI_FLASH_003.PDF

It is not correct to set it up for SPI EEPROM use since this is only for M95xxx type EEPROM devices as described in http://www.utasker.com/docs/uTasker/uTaskerSPI_EEPROM.pdf

However the driver code supports the AT45DBxxx series of chips and so will probably not work directly with the AT26DFxxx types - I didn't look at the differences in detail, but I expect that there may be a few things which need adapting.

If you can use an AT45DBxxx instead it will work when configured correctly - you can probably also adapt the existing driver to use the type you have as well.

Regards

Mark