<?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: S12XS-Family data flash operation</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197285#M7864</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks kef&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes after reading comparisions of S12X and S12P, I understand the D&amp;nbsp;flash global addressing. It is same as the Pflash global address but only&amp;nbsp;till 17 bit. i,.e.&amp;nbsp; 4bit PPAGE + 13bit Local Dflash Address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The address 0x10400 and 0x1113F for Dflash range is generated by Device Initialization. If I understand it clearly, one can easily know that PPAGE = 0x01 and rest is 16 bit local address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I will also chcek it by placing the flashCommand() routine into RAM area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I have checked with address 0x4400 once with same routine but that time also I've faced ACCERR by the memory controller.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Perhaps I was doing the memory access by wrong sequence i,e.&amp;nbsp; it might be like this,&lt;/P&gt;&lt;P&gt;First ERASE_VERIFY_D_FLASH_SECTION (0x11)&amp;nbsp; or ERASE_D_FLASH_SECTOR(0x12) command should be given to memory controller with valid starting address&amp;nbsp;then PROGRAM_D_FLASH should be given.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;is that logic correct? or if any other way to do it? please guide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- Thanks and Regards,&lt;/P&gt;&lt;P&gt;NKG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Dec 2010 20:37:43 GMT</pubDate>
    <dc:creator>nkgavali</dc:creator>
    <dc:date>2010-12-09T20:37:43Z</dc:date>
    <item>
      <title>S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197276#M7855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;void Write_Command(uchar index,uint fcmd,uint addr)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; FCCOBIX = index;&lt;/P&gt;&lt;P&gt;&amp;nbsp; FCCOB = (fcmd&amp;lt;&amp;lt;8) | addr;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write_Command(0x00,Program_Dflash,0x10);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write_Command(0x01,0x00,des_addr);&amp;nbsp; //0X00&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write_Command(0x02,0x00,1);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write_Command(0x03,0x00,2);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write_Command(0x04,0x00,3);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Write_Command(0x05,0x00,4);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I　use this program to write the data in the data flash area(the global address is 0x10_0000),but I can not&amp;nbsp; write the read out program so I couldnot read the data I just write,which engieer can help me or write down the read out program! Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 May 2010 11:18:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197276#M7855</guid>
      <dc:creator>gdszyj</dc:creator>
      <dc:date>2010-05-03T11:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197277#M7856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What exactly do you want to do? Just read the flash back?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have a couple of ways - either use global addressing in assembler, or use the EPAGE register and read from the EEPROM window. Check the datasheet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 05:30:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197277#M7856</guid>
      <dc:creator>jsmcortina</dc:creator>
      <dc:date>2010-05-05T05:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197278#M7857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can read the data from D-flash using one of the below shown example methods.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;case1:&amp;nbsp;&amp;nbsp;data =&amp;nbsp;*(uint8_t* __eptr)(0x0800);&lt;/P&gt;&lt;P&gt;(or)&lt;/P&gt;&lt;P&gt;case2:&amp;nbsp;data =&amp;nbsp;*(uint8_t* __far)(0x100000);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;both case1 and case2 will store the same value to the variable 'data'. But the only difference among them is 'how you are accessing the D-flash memory location'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case1 is accessing the D-flash memory using logical address.&lt;/P&gt;&lt;P&gt;Case2 is accessing the D-flash memory using global address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i.e. the logical address 0x0800 (of D-flash) is same as global address 0x100000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Freescale provides an executable file called&amp;nbsp;‘ hcs12xadrmap.exe ’ which shows the relation between logical and global address of HCS12(x) family. . It can be found in the following path of your computer.&lt;/P&gt;&lt;P&gt;C:\Program Files\Freescale\Codewarrior for HC12 V4.6\Prog&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;h&lt;/SPAN&gt;ope this helps&lt;/P&gt;&lt;P&gt;nandu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 May 2010 12:52:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197278#M7857</guid>
      <dc:creator>ndk</dc:creator>
      <dc:date>2010-05-05T12:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197279#M7858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you I use the local address with the EPAGE ,I read out the value .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 09:05:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197279#M7858</guid>
      <dc:creator>gdszyj</dc:creator>
      <dc:date>2010-05-12T09:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197280#M7859</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You just the&amp;nbsp;&amp;nbsp;expert, the way you suggest&amp;nbsp; was&amp;nbsp; very uses full ,than you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 May 2010 09:09:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197280#M7859</guid>
      <dc:creator>gdszyj</dc:creator>
      <dc:date>2010-05-12T09:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197281#M7860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I'm using S12P micro in my one of project. I'm using D_Flash for const variables storing. I've written following code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sCHAR&amp;nbsp;flashCommand(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;volatile uCHAR i;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;// Check whethere previous command is still executing&lt;BR /&gt;&amp;nbsp;while(!FLAG_COMMAND_COMPLETE);&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;// if there is any error then clear it&lt;BR /&gt;&amp;nbsp;if((!FLASH_STATUS_REG1) || (!FLASH_STATUS_REG2))&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;FLASH_STATUS_REG1 = 0x30;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Clear ACCERR and FPVIOL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;FLASH_STATUS_REG2 = 0x03;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Clear bit Errors&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;for(i=0; i&amp;lt;=indexCommandArray; i++)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;FCCOBIX = i;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;FCCOB &amp;nbsp;= flashCommandArray[i];&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; FSTAT = 0x80;&amp;nbsp;// Launch the command&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;asm nop;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;asm nop;&lt;BR /&gt;&amp;nbsp;asm nop;&lt;BR /&gt;&amp;nbsp;asm nop;&lt;BR /&gt;&amp;nbsp;asm nop;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;asm nop; &amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while(!FLAG_COMMAND_COMPLETE);&lt;BR /&gt;&amp;nbsp;return ERR_OK;&lt;BR /&gt;}&lt;BR /&gt;/****************************************************************************/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG &amp;nbsp;DFLASH_DATA&lt;/P&gt;&lt;P&gt;uINT __far&amp;nbsp;testString = 0x1234;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG &amp;nbsp;DEFAULT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The DFlash is defined as,&lt;/P&gt;&lt;P&gt;DFLASH_00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = READ_ONLY&amp;nbsp;&amp;nbsp; 0x010400 TO 0x0113FF;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And calling the function by,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;applyFlashCommand((uLONG) testString, 100, PROGRAM_D_FLASH);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when I execute above function, I got ACCERR everytime. As per ref manual the ACCERR will come when,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Set if CCOBIX[2:0] &amp;lt; 010 at command launch&amp;nbsp;&amp;nbsp; -- Confirmed&lt;BR /&gt;Set if CCOBIX[2:0] &amp;gt; 101 at command launch -- Confirmed&lt;BR /&gt;Set if command not available in current mode (see Table 13-27) - Confirmed&lt;BR /&gt;Set if an invalid global address [17:0] is supplied -- NOT Confirmed&lt;BR /&gt;Set if a misaligned word address is supplied (global address [0] != 0) -- NOT Confirmed&lt;BR /&gt;Set if the requested group of words breaches the end of the D-Flash block - Confirmed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Plz throw some light over this issue. I also confused that the DFlash address is logical or global(physical).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- Thanks and Regards,&lt;/P&gt;&lt;P&gt;N. K. Gavali&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 18:50:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197281#M7860</guid>
      <dc:creator>nkgavali</dc:creator>
      <dc:date>2010-12-08T18:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197282#M7861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wonder why are you using nonstandard bit and registers names in your code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This piece of code isn't the root of problem, but it is wrong. Code assumes FSTAT==0 when errors flags are not active.&amp;nbsp;At least CCIF is usually set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if((&lt;FONT color="#ff0000"&gt;!&lt;/FONT&gt;&lt;FONT color="#ff0000"&gt;FLASH_STATUS_REG1&lt;/FONT&gt;) || (!FLASH_STATUS_REG2))&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;FLASH_STATUS_REG1 = 0x30;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Clear ACCERR and FPVIOL&lt;BR /&gt;&amp;nbsp;&amp;nbsp;FLASH_STATUS_REG2 = 0x03;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Clear bit Errors&lt;BR /&gt;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Set if CCOBIX[2:0] &amp;lt; 010 at command launch&amp;nbsp;&amp;nbsp; -- Confirmed&lt;/LI&gt;&lt;LI&gt;Set if CCOBIX[2:0] &amp;gt; 101 at command launch -- Confirmed&lt;BR /&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This is not enough.&amp;nbsp;Different flash commands require different COBIX value. You didn't provide all relevant code, but indexCommandArray must be different for different commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since DFLASH addresses specified in PRM are DPAGE-paged, you need to add __DPAGE_SEG here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG &amp;nbsp;&lt;FONT color="#ff0000"&gt;__DPAGE_SEG&lt;/FONT&gt; DFLASH_DATA&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG &amp;nbsp;DEFAULT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note also that flash controller wants not DPAGE- or PPAGE-page paged addresses, but global addresses. You need to convert addresses of you DFLASH_DATA variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 19:36:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197282#M7861</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2010-12-08T19:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197283#M7862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks kef,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Plz explain me the relation between logical and global address for Dflash for perticularly S12P.&amp;nbsp; for S12X CPU it depends on EPAGE. but here no EPAGE available so, how can I calculate the global address for DFlash (as given in prm file above).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;// re-calculate the address&lt;BR /&gt;&amp;nbsp;address = ((uINT)globalAddress);&amp;nbsp;&amp;nbsp;&amp;nbsp; // I think I'm wrong here to calculate the global address&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;indexCommandArray &amp;nbsp;&amp;nbsp;= 0;&lt;BR /&gt;&amp;nbsp;flashCommandArray[0]&amp;nbsp;= commandAndHiByte;&amp;nbsp; // The&amp;nbsp;Command_Byte + HI_Byte_GLOBAL_Add&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;indexCommandArray &amp;nbsp;&amp;nbsp;= 1;&lt;BR /&gt;&amp;nbsp;flashCommandArray[1]&amp;nbsp;= address;&amp;nbsp; // 16 bit Global Add&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; indexCommandArray &amp;nbsp;&amp;nbsp;= 2;&lt;BR /&gt;&amp;nbsp;flashCommandArray[2]&amp;nbsp;= data;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 16 bit data&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Here I want to skip other 3 words and want to write single word.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;flashCommand();&amp;nbsp; // Code is explained as in previous&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- Thanks and Regards,&lt;/P&gt;&lt;P&gt;N. K. Gavali&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Dec 2010 20:37:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197283#M7862</guid>
      <dc:creator>nkgavali</dc:creator>
      <dc:date>2010-12-08T20:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197284#M7863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First of all sorry for bad advice. Your allocation is OK, provided far keyword is used.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG&amp;nbsp;&amp;nbsp;DFLASH_DATA&lt;/P&gt;&lt;P&gt;int __far var;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG &amp;nbsp;DEFAULT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But looking at memory maps in PDF and at&amp;nbsp;CW default PRM file for S12P, I don't understand why this PRM specifies such weird DFLASH addresses. 0x010400 to 0x0113FF. Page 0x01 must be PPAGE. Why then out-of-PPAGE window offsets?&lt;/P&gt;&lt;P&gt;I don't have S12P to try, but I would edit PRM to make DFLASH nonpaged 0x0400 to 0x13FF and remove __far keyword from variable definitions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To answer your question regarding global address for DLFASH. Look at S12P memory map in figure 1-2. CPU local address of DFLASH 0x0400 translates to global address 0x0_4400. So you need to add 0x4000 to CPU local address to get global address:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG&amp;nbsp;&amp;nbsp;DFLASH_DATA&lt;/P&gt;&lt;P&gt;int&amp;nbsp;var;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG &amp;nbsp;DEFAULT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;gloal_address = (uLONG)&amp;amp;var + 0x4000;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 01:31:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197284#M7863</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2010-12-09T01:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197285#M7864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks kef&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes after reading comparisions of S12X and S12P, I understand the D&amp;nbsp;flash global addressing. It is same as the Pflash global address but only&amp;nbsp;till 17 bit. i,.e.&amp;nbsp; 4bit PPAGE + 13bit Local Dflash Address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The address 0x10400 and 0x1113F for Dflash range is generated by Device Initialization. If I understand it clearly, one can easily know that PPAGE = 0x01 and rest is 16 bit local address.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I will also chcek it by placing the flashCommand() routine into RAM area.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I have checked with address 0x4400 once with same routine but that time also I've faced ACCERR by the memory controller.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Perhaps I was doing the memory access by wrong sequence i,e.&amp;nbsp; it might be like this,&lt;/P&gt;&lt;P&gt;First ERASE_VERIFY_D_FLASH_SECTION (0x11)&amp;nbsp; or ERASE_D_FLASH_SECTOR(0x12) command should be given to memory controller with valid starting address&amp;nbsp;then PROGRAM_D_FLASH should be given.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;is that logic correct? or if any other way to do it? please guide.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- Thanks and Regards,&lt;/P&gt;&lt;P&gt;NKG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 20:37:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197285#M7864</guid>
      <dc:creator>nkgavali</dc:creator>
      <dc:date>2010-12-09T20:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: S12XS-Family data flash operation</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197286#M7865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Ok. The problem is solved now. Applying appropriate global address to the memory controller solves this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks kef for clearing doubts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- NKG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2010 13:21:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/S12XS-Family-data-flash-operation/m-p/197286#M7865</guid>
      <dc:creator>nkgavali</dc:creator>
      <dc:date>2010-12-10T13:21:15Z</dc:date>
    </item>
  </channel>
</rss>

