<?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>AT49xV32x flash programming algorithm</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/22728/at49xv32x-flash-programming-algorithm</link><description> 
I am now trying to write my own flash programming algorithm since
there is not one for my EN29LV320 flash memory in realview
MDK. And as I was told in the online help, I should find a model to
modify, which should be a short cut. I have looked over</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: AT49xV32x flash programming algorithm</title><link>https://community.arm.com/thread/52219?ContentTypeID=1</link><pubDate>Sun, 17 Aug 2008 23:05:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5a14ad74-8f3a-4c90-ab3d-f1a2770f0653</guid><dc:creator>Robert &amp;#160;</dc:creator><description>&lt;p&gt;&lt;p&gt;
The algorithm you are referring to is for AT49xV32x flash
connected to a 16-bit bus (flash addresses A0..A[x] are connected to
ARM CPU addresses A1..A[x+1]). Therefore the addresses for commands
specified in the flash user manual actually need to be shifted
left.&lt;/p&gt;

&lt;p&gt;
Following is another variant of the EraseSector function which
should be more explanatory:&lt;/p&gt;

&lt;pre&gt;
EraseSector (unsigned long adr) {

  // Start Erase Sector Command
  M16(base_adr + (0x555 &amp;lt;&amp;lt; 1)) = 0xAA;
  M16(base_adr + (0xAAA &amp;lt;&amp;lt; 1)) = 0x55;
  M16(base_adr + (0x555 &amp;lt;&amp;lt; 1)) = 0x80;
  M16(base_adr + (0x555 &amp;lt;&amp;lt; 1)) = 0xAA;
  M16(base_adr + (0xAAA &amp;lt;&amp;lt; 1)) = 0x55;
  M16(adr) = 0x30;

  return (Polling(adr));       // Wait until Erase completed
}
&lt;/pre&gt;

&lt;p&gt;
I have glanced over the EN29LV320 flash user manual and it seems
compatible with the AT49xV32x flash. So the existing algorithm for
AT49xV32x should work already for EN29LV320.&lt;/p&gt;

&lt;p&gt;
Algorithms regarding Boot Sectors:&lt;br /&gt;
EN29LV320T (Top Boot) should be compatible with AT49xV32xT
algorithm.&lt;br /&gt;
EN29LV320B (Bottom Boot) should be compatible with AT49xV32x
algorithm.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>