46
µTasker general / also about the AT45DB161D SPI_EEPROM use!
« on: September 20, 2007, 04:28:40 AM »
HELLO:
In the app_hw_m5223x.h
#define SPI_FLASH_PAGE_LENGTH 264 // standard page size (B-device only allows 256)
//#define SPI_FLASH_PAGE_LENGTH 256 // size when power of 2 mode selected (only possible on D-device)
#define SPI_FLASH_BLOCK_LENGTH (8*SPI_FLASH_PAGE_LENGTH) // block size - a block can be deleted
#define SPI_FLASH_SECTOR_LENGTH (64*4*SPI_FLASH_PAGE_LENGTH) // exception sector 0a is 2k and sector 0b is 62k
#define SPI_FLASH_PAGES 1024 // 256k part expected
#define SPI_DATA_FLASH_SIZE (SPI_FLASH_PAGES*SPI_FLASH_PAGE_LENGTH)
I think this is satisfy to AT45DB021:
• Page Program Operation
– Single Cycle Reprogram (Erase and Program)
– 1024 Pages (264 Bytes/Page) Main Memory
if I use the AT45DB161D must be like this
#define SPI_FLASH_PAGE_LENGTH 512 // standard page size (B-device only allows 256)
//#define SPI_FLASH_PAGE_LENGTH 256 // size when power of 2 mode selected (only possible on D-device)
#define SPI_FLASH_BLOCK_LENGTH (8*SPI_FLASH_PAGE_LENGTH) // block size - a block can be deleted
#define SPI_FLASH_SECTOR_LENGTH (64*4*SPI_FLASH_PAGE_LENGTH) // exception sector 0a is 2k and sector 0b is 62k
#define SPI_FLASH_PAGES 4,096 // 256k part expected
#define SPI_DATA_FLASH_SIZE (SPI_FLASH_PAGES*SPI_FLASH_PAGE_LENGTH)
AT45DB161D:
• User Configurable Page Size
– 512 Bytes per Page
– 528 Bytes per Page
• Page Program Operation
– Intelligent Programming Operation
– 4,096 Pages (512/528 Bytes/Page) Main Memory
• Flexible Erase Options
– Page Erase (512 Bytes)
– Block Erase (4 Kbytes)
– Sector Erase (128 Kbytes)
– Chip Erase (16 Mbits)
• Two SRAM Data Buffers (512/528 Bytes)
In the app_hw_m5223x.h
#define SPI_FLASH_PAGE_LENGTH 264 // standard page size (B-device only allows 256)
//#define SPI_FLASH_PAGE_LENGTH 256 // size when power of 2 mode selected (only possible on D-device)
#define SPI_FLASH_BLOCK_LENGTH (8*SPI_FLASH_PAGE_LENGTH) // block size - a block can be deleted
#define SPI_FLASH_SECTOR_LENGTH (64*4*SPI_FLASH_PAGE_LENGTH) // exception sector 0a is 2k and sector 0b is 62k
#define SPI_FLASH_PAGES 1024 // 256k part expected
#define SPI_DATA_FLASH_SIZE (SPI_FLASH_PAGES*SPI_FLASH_PAGE_LENGTH)
I think this is satisfy to AT45DB021:
• Page Program Operation
– Single Cycle Reprogram (Erase and Program)
– 1024 Pages (264 Bytes/Page) Main Memory
if I use the AT45DB161D must be like this
#define SPI_FLASH_PAGE_LENGTH 512 // standard page size (B-device only allows 256)
//#define SPI_FLASH_PAGE_LENGTH 256 // size when power of 2 mode selected (only possible on D-device)
#define SPI_FLASH_BLOCK_LENGTH (8*SPI_FLASH_PAGE_LENGTH) // block size - a block can be deleted
#define SPI_FLASH_SECTOR_LENGTH (64*4*SPI_FLASH_PAGE_LENGTH) // exception sector 0a is 2k and sector 0b is 62k
#define SPI_FLASH_PAGES 4,096 // 256k part expected
#define SPI_DATA_FLASH_SIZE (SPI_FLASH_PAGES*SPI_FLASH_PAGE_LENGTH)
AT45DB161D:
• User Configurable Page Size
– 512 Bytes per Page
– 528 Bytes per Page
• Page Program Operation
– Intelligent Programming Operation
– 4,096 Pages (512/528 Bytes/Page) Main Memory
• Flexible Erase Options
– Page Erase (512 Bytes)
– Block Erase (4 Kbytes)
– Sector Erase (128 Kbytes)
– Chip Erase (16 Mbits)
• Two SRAM Data Buffers (512/528 Bytes)