<?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のトピックSector Header details for MC9S12XET256</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660320#M13955</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with DFlash in MC9S12XET256.&lt;/P&gt;&lt;P&gt;The address starts from 0x10_0000 to 0x10_7FFF.&lt;/P&gt;&lt;P&gt;At every start of the sector, for 4 bytes I can see few fixed values (FA CF 00 00 / FF FF 00 00).&lt;/P&gt;&lt;P&gt;I'm aware that these are the sector header. It gives information about Erase count, sector state etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I need the complete break up of this sector header bytes.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; i.e., Which bits denote erase count, sector state. If I can get any other details from these bits.&lt;/P&gt;&lt;P&gt;2) In the last sector ie., 0x10_7F00, I can write only from 0x10_7F08. Why is it so?&lt;/P&gt;&lt;P&gt;3) If the DFlash is used as User type (not as FEE), should&amp;nbsp;I update the sector? Or the update will be done automatically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Mar 2017 05:01:53 GMT</pubDate>
    <dc:creator>hemavathydevara</dc:creator>
    <dc:date>2017-03-17T05:01:53Z</dc:date>
    <item>
      <title>Sector Header details for MC9S12XET256</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660320#M13955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm working with DFlash in MC9S12XET256.&lt;/P&gt;&lt;P&gt;The address starts from 0x10_0000 to 0x10_7FFF.&lt;/P&gt;&lt;P&gt;At every start of the sector, for 4 bytes I can see few fixed values (FA CF 00 00 / FF FF 00 00).&lt;/P&gt;&lt;P&gt;I'm aware that these are the sector header. It gives information about Erase count, sector state etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I need the complete break up of this sector header bytes.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; i.e., Which bits denote erase count, sector state. If I can get any other details from these bits.&lt;/P&gt;&lt;P&gt;2) In the last sector ie., 0x10_7F00, I can write only from 0x10_7F08. Why is it so?&lt;/P&gt;&lt;P&gt;3) If the DFlash is used as User type (not as FEE), should&amp;nbsp;I update the sector? Or the update will be done automatically.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Mar 2017 05:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660320#M13955</guid>
      <dc:creator>hemavathydevara</dc:creator>
      <dc:date>2017-03-17T05:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Header details for MC9S12XET256</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660321#M13956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hemavathy,&lt;/P&gt;&lt;P&gt;Yes, that exactly looks like sector headers.&lt;/P&gt;&lt;P&gt;Each sector starts with a header field containing two words that define its status and erase count.&lt;/P&gt;&lt;P&gt;Each sector in the EEE NVM partition is in one of the following states:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Containing data records the current sector where data records are being programmed, the Active sector&lt;UL&gt;&lt;LI&gt;the current sector where data records are being programmed, the Active sector&lt;/LI&gt;&lt;LI&gt;the current sector containing the oldest data records, the Oldest_x sector&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Ready_x (erased) sectors&lt;/LI&gt;&lt;LI&gt;Flagged as invalid following a program or erase fault (and skipped by the EEE flow)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) I am afraid that this was newer described in any official&lt;/P&gt;&lt;P&gt;The first word:&lt;/P&gt;&lt;P&gt;0xFFFF&amp;nbsp; Ready sectors&lt;/P&gt;&lt;P&gt;0xFACF Sectors which containing data records&lt;/P&gt;&lt;P&gt;The second word is just simple ECOUNT counter (it count from 0x0000 or 0x0001) of erase cycles for every sector.&lt;/P&gt;&lt;P&gt;Anyway, the information in sector headers is not intended for user access. The ECOUNT value may be obtained by EEPROM Emulation Query Command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) If (part of ) your D-Flash is partitioned for EEE use, you cannot write into this area by Flash commands. D-Flash is dedicated for EEE is protected against D-Flash commands write. When I updated my variables in Buffer RAM, the records in the last sector are stored by the same was as at other sectors. So, I suppose that you probably selected some strange ERPART/DFPART values or there is any other issue on your side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)The D-Flash which is not used for EEE, will be not partitioned – sector headers exist only for EEE state machine. The User D-Flash do not contain any sector headers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Radek&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>Fri, 17 Mar 2017 13:59:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660321#M13956</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2017-03-17T13:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Header details for MC9S12XET256</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660322#M13957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Radek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your clear reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can I differentiate sectors using the first word of the sector header?&lt;/P&gt;&lt;P&gt;i)&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Flagged as invalid &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;ii)&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Oldest_x sector&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;iii) Active&amp;nbsp;sector&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;iv) Ready sector --&amp;gt; 0xFFFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a nice day,&lt;/P&gt;&lt;P&gt;Hemavathy D&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 05:59:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660322#M13957</guid>
      <dc:creator>hemavathydevara</dc:creator>
      <dc:date>2017-03-20T05:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: Sector Header details for MC9S12XET256</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660323#M13958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;Hemavathy,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Yes, you can.&lt;/P&gt;&lt;P&gt;But unfortunately, I never work with any MCU with a flagged invalid sector. So, I do not know the right pattern for an invalid sector.&lt;/P&gt;&lt;P&gt;Also, the differentiating between Oldest_x and the Active sector is not straightforward. The sector header pattern is the same for all Oldest_x and Active sectors – 0xFACF. The EEE start with recording data from 0x10_0000 sector and continue to 0x10_7F00 sector where it wraps back to D-Flash begin (when whole D-Flash is used for EEE). So, the active sector should be the sector with the 0xFACF &amp;nbsp;pattern at highest address – when we start search 0xFACF sector pattern from 0x10_0000 and end search until the 0xFACF sector is followed by sector which does not contain 0xFACF sector pattern.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please be aware that this information is based just on my EEE observation – I never see EEE state machine code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want watch D-Flash by the debugger, I would like to recommend enable “refresh memory when halting” feature in Debugging Memory Map (by default disabled).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="refresh memory when halting.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/18261i1B6ED8F6EE04D4EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="refresh memory when halting.PNG" alt="refresh memory when halting.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note: The picture is for different MCU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any specific reason for your request (some issue or any additional functionality needs), or you are just curious?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Radek&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, 20 Mar 2017 11:49:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Sector-Header-details-for-MC9S12XET256/m-p/660323#M13958</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2017-03-20T11:49:57Z</dc:date>
    </item>
  </channel>
</rss>

