<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Flash programming fails with AT45DB641E</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/32716/flash-programming-fails-with-at45db641e</link><description> 
We are working on at91sam9G20 controller, which is interfaced to
AT45DB641E data flash 
recently AT45DB642D got obsolete. Keil flash programming algorithms
are available 
for AT45DB642D only. 
AT45DB641E is a 264 page size flash whereas AT45DB642D is</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Flash programming fails with AT45DB641E</title><link>https://community.arm.com/thread/108081?ContentTypeID=1</link><pubDate>Fri, 24 Apr 2015 21:55:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:f1b0c0c2-f9a6-44e7-aadd-5b2af268ef3e</guid><dc:creator>Kumar Reddy</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am unable to upload flash algorithm (.FLX file) as attachment,
Please follow the&lt;br /&gt;
instructions and create at your end.&lt;/p&gt;

&lt;p&gt;
make a copy the project \ARM\Flash\AT91SAM9_DF&lt;br /&gt;
edit FlashDev.c file&lt;br /&gt;
Add the following lines at the end of file&lt;/p&gt;

&lt;pre&gt;

#ifdef P264_CS1               // Page Size 264 Bytes, Chip Select 1
struct FlashDevice const FlashDevice  =  {
   FLASH_DRV_VERS,             // Driver Version, do not modify!
   &amp;quot;AT91SAM9 DataFlash Page264 CS1(45DB641E)&amp;quot;,   // Device Name
   EXTSPI,                     // Device Type
   0x20000000,                 // Device Start Address
   0x00840000,                 // Device Size in Bytes (8.25MB)
   264,                        // Programming Page Size
   0,                          // Reserved, must be 0
   0xFF,                       // Initial Content of Erased Memory
   100,                        // Program Page Timeout 100 mSec
   100,                        // Erase Sector Timeout 100 mSec

// Specify Size and Address of Sectors
   0x840, 0x000000,           // Sector Size 2112 bytes (block = 8*page)
   SECTOR_END
};
#endif

#ifdef P256_CS1               // Page Size 256 Bytes, Chip Select 1
struct FlashDevice const FlashDevice  =  {
   FLASH_DRV_VERS,             // Driver Version, do not modify!
   &amp;quot;AT91SAM9 DataFlash Page256 CS1(45DB641E)&amp;quot;,   // Device Name
   EXTSPI,                     // Device Type
   0x20000000,                 // Device Start Address
   0x00840000,                 // Device Size in Bytes (8.25MB)
   256,                        // Programming Page Size
   0,                          // Reserved, must be 0
   0xFF,                       // Initial Content of Erased Memory
   100,                        // Program Page Timeout 100 mSec
   100,                        // Erase Sector Timeout 100 mSec

// Specify Size and Address of Sectors
   0x800, 0x000000,           // Sector Size 2048 bytes (block = 8*page)
   SECTOR_END
};
#endif

&lt;/pre&gt;

&lt;p&gt;
pass, P256_CS1 or P264_CS1 through preprocessor symbols (present
in project options dialog)&lt;br /&gt;
as required&lt;/p&gt;

&lt;p&gt;
add the following lines to DFlashHW.c (in the beginning)&lt;/p&gt;

&lt;pre&gt;

// ----------------- Page Size 264, CS1 used ----------------------------------
#ifdef P264_CS1
#define PAGE_SIZE    264               // Size of page
#define ADDR_BITS    9                 // Bits for addressing inside page
#define CHIP_SIZE    0x840000          // Chip size (in bytes) = 8MB
#define SPI_PCS_DF   SPI_PCS1_DF
#define CS_INDEX     1
#endif

// ----------------- Page Size 256, CS1 used ----------------------------------
#ifdef P256_CS1
#define PAGE_SIZE    256               // Size of page
#define ADDR_BITS    8                 // Bits for addressing inside page
#define CHIP_SIZE    0x840000          // Chip size (in bytes) = 8MB
#define SPI_PCS_DF   SPI_PCS1_DF
#define CS_INDEX     1
#endif

&lt;/pre&gt;

&lt;p&gt;
compile the project, FLX file will be generated&lt;br /&gt;
copy FLX Files to \ARM\Flash folder&lt;br /&gt;
restart keil&lt;br /&gt;
new flash programming algorithm can be seen in flash programming
window.&lt;/p&gt;

&lt;p&gt;
Regards&lt;br /&gt;
Kumar&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash programming fails with AT45DB641E</title><link>https://community.arm.com/thread/82386?ContentTypeID=1</link><pubDate>Thu, 23 Apr 2015 20:30:08 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ade80baa-b072-484f-9cfb-db62db201995</guid><dc:creator>Divya Gowda</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Kumar,&lt;/p&gt;

&lt;p&gt;
can you please share the flash algorithm for AT45DB641E flash
device.. Even i am trying to use the same flash but unbale to get the
algorithm.&lt;/p&gt;

&lt;p&gt;
Regards,&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash programming fails with AT45DB641E</title><link>https://community.arm.com/thread/63454?ContentTypeID=1</link><pubDate>Tue, 03 Feb 2015 00:39:57 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:60c3fb26-01ac-4e88-9b53-0a26834713f1</guid><dc:creator>Kumar Reddy</dc:creator><description>&lt;p&gt;&lt;p&gt;
Problem solved&lt;br /&gt;
We have created new flash programming algorithm for the&lt;br /&gt;
new flash IC&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>