<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S12 / MagniV MicrocontrollersのトピックRe: 1M Flash Memory addressable thru SPI0?</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143707#M3610</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Pang,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;What sort of flash memory do you wish to utilize?&amp;nbsp; The&amp;nbsp;solution should be straight forward if you select a serial, SPI compatible, data flash device.&amp;nbsp; It is then a question of matching the&amp;nbsp;SPI setup to the requirements of the external flash, and providing the sequence of byte transactions necessary to communicate with the device (per its data sheet).&amp;nbsp; I can't be more specific without knowledge of your device type.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If a parallel flash device is required, SPI communications is possible, but will involve a significantly more complex hardware interface, with additional shift registers and control lines necessary.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Jan 2007 10:51:26 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-01-27T10:51:26Z</dc:date>
    <item>
      <title>1M Flash Memory addressable thru SPI0?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143706#M3609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi everyone,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I want to read/write 1M byte flash memory thru SPI0.&amp;nbsp; Can someone show me how to make it?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am using CW V4.6 with MC9S12XDP.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Pang&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 05:19:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143706#M3609</guid>
      <dc:creator>Pang</dc:creator>
      <dc:date>2007-01-27T05:19:33Z</dc:date>
    </item>
    <item>
      <title>Re: 1M Flash Memory addressable thru SPI0?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143707#M3610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Pang,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;What sort of flash memory do you wish to utilize?&amp;nbsp; The&amp;nbsp;solution should be straight forward if you select a serial, SPI compatible, data flash device.&amp;nbsp; It is then a question of matching the&amp;nbsp;SPI setup to the requirements of the external flash, and providing the sequence of byte transactions necessary to communicate with the device (per its data sheet).&amp;nbsp; I can't be more specific without knowledge of your device type.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;If a parallel flash device is required, SPI communications is possible, but will involve a significantly more complex hardware interface, with additional shift registers and control lines necessary.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 10:51:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143707#M3610</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-01-27T10:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: 1M Flash Memory addressable thru SPI0?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143708#M3611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Mac,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;My serial&amp;nbsp;memory is S25F004A0&amp;nbsp;thru&amp;nbsp;SPI0. It looks like&amp;nbsp; that I have to define some micros for communication settings.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#define CS_FLASH_ON PTH_PTH1= 0&lt;/DIV&gt;&lt;DIV&gt;#define CS_FLASH_ON PTH_PTH1=0&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;There might be some other settings for data read/write. I am not sure how&amp;nbsp;to write right code for data access exceed to 64K if I just use 2-byte for data addressing. Could you please clarify whatelse to do so that I&amp;nbsp;can read/write beyond 64K?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;One question,&amp;nbsp;is there a&amp;nbsp;sector (64byte or bigger 512byte)&amp;nbsp;for data allocation in this 1M&amp;nbsp;serial falsh memory just like DOS Disk Management.?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Pang&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 28 Jan 2007 10:33:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143708#M3611</guid>
      <dc:creator>Pang</dc:creator>
      <dc:date>2007-01-28T10:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: 1M Flash Memory addressable thru SPI0?</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143709#M3612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Pang,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I couldn't find your exact part using Google, but did find apparently quite similar part numbers.&amp;nbsp; These have 512 Kbyte capacity, rather than 1Mbyte, and have a minimum erase sector of 4Kbyte.&amp;nbsp; Who manufactures the part you intend to use?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Yes, you will need to allocate the CS signal from GPIO.&amp;nbsp; You will also need to set CPOL and CPHA control bits to suit the flash device (0,0 or 1,1).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;For the data sheets that I examined, a 24-bit (3-byte) address is sent to the device, following the command byte.&amp;nbsp; This will allow addressing the complete range for the device.&amp;nbsp; The most significant address byte is sent first.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;As mentioned above, the minimum erase block size appears to be 4Kbyte.&amp;nbsp; This will likely make the management of smaller data allocation blocks more complex.&amp;nbsp; Perhaps others may be able to advise you on a suitable data management strategy.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2007 20:28:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/1M-Flash-Memory-addressable-thru-SPI0/m-p/143709#M3612</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-01-29T20:28:23Z</dc:date>
    </item>
  </channel>
</rss>

