<?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: AN4533 Swap Problem - PFlashGetSwapStatus returns FTFx_ERR_MGSTAT0</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297607#M12296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To narrow down the problem, I am trying to ensure that the swap field and swap indicators are correct.&amp;nbsp; I am using the following code to read the IFR Swap Field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;returnCode = FlashReadResource(&amp;amp;ftflCfg, (PFLASH_BLOCK_BASE + PFLASH_IFR_OFFSET + 0), dataReadback, FlashCommandSequence);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;which returns 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;returnCode = FlashReadResource(&amp;amp;ftflCfg, (PFLASH_BLOCK_BASE + PFLASH_IFR_OFFSET + 8), dataReadback, FlashCommandSequence);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;which returns 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the 0x00 0x00 from the first response is the swap enable field, meaning it's enabled.&amp;nbsp; I don't see any data in the swap indicator address though.&amp;nbsp; Also, how could the address fit into just 2 bytes (according to section 30.4.12.14.1 - Swap state determination)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;The specific processor is MK60FN1M0VLQ12 rev 3N96B.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 May 2014 17:31:00 GMT</pubDate>
    <dc:creator>jmag99</dc:creator>
    <dc:date>2014-05-21T17:31:00Z</dc:date>
    <item>
      <title>AN4533 Swap Problem - PFlashGetSwapStatus returns FTFx_ERR_MGSTAT0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297605#M12294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get this error, sometimes I cannot recover without going back and programming with the JTAG debugger.&amp;nbsp; Does anyone know what causes it and what it actually checks to determine the error?&amp;nbsp; The reference manual has this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any errors have been encountered during the swap determination and&lt;/P&gt;&lt;P&gt;program-verify operations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it's not enough information to tell me what is causing the error.&amp;nbsp; Are there registers that I can check to see what is going on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 May 2014 19:29:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297605#M12294</guid>
      <dc:creator>jmag99</dc:creator>
      <dc:date>2014-05-14T19:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: AN4533 Swap Problem - PFlashGetSwapStatus returns FTFx_ERR_MGSTAT0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297606#M12295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This return value is a result from calling FlashCommandSequence(), when bit0 of FTFL_FSTAT is set. Please kindly refer to the following for details.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/44114i6FE5893C09FFF68B/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am not sure where you put the swap indicators, actually if the sectors containing swap indicators get erased in UPDATE or UPDATE-ERASED state, by some process to update the firmware or something like that, the swap system would report issue.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 May 2014 07:10:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297606#M12295</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2014-05-19T07:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: AN4533 Swap Problem - PFlashGetSwapStatus returns FTFx_ERR_MGSTAT0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297607#M12296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To narrow down the problem, I am trying to ensure that the swap field and swap indicators are correct.&amp;nbsp; I am using the following code to read the IFR Swap Field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;returnCode = FlashReadResource(&amp;amp;ftflCfg, (PFLASH_BLOCK_BASE + PFLASH_IFR_OFFSET + 0), dataReadback, FlashCommandSequence);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;which returns 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;returnCode = FlashReadResource(&amp;amp;ftflCfg, (PFLASH_BLOCK_BASE + PFLASH_IFR_OFFSET + 8), dataReadback, FlashCommandSequence);&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;which returns 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the 0x00 0x00 from the first response is the swap enable field, meaning it's enabled.&amp;nbsp; I don't see any data in the swap indicator address though.&amp;nbsp; Also, how could the address fit into just 2 bytes (according to section 30.4.12.14.1 - Swap state determination)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;The specific processor is MK60FN1M0VLQ12 rev 3N96B.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 17:31:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297607#M12296</guid>
      <dc:creator>jmag99</dc:creator>
      <dc:date>2014-05-21T17:31:00Z</dc:date>
    </item>
    <item>
      <title>Re: AN4533 Swap Problem - PFlashGetSwapStatus returns FTFx_ERR_MGSTAT0</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297608#M12297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One other question that I had.&amp;nbsp; I am supplying that address of 0x7F000 as the swap indicator area.&amp;nbsp; It appears that the actual swap indicator is not at that exact address, but really 12 bytes in from there.&amp;nbsp; Is there any description of how this swap indicator area is mapped out and where the data should be found?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 17:39:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/AN4533-Swap-Problem-PFlashGetSwapStatus-returns-FTFx-ERR-MGSTAT0/m-p/297608#M12297</guid>
      <dc:creator>jmag99</dc:creator>
      <dc:date>2014-05-21T17:39:02Z</dc:date>
    </item>
  </channel>
</rss>

