<?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>Kinetis Microcontrollers中的主题 Re: Attempt to partition results in reset</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Attempt-to-partition-results-in-reset/m-p/288553#M11322</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;Are you able to fix reset issue.&lt;/P&gt;&lt;P&gt;Can you tell me how to overcome reset issue.&lt;/P&gt;&lt;P&gt;I am using SK32K144/SK32K148&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sudarshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2018 11:04:02 GMT</pubDate>
    <dc:creator>sudarshankumar</dc:creator>
    <dc:date>2018-03-22T11:04:02Z</dc:date>
    <item>
      <title>Attempt to partition results in reset</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Attempt-to-partition-results-in-reset/m-p/288551#M11320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Greetings everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am stuck - On a partitioning problem that continually resets.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TARGET HARDWARE: MK12DX256VLF5&lt;/P&gt;&lt;P&gt;TOOL: IAR (J-Link Debugger)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the following code which I got directly from Freescale:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;main()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; printf("&amp;nbsp; Checking For *NV Memory Partition...\r\n");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; if (partition_flash(EEPROM_128_128, DFLASH_SIZE_0)) // passed values are 0x36 and 0x08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("&amp;nbsp; **New Flex Memory Partition\r\n");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("&amp;nbsp; &amp;gt;&amp;gt;Device Already Partitioned\r\n");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;bool_t partition_flash(uint8_t EEProm_size, uint8_t DFlash_size)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Test to make sure the device is not already partitioned. If it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; * is already partitioned, then return with no action performed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp; */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; if ((SIM_FCFG1 &amp;amp; SIM_FCFG1_DEPART(0x0F)) != 0x00000F00)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(FALSE);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Write the FCCOB registers */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; FTFL_FCCOB0 = FTFL_FCCOB0_CCOBn(0x80); // Selects the PGMPART command&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; FTFL_FCCOB1 = 0x00;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; FTFL_FCCOB2 = 0x00;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; FTFL_FCCOB3 = 0x00;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* FCCOB4 is written with the code for the subsystem sizes (eeprom_size define) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; FTFL_FCCOB4 = EEProm_size;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* FFCOB5 is written with the code for the Dflash size (dflash_size define) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; FTFL_FCCOB5 = DFlash_size;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* All required FCCOBx registers are written, so launch the command */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; &lt;STRONG&gt;FTFL_FSTAT = FTFL_FSTAT_CCIF_MASK;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; /* Wait for the command to complete */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; while((FTFL_FSTAT &amp;amp; FTFL_FSTAT_CCIF_MASK) == 0x00);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp; return(TRUE);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;If the device is blank and I run the partition code it resets (Core Lockup Event) at the execute partiton command (bold line) every time.&amp;nbsp; If I set a break point at that line (bold line) then run it resets, but if I set a break point (at the bold line) then step one line it works.&amp;nbsp; the registers before the execution of the command look (I think) as they should...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FSTAT: 0x80&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCNFG: 0x02&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FSEC: 0xFE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FOPT: 0xFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB0: 0x80&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB1: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB2: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB3: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB4: 0x36&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB5: 0x08&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB6: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB7: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB8: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOB9: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOBA: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FCCOBB: 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FPROT0: 0xFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FPROT1: 0xFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FPROT2: 0xFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FPROT3: 0xFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FEPROT: 0xFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FTFL_FDPROT: 0xFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I have also insered delays before the command execution (upto 1s) thinking it was timing related with no change of result.&amp;nbsp; Thinking it was unique to the J-Link debugger I loaded the code to the target and there it also resets.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Any help on this would be great...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Hab&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:57:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Attempt-to-partition-results-in-reset/m-p/288551#M11320</guid>
      <dc:creator>Hab</dc:creator>
      <dc:date>2014-02-10T19:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Attempt to partition results in reset</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Attempt-to-partition-results-in-reset/m-p/288552#M11321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SOLUTION... FUNCTION NOTES ARE IMPORTANT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*************************************************************************&lt;BR /&gt; * Function Name: partition_flash&lt;BR /&gt; * Parameters: uint8_t, uint8_t&lt;BR /&gt; * Return: bool_t&lt;BR /&gt; * NOTE: This function should be called before IRQs (espcially timers) are set to run&amp;nbsp; &lt;BR /&gt; * as the partitioning process must not be interuppted&lt;BR /&gt; * NOTE: Flex NV Memory can be divided into EFlash (EE NV), DFlash Space or a combination&lt;BR /&gt; * of the two.&amp;nbsp; The max EE space is 4KB.&amp;nbsp; The smaller the DFlash the longer the life of the EE NV&lt;BR /&gt; * See Freescale App Note AN4282 for more information&lt;BR /&gt; *&lt;BR /&gt; * Description:&amp;nbsp; Partition flash routine. This function can be used to setup&lt;BR /&gt; * the flash for enhanced EEPROM operation. In order to guarantee&lt;BR /&gt; * the eEE endurance the partition command should only be used one&lt;BR /&gt; * time (re-partitioning in a different configuration will erase&lt;BR /&gt; * wear-leveling data, so endurance can no longer be guaranteed).&lt;BR /&gt; * This function will test to make sure the flash has not been&lt;BR /&gt; * partitioned already.&lt;BR /&gt; *&lt;BR /&gt; * Why: The very first time firmware runs it must partition the memory for use.&lt;BR /&gt; * By partitioning the memory NV EE memory is created within the micro.&amp;nbsp; &lt;BR /&gt; *&lt;BR /&gt; * STEP 1: Check if the device was previously partitioned&lt;BR /&gt; * STEP 2: Clear Status Register Flags and Load for the FCMD Program Partition Command&lt;BR /&gt; * STEP 3: Execute the command and return when done&lt;BR /&gt; *************************************************************************/&amp;nbsp;&amp;nbsp; &lt;BR /&gt;bool_t partition_flash(uint8_t EEPROM_Size, uint8_t DFlash_Size)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; // STEP 1:&lt;BR /&gt;&amp;nbsp; // CHECK FOR PREVIOUS PARTITION AND RETURN FALSE IF IT WAS&lt;BR /&gt;&amp;nbsp; if ((SIM_FCFG1 &amp;amp; SIM_FCFG1_DEPART(0x0F)) != 0x00000F00)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(FALSE);&lt;/P&gt;&lt;P&gt;&amp;nbsp; // STEP 2:&lt;BR /&gt;&amp;nbsp; // CLEAR RDCOLERR, ACCERR AND FPVIOL FLAGS OF THE STATUS REGISTER&lt;BR /&gt;&amp;nbsp; FTFL_FSTAT = (FTFL_FSTAT_RDCOLERR_MASK | FTFL_FSTAT_ACCERR_MASK | FTFL_FSTAT_FPVIOL_MASK);&lt;BR /&gt;&amp;nbsp; // WRITE THE VALUES TO LOAD THE FCMD FOR PROGRAM PARTITION&lt;BR /&gt;&amp;nbsp; FTFL_FCCOB0 = FTFL_FCCOB0_CCOBn(FCMD_PROGRAM_PARTITION); &lt;BR /&gt;&amp;nbsp; FTFL_FCCOB1 = 0x00;&lt;BR /&gt;&amp;nbsp; FTFL_FCCOB2 = 0x00;&lt;BR /&gt;&amp;nbsp; FTFL_FCCOB3 = 0x00;&lt;BR /&gt;&amp;nbsp; FTFL_FCCOB4 = EEPROM_Size;&lt;BR /&gt;&amp;nbsp; FTFL_FCCOB5 = DFlash_Size;&lt;/P&gt;&lt;P&gt;&amp;nbsp; // STEP 3:&lt;BR /&gt;&amp;nbsp; // EXECUTE THE FCMD COMMAND AND RETURN WHEN DONE&lt;BR /&gt;&amp;nbsp; FTFL_FSTAT = FTFL_FSTAT_CCIF_MASK;&lt;BR /&gt;&amp;nbsp; while((FTFL_FSTAT &amp;amp; FTFL_FSTAT_CCIF_MASK) == 0x00);&lt;BR /&gt;&amp;nbsp; return(TRUE);&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;} // END OF partition_flash&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2014 15:00:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Attempt-to-partition-results-in-reset/m-p/288552#M11321</guid>
      <dc:creator>Hab</dc:creator>
      <dc:date>2014-02-14T15:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: Attempt to partition results in reset</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Attempt-to-partition-results-in-reset/m-p/288553#M11322</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;Are you able to fix reset issue.&lt;/P&gt;&lt;P&gt;Can you tell me how to overcome reset issue.&lt;/P&gt;&lt;P&gt;I am using SK32K144/SK32K148&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sudarshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 11:04:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Attempt-to-partition-results-in-reset/m-p/288553#M11322</guid>
      <dc:creator>sudarshankumar</dc:creator>
      <dc:date>2018-03-22T11:04:02Z</dc:date>
    </item>
  </channel>
</rss>

