<?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>topic Production trim data in NV flash. in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Production-trim-data-in-NV-flash/m-p/640546#M38784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking into the connectivity examples like the connectivity_test_genfsk_frdmkw41z (for the KW41Z), there are undocumented references to trim data stored in flash memory (for example: in hardware_init.c).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is read from flash via calls like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;NV_ReadHWParameters(&amp;amp;gHardwareParameters)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which reads data from locations specified by&amp;nbsp;FREESCALE_PROD_DATA_BASE_ADDR, which is specified in the linker file as:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;FREESCALE_PROD_DATA_BASE_ADDR = ((0x0007FFFF) - ( 2 * 1024 ) + 1);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the questions are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Does NXP plan to have a specific location in flash where production trim data (as measured by NXP at the factory) will be written?&lt;/LI&gt;&lt;LI&gt;Could NXP provide reference documentation on the trim data structures it uses for its various microcontroller families?&lt;/LI&gt;&lt;LI&gt;Could NXP specify a trim area in flash at a much lower address? i.e. for many Kinetis microcontrollers, location 0x410 is already used for the Flash Configuration Field (FCF), so it might be a convenient convention to store trim data from 0x480 - 0x500.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any improvements in these three areas, particularly uniform answers to questions 1 and 2, would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Dec 2016 23:54:07 GMT</pubDate>
    <dc:creator>maxv</dc:creator>
    <dc:date>2016-12-23T23:54:07Z</dc:date>
    <item>
      <title>Production trim data in NV flash.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Production-trim-data-in-NV-flash/m-p/640546#M38784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking into the connectivity examples like the connectivity_test_genfsk_frdmkw41z (for the KW41Z), there are undocumented references to trim data stored in flash memory (for example: in hardware_init.c).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is read from flash via calls like:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;NV_ReadHWParameters(&amp;amp;gHardwareParameters)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which reads data from locations specified by&amp;nbsp;FREESCALE_PROD_DATA_BASE_ADDR, which is specified in the linker file as:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;FREESCALE_PROD_DATA_BASE_ADDR = ((0x0007FFFF) - ( 2 * 1024 ) + 1);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the questions are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Does NXP plan to have a specific location in flash where production trim data (as measured by NXP at the factory) will be written?&lt;/LI&gt;&lt;LI&gt;Could NXP provide reference documentation on the trim data structures it uses for its various microcontroller families?&lt;/LI&gt;&lt;LI&gt;Could NXP specify a trim area in flash at a much lower address? i.e. for many Kinetis microcontrollers, location 0x410 is already used for the Flash Configuration Field (FCF), so it might be a convenient convention to store trim data from 0x480 - 0x500.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any improvements in these three areas, particularly uniform answers to questions 1 and 2, would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Dec 2016 23:54:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Production-trim-data-in-NV-flash/m-p/640546#M38784</guid>
      <dc:creator>maxv</dc:creator>
      <dc:date>2016-12-23T23:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Production trim data in NV flash.</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Production-trim-data-in-NV-flash/m-p/640547#M38785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Max Vilimpoc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the late reply, About your questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1. Does NXP plan to have a specific location in flash where production trim data (as measured by NXP at the factory) will be written?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;No, This locations is defined with that address because is the last flash sector, but as you may guess, different devices has different flash sizes, so this address can not be standardized. actually this sector&amp;nbsp; is just defined for the wireless stack, in this area is reserved and contains hardware-specific parameters and most of them are for wireless stack:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;typedef&lt;/SPAN&gt; PACKED_STRUCT hardwareParameters_tag
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t&amp;nbsp; identificationWord&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* valid data present */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t&amp;nbsp; reserved&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;32&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* for backward compatibillity */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t&amp;nbsp; ieee_802_15_4_address&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;/* IEEE 802.15.4 MAC address */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t&amp;nbsp; bluetooth_address&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;6&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* Bluetooth address */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t xtalTrim&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&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; &lt;SPAN class="comment token"&gt;/* KW4x only */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t edCalibrationOffset&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* KW01 ED offset */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t pllFStepOffset&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* KW01 fine tune pll */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint32_t gInternalStorageAddr&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* The start address of the internal storage used for OTA update.
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A value of 0xFFFFFFFF means that the External storage is used.
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Warning: The offset to this field in respect to the start address of the structure 
&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;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; must not be changed.*/&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* For forward compatibility additional fields may be added here 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Existing data in flash will not be compatible after modifying the hardwareParameters_t typedef*/&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint16_t hardwareParamsCrc&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* crc for data between start of reserved area and start of hardwareParamsCrc field (not included). */&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;hardwareParameters_t&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;2. Could NXP provide reference documentation on the trim data structures it uses for its various microcontroller families?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;As I mentioned this area is reserved just in the wireless stack, for the Kinetis W family, in other kinetis family you may not find a reserved area like this. You can consult the Connectivity Framework Reference Manual, chapter 3.5.6 "Production Data Storage" for you reference, you can locate it in the path: &amp;lt;MKW41Z_ConnSw_1.0.2_installed_path&amp;gt;\docs\wireless\Common&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;3. Could NXP specify a trim area in flash at a much lower address? i.e. for many Kinetis microcontrollers, location 0x410 is already used for the Flash Configuration Field (FCF), so it might be a convenient convention to store trim data from 0x480 - 0x500.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Actually it is just a reserved area for information storage, it doesn't set or configure anything, it has not information until you write it, and as I mentioned, this address was selected because it is the last flash sector, this sector is not erased/written at code download time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this information helps you&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jorge Alcala&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>Thu, 29 Dec 2016 23:06:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Production-trim-data-in-NV-flash/m-p/640547#M38785</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2016-12-29T23:06:31Z</dc:date>
    </item>
  </channel>
</rss>

