<?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: MPC5634M programming the flash section</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537840#M3645</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there's a typo:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/59749i5300CE99C90A1291/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;You have to clear ERS bit. Then it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2016 05:34:10 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2016-06-17T05:34:10Z</dc:date>
    <item>
      <title>MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537838#M3643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello there,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on programming the flash of an MPC5634M. Specifically the CFLASH0 section. info on my project:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ProjectName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a.h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.c&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; b.h&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Contents of a.c:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint32_t value_val = 40; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Contents of a.h:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;extern uint32_t value_val; &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Contents of b.c&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void Nvm_ProgFlash (uint32_t* address, uint32_t value)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t tmp = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; uint32_t status = 0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.LMLR.R = 0xA1A11111; // password..&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.LMLR.B.LLOCK = 0x7F; // unlock block 5. Others are locked&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.SLMLR.R = 0XC3C33333; // password..&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.SLMLR.B.SLLOCK = 0x7F; // unlock block 5. Others are locked&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Erase Routine&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.ERS = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.LMSR.R = 0x00000080;&lt;/P&gt;&lt;P&gt;&amp;nbsp; *(unsigned int *)0x00038928 = 0xFFFFFFFF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.EHV = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while ((CFLASH0.MCR.B.DONE == 0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; status = CFLASH0.MCR.B.PEG &amp;amp; 0x00000200;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.EHV = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.PGM = 0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Program Routine&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.PGM = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; *(unsigned int *)0x00038928 = value;&lt;/P&gt;&lt;P&gt;&amp;nbsp; *(unsigned int *)(0x00038928 + 0x4) = value;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.EHV = 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; while ((CFLASH0.MCR.B.DONE == 0));&lt;/P&gt;&lt;P&gt;&amp;nbsp; status = CFLASH0.MCR.B.PEG &amp;amp; 0x00000200;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.EHV = 0;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CFLASH0.MCR.B.PGM = 0;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Contents of b.h:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void Nvm_ProgFlash(uint32_t);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I'm calling the function in b.c as Nvm_ProgFlash(60); in main. When I build the project I check the ProjecName.MAP and the ProjectName.MOT files, the object value_val is located at the address 0x00038928. &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With regards to the reference manual, this seems to be all that I need to program the relevant flash address. The program gets stuck in&amp;nbsp;&amp;nbsp; while ((CFLASH0.MCR.B.DONE == 0));&amp;nbsp; during the erase routine. Am I missing something basic here or is there something additional that needs to be done?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for the help,&lt;/P&gt;&lt;P&gt;Burak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 13:20:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537838#M3643</guid>
      <dc:creator>buraksoner</dc:creator>
      <dc:date>2016-06-16T13:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537839#M3644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, copy paste mistake. Function Nvm_ProgFlash is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;void Nvm_ProgFlash (uint32_t value)&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;{&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;....&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; color: #51626f;"&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 13:21:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537839#M3644</guid>
      <dc:creator>buraksoner</dc:creator>
      <dc:date>2016-06-16T13:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537840#M3645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there's a typo:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/59749i5300CE99C90A1291/image-size/large?v=v2&amp;amp;px=999" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;You have to clear ERS bit. Then it will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 05:34:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537840#M3645</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-06-17T05:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537841#M3646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lukas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for pointing the typo out. But that seems to be irrelevant to my problem. The code gets stuck in the "while" before that line. I've realized something more about this: I think I get stuck in that while (erase is not done) because after setting the EHV bit I get a read while write error (I've seen this at the MCR register). Please see screenshot below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/21433iA5BFAF699CFB8558/image-size/large?v=v2&amp;amp;px=999" title="rwe.png" alt="rwe.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I don't have any other interrupts etc. running in the background though. This function is called in main after the watchdog disable and PLL init so there should be no interrupts/flashreads that I've&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there maybe a configuration problem in this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Burak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 07:22:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537841#M3646</guid>
      <dc:creator>buraksoner</dc:creator>
      <dc:date>2016-06-17T07:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537842#M3647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where the code is running from? Read-While-Write is supported only between banks. We should not access flash bank during erase/program operation. So, the code should be executed from RAM or from another bank. I guess this is the reason. &lt;/P&gt;&lt;P&gt;The code itself works fine on my side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 07:38:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537842#M3647</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-06-17T07:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537843#M3648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Lukas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I was running it from bank 1 but it wasn't. Moved it to a new RAM section I defined. It solved the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Burak&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 15:04:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537843#M3648</guid>
      <dc:creator>buraksoner</dc:creator>
      <dc:date>2016-06-17T15:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537844#M3649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello ,&lt;/P&gt;&lt;P&gt;I face the question as follow:when debugging ,when run :&lt;/P&gt;&lt;P&gt;/* step2. program data */&lt;BR /&gt; CFLASH0.MCR.B.PGM = 1; // select operation &lt;BR /&gt; *((unsigned int*) 0x00038928) = 0x66AA66AA; // first write&lt;BR /&gt; *((unsigned int*) 0x00038928+0x4) = 0x11BB11BB; // additional write&lt;/P&gt;&lt;P&gt;&amp;nbsp;the program break and into :&lt;span class="lia-inline-image-display-wrapper"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/4949i4C06BBDE447959EA/image-size/large?v=v2&amp;amp;px=999" title="QQ图片20160904211500.png" alt="QQ图片20160904211500.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need some about it,Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 04 Sep 2016 13:19:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537844#M3649</guid>
      <dc:creator>sufree</dc:creator>
      <dc:date>2016-09-04T13:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537845#M3650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where the code is running from? Read-While-Write is supported only between banks, so you are not allowed to access bank which is currently being erased or programmed. Address 0x0003_8928 belongs to bank 0, so the code must run from bank 1 (high address space) or from RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 07:36:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537845#M3650</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-09-05T07:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537846#M3651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks,&lt;/P&gt;&lt;P&gt;I'm just a beginner.I don't know&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;where the code is running from.My program about array1 and array2 can run normally.so i guess the code run from bank0. I try to change the address about&amp;nbsp;internal_flash: &amp;nbsp; &amp;nbsp; org = 0x000C0000, &amp;nbsp; len = 0x0017E000. but in vain. can you give me some detailed explanation &lt;/SPAN&gt;&lt;SPAN style="background-color: #f2f2f2; color: #434343; font-size: 12px; line-height: 20.76px;"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Sep 2016 08:01:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537846#M3651</guid>
      <dc:creator>sufree</dc:creator>
      <dc:date>2016-09-05T08:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537847#M3652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I can see two problems in the project you attached.&lt;/P&gt;&lt;P&gt;1. Linker file - you can't use "myram:&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; org = 0x40018000,&amp;nbsp;&amp;nbsp; len = 0x00001000"&lt;/P&gt;&lt;P&gt;That's out of RAM. There's only 94KB: 0x4000_0000 - 0x4001_77FF.&lt;/P&gt;&lt;P&gt;You can use:&lt;/P&gt;&lt;P&gt;internal_ram:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; org = 0x40000000,&amp;nbsp;&amp;nbsp; len = 0x00013000&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; myram:&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; org = 0x40013000,&amp;nbsp;&amp;nbsp; len = 0x00001000&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; heap&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; org = 0x40014000,&amp;nbsp;&amp;nbsp; len = 0x00002000 &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; stack :&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; org = 0x40016000,&amp;nbsp;&amp;nbsp; len = 0x00001800&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Function Program_FLASH_A0:&lt;/P&gt;&lt;P&gt;*((unsigned int*) 0x00038928) = 0x66AA66AA;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // first write&lt;BR /&gt;*((unsigned int*) 0x00038932) = 0x11BB11BB;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // additional write&lt;/P&gt;&lt;P&gt;- this is wrong. 0x00038928 + 4 = 0x0003892C. It is not 0x00038932.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Correct way is:&lt;/P&gt;&lt;P&gt;*((unsigned int*) 0x00038928) = 0x66AA66AA;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // first write&lt;BR /&gt;*((unsigned int*) 0x0003892C) = 0x11BB11BB;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // additional write&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I change these two things, it works...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Sep 2016 13:48:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537847#M3652</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-09-06T13:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5634M programming the flash section</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537848#M3653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Hi&amp;nbsp;&lt;SPAN&gt;Lukas,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I do as you say,it works.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Thank you very much.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Regards,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;su&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2016 08:10:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5634M-programming-the-flash-section/m-p/537848#M3653</guid>
      <dc:creator>sufree</dc:creator>
      <dc:date>2016-09-07T08:10:09Z</dc:date>
    </item>
  </channel>
</rss>

