<?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>MPC5xxx中的主题 Re: 5554 flash problem</title>
    <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1353240#M19320</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you need to follow whole procedure described in section "13.4.2.3 Flash Programming". Not just one step.&lt;/P&gt;
&lt;P&gt;I found this piece of test code in my repository:&lt;/P&gt;
&lt;P&gt;/* Unlock block L0 at 0x0000_0000 */&lt;/P&gt;
&lt;P&gt;FLASH.LMLR.R = 0xA1A11111;&lt;BR /&gt;FLASH.LMLR.R = 0xFFFFFFFE;&lt;BR /&gt;&lt;BR /&gt;FLASH.SLMLR.R = 0xC3C33333;&lt;BR /&gt;FLASH.SLMLR.R = 0xFFFFFFFE;&lt;BR /&gt;&lt;BR /&gt;/* Erase L0 block */&lt;BR /&gt;FLASH.MCR.B.ERS = 1;&lt;BR /&gt;FLASH.LMSR.R = 1;&lt;BR /&gt;*(unsigned int *)0x0 = 0xFFFFFFFF;&lt;BR /&gt;FLASH.MCR.B.EHV = 1;&lt;BR /&gt;while(FLASH.MCR.B.DONE == 0){};&lt;BR /&gt;if(FLASH.MCR.B.PEG == 0)&lt;BR /&gt;while(1){};&lt;BR /&gt;FLASH.MCR.B.EHV = 0;&lt;BR /&gt;FLASH.MCR.B.ERS = 0;&lt;/P&gt;
&lt;P&gt;/* Program the block with some data */&lt;BR /&gt;for(i=0;i&amp;lt;0x4000; i=i+8)&lt;BR /&gt;{&lt;BR /&gt;FLASH.MCR.B.PGM = 1;&lt;BR /&gt;*(unsigned int *)i = 0xAABBCCDD;&lt;BR /&gt;*(unsigned int *)(i+4) = 0x11223344;&lt;BR /&gt;FLASH.MCR.B.EHV = 1;&lt;BR /&gt;while(FLASH.MCR.B.DONE == 0){};&lt;BR /&gt;if(FLASH.MCR.B.PEG == 0)&lt;BR /&gt;while(1){};&lt;BR /&gt;FLASH.MCR.B.EHV = 0;&lt;BR /&gt;FLASH.MCR.B.PGM = 0;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notes:&lt;/P&gt;
&lt;P&gt;- Read-While-Write (RWW) is supported only between partitions. See "Table 13-4. Flash Partitions" in the reference manual. When a partition is being programmed or erased, the code must run from another partition or from RAM.&lt;/P&gt;
&lt;P&gt;- It is important to program only a doubleword which is fully erased:&lt;/P&gt;
&lt;P&gt;"Whenever a program operation occurs, ECC bits are programmed. ECC is handled on a 64-bit boundary.&lt;BR /&gt;Thus, if only one word in any given 64-bit ECC segment is programmed, the adjoining word (in that&lt;BR /&gt;segment) should not be programmed because ECC calculation has already completed for that 64-bit&lt;BR /&gt;segment. Attempts to program the adjoining word will probably result in an operation failure. It is&lt;BR /&gt;recommended that all programming operations be from 64 bits to 256 bits, and be 64-bit aligned. The&lt;BR /&gt;programming operation should completely fill selected ECC segments within the page."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Mon, 11 Oct 2021 05:11:43 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2021-10-11T05:11:43Z</dc:date>
    <item>
      <title>5554 flash problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1352788#M19314</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi to everyone:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;I have a question about MPC5554 flash.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;In section&amp;nbsp;&lt;/SPAN&gt;13.4.2.3 &lt;EM&gt;Flash Programming&amp;nbsp;&lt;/EM&gt;&lt;SPAN&gt;of &lt;EM&gt;MPC5553_4_Reference_Manual,_Rev_31,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#FF6600"&gt;&lt;SPAN&gt;&lt;EM&gt;" 2.&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;Write the first address to be programmed in the Flash module with the program data. This write is referred to as a program data interlock write. An interlock write may be either be an aligned word&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;EM&gt;or double-word."&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;In order to realize this function, I wrote the following code&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;void FlashWrite(uint32 address_u32,uint32 data_u32)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&amp;nbsp; *(uint32*)address_u32 = data_u32;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;But it didn't work when debugging and the number in the address is still FF.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;So,how to write data to mpc5554 through C code?&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Oct 2021 15:12:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1352788#M19314</guid>
      <dc:creator>韦恩</dc:creator>
      <dc:date>2021-10-08T15:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: 5554 flash problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1353240#M19320</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;you need to follow whole procedure described in section "13.4.2.3 Flash Programming". Not just one step.&lt;/P&gt;
&lt;P&gt;I found this piece of test code in my repository:&lt;/P&gt;
&lt;P&gt;/* Unlock block L0 at 0x0000_0000 */&lt;/P&gt;
&lt;P&gt;FLASH.LMLR.R = 0xA1A11111;&lt;BR /&gt;FLASH.LMLR.R = 0xFFFFFFFE;&lt;BR /&gt;&lt;BR /&gt;FLASH.SLMLR.R = 0xC3C33333;&lt;BR /&gt;FLASH.SLMLR.R = 0xFFFFFFFE;&lt;BR /&gt;&lt;BR /&gt;/* Erase L0 block */&lt;BR /&gt;FLASH.MCR.B.ERS = 1;&lt;BR /&gt;FLASH.LMSR.R = 1;&lt;BR /&gt;*(unsigned int *)0x0 = 0xFFFFFFFF;&lt;BR /&gt;FLASH.MCR.B.EHV = 1;&lt;BR /&gt;while(FLASH.MCR.B.DONE == 0){};&lt;BR /&gt;if(FLASH.MCR.B.PEG == 0)&lt;BR /&gt;while(1){};&lt;BR /&gt;FLASH.MCR.B.EHV = 0;&lt;BR /&gt;FLASH.MCR.B.ERS = 0;&lt;/P&gt;
&lt;P&gt;/* Program the block with some data */&lt;BR /&gt;for(i=0;i&amp;lt;0x4000; i=i+8)&lt;BR /&gt;{&lt;BR /&gt;FLASH.MCR.B.PGM = 1;&lt;BR /&gt;*(unsigned int *)i = 0xAABBCCDD;&lt;BR /&gt;*(unsigned int *)(i+4) = 0x11223344;&lt;BR /&gt;FLASH.MCR.B.EHV = 1;&lt;BR /&gt;while(FLASH.MCR.B.DONE == 0){};&lt;BR /&gt;if(FLASH.MCR.B.PEG == 0)&lt;BR /&gt;while(1){};&lt;BR /&gt;FLASH.MCR.B.EHV = 0;&lt;BR /&gt;FLASH.MCR.B.PGM = 0;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Notes:&lt;/P&gt;
&lt;P&gt;- Read-While-Write (RWW) is supported only between partitions. See "Table 13-4. Flash Partitions" in the reference manual. When a partition is being programmed or erased, the code must run from another partition or from RAM.&lt;/P&gt;
&lt;P&gt;- It is important to program only a doubleword which is fully erased:&lt;/P&gt;
&lt;P&gt;"Whenever a program operation occurs, ECC bits are programmed. ECC is handled on a 64-bit boundary.&lt;BR /&gt;Thus, if only one word in any given 64-bit ECC segment is programmed, the adjoining word (in that&lt;BR /&gt;segment) should not be programmed because ECC calculation has already completed for that 64-bit&lt;BR /&gt;segment. Attempts to program the adjoining word will probably result in an operation failure. It is&lt;BR /&gt;recommended that all programming operations be from 64 bits to 256 bits, and be 64-bit aligned. The&lt;BR /&gt;programming operation should completely fill selected ECC segments within the page."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 11 Oct 2021 05:11:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1353240#M19320</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-10-11T05:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: 5554 flash problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1356560#M19377</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Lukas:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Thank you very much for your help.&amp;nbsp;According to the code you gave me, I wrote the relevant program again, but there was a new problem.Here is my code&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;/* Program the block with some data */&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.PGM = 1;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;*(unsigned int *)（0x00030010）= 0x12341234;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;*(unsigned int *)(0x00030014) = 0x27582758;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.EHV = 1;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;while(FLASH.MCR.B.DONE == 0){};&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;if(FLASH.MCR.B.PEG == 0)&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;while(1){};&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.EHV = 0;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.PGM = 0;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;During debugging, I found that in the memory window of CodeWarrior, &lt;EM&gt;&lt;FONT color="#0000FF"&gt;0x00030010-0x00030019&lt;/FONT&gt;&lt;/EM&gt;&amp;nbsp;is &lt;FONT color="#FF6600"&gt;XX&lt;/FONT&gt; and &lt;EM&gt;&lt;FONT color="#0000FF"&gt;0x00030020&amp;nbsp;&lt;/FONT&gt;&lt;/EM&gt;is &lt;FONT color="#FF6600"&gt;27 58 27 58 %x%x — —&lt;/FONT&gt;。&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;When I power up again and run the erase program：&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;FLASH.MCR.B.ERS = 1;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;FLASH.LMSR.R = 1;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;*(unsigned int *)0x0 = 0xFFFFFFFF;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;FLASH.MCR.B.EHV = 1;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;while(FLASH.MCR.B.DONE == 0){};&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;if(FLASH.MCR.B.PEG == 0)&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;while(1){};&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;FLASH.MCR.B.EHV = 0;&lt;/EM&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;EM&gt;FLASH.MCR.B.ERS = 0;&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#000000"&gt;The situation in the memory window of CodeWarrior is still the same as above. &lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT color="#000000"&gt;Excuse me, why does this happen and how to solve it？&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Best regards.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px lia-align-left"&gt;&lt;FONT color="#000000"&gt;韦恩&lt;/FONT&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Oct 2021 15:27:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1356560#M19377</guid>
      <dc:creator>韦恩</dc:creator>
      <dc:date>2021-10-15T15:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: 5554 flash problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1357054#M19387</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;'XX' is caused by overprogramming, most likely. As I already mentioned, make sure that the double word si fully erased before programming.&lt;/P&gt;
&lt;P&gt;If the content of flash is still the same after programming, it's caused by cache. It's necessary to invalidate the cache after erase operation (see attached example). Or you can disable the cache or configure certain areas as cache inhibited by MMU.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 08:23:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1357054#M19387</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-10-18T08:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: 5554 flash problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1357989#M19408</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Lukas:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Thank you very much for your answer. I wonder if you mind if I ask two more questions：&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;1、 I ran the last code and found a new problem，Code 1 runs normally. When I run code 2, the program is abnormal and falls into an endless loop. I don't know where the problem is and how to solve it, so I ask for your help. Here is my code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;/* Unlock block L0 at 0x0000_0000 */&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.LMLR.R = 0xA1A11111;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.LMLR.R = 0xFFFFFFFE;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.SLMLR.R = 0xC3C33333;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.SLMLR.R = 0xFFFFFFFE;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;/* Erase L0 block */&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.ERS = 1;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.LMSR.R = 1;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;*(unsigned int *)0x0 = 0xFFFFFFFF;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.EHV = 1;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;while(FLASH.MCR.B.DONE == 0){};&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;if(FLASH.MCR.B.PEG == 0)&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;while(1){};&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.EHV = 0;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.ERS = 0;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;/* Program the block with some data */&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.PGM = 1;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;//code1&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;*(unsigned int *)0x00000000 = 0xAABBCCDD;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;*(unsigned int *)0x00000004= 0x11223344;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;//code2&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;//*(unsigned int *)0x00000F0F = 0xAABBCCDD;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;//*(unsigned int *)0x00000F13= 0x11223344;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.EHV = 1;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;while(FLASH.MCR.B.DONE == 0){};&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;if(FLASH.MCR.B.PEG == 0)&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;while(1){};&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.EHV = 0;&lt;/FONT&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;FONT color="#0000FF"&gt;FLASH.MCR.B.PGM = 0;&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;FONT color="#000000"&gt;2、&lt;SPAN&gt;In section&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT color="#FF6600"&gt;&lt;EM&gt;&lt;FONT size="3"&gt;13.3.2.2 Low/Mid Address Space Block Locking Register (FLASH_LMLR) &lt;/FONT&gt;&lt;/EM&gt;&lt;FONT size="3" color="#000000"&gt;and&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF6600"&gt;&lt;EM&gt;13.3.2.5 Low/Mid Address Space Block Select Register (FLASH_LMSR)&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#FF6600"&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;of&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;EM&gt;Flash Programming&amp;nbsp;&lt;/EM&gt;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#FF6600"&gt;of&amp;nbsp;&lt;/FONT&gt;&lt;EM&gt;&lt;FONT color="#FF6600"&gt;MPC5553_4_Reference_Manual,_Rev_31&lt;/FONT&gt;,&lt;/EM&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_0-1634652339401.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/159519i54009411476C923F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_0-1634652339401.png" alt="_0-1634652339401.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_1-1634652498637.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/159521i82F656D39A473D68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_1-1634652498637.png" alt="_1-1634652498637.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this regard, I have two different understandings, and I do not know which one is right.I list two understandings. Please point out that the right or the two are incorrect.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="_0-1634655008629.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/159525i2B8C2537247D5CC0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="_0-1634655008629.png" alt="_0-1634655008629.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 14:50:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1357989#M19408</guid>
      <dc:creator>韦恩</dc:creator>
      <dc:date>2021-10-19T14:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: 5554 flash problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1359639#M19436</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;1. The address must be always aligned to 8 bytes when programming a doubleword.&lt;/P&gt;
&lt;P&gt;If you program single word only, the address must be aligned to 4 bytes. But in this case, whole aligned doubleword must be in erased state and then you are not allowed to program second word in this doubleword because it's not in erased state anymore.&lt;/P&gt;
&lt;P&gt;2. The bit mapping is very simple, see attached picture.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;DIV id="tinyMceEditorlukaszadrapa_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 18:09:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1359639#M19436</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-10-21T18:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: 5554 flash problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1360380#M19445</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Lukas:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Thank you very much for your answers.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Best wishes to you.&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px lia-align-right"&gt;Yours 韦恩&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Oct 2021 11:32:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/5554-flash-problem/m-p/1360380#M19445</guid>
      <dc:creator>韦恩</dc:creator>
      <dc:date>2021-10-24T11:32:22Z</dc:date>
    </item>
  </channel>
</rss>

