<?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: Read UID MK66FN2M0VMQ18 Through EzPort (board FDRM-K66F)</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-UID-MK66FN2M0VMQ18-Through-EzPort-board-FDRM-K66F/m-p/785856#M47833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/kerryzhou"&gt;kerryzhou&lt;/A&gt;,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I am trying read register using the&amp;nbsp;EzPort&amp;nbsp; commands, specifically command Flash Read Data. The struct of this command is:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;lt;code command(7:0)&amp;gt;,&amp;lt;address(23:00)&amp;gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;The address of SIM Register that I want, it need 32 bits for its representations. In addition, the reference Manual of MK66FN2M0VMQ18 indicates that changes must be to made to the address maintain a width 24 bits.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Next, I show the function that I am using:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* @param addr Addres of register.&lt;BR /&gt;* @param data Param where store data.&lt;BR /&gt;* @param size Number data to read.&lt;BR /&gt;* @return EZ_RESULT_SUCCESS / EZ_RESULT_ERROR&lt;BR /&gt;*/&lt;BR /&gt;TEzResult ezSectorReadSIM(uint32_t addr, uint8_t *data, uint32_t size)&lt;BR /&gt;{&lt;BR /&gt;if( !data || !size ) return EZ_RESULT_ERROR;&lt;BR /&gt;if( size&amp;gt;4096 ) return EZ_RESULT_ERROR;&lt;BR /&gt;if( addr &amp;amp; 0xBFFB7F03) return EZ_RESULT_ERROR; //Valid Addres SIM UID&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Command EzPort Flahs Read Data.&lt;BR /&gt;wrBuf[0] = 0x03;&lt;BR /&gt;wrBuf[1] = (uint8_t)((addr &amp;gt;&amp;gt; 16) &amp;amp; 0xFF);&lt;BR /&gt;wrBuf[2] = (uint8_t)((addr &amp;gt;&amp;gt; 8) &amp;amp; 0xFF);&lt;BR /&gt;wrBuf[3] = (uint8_t)(addr &amp;amp; 0xFF);&lt;BR /&gt;// Sending of the command and Receive data.&lt;BR /&gt;if( ezSpiTransfer(wrBuf, rdBuf, 5+size) == EZ_RESULT_SUCCESS ){&lt;BR /&gt;memcpy(data, &amp;amp;rdBuf[4], size);&lt;BR /&gt;return EZ_RESULT_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;return EZ_RESULT_ERROR;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/66536i125117AE834D1E73/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2018 09:47:54 GMT</pubDate>
    <dc:creator>manurlruiz</dc:creator>
    <dc:date>2018-07-26T09:47:54Z</dc:date>
    <item>
      <title>Read UID MK66FN2M0VMQ18 Through EzPort (board FDRM-K66F)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-UID-MK66FN2M0VMQ18-Through-EzPort-board-FDRM-K66F/m-p/785854#M47831</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 am trying read the UID of the Chip MK66FN2M0VMQ18, but I don't know how to convert the address 4004_8054 of 32 bits to 24 bits, so that through of EzPort I may get data of SIM register of UID.&lt;/P&gt;&lt;P&gt;The reference Manual of this family of controllers indicate that you can access this register through EzPort.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 05:57:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-UID-MK66FN2M0VMQ18-Through-EzPort-board-FDRM-K66F/m-p/785854#M47831</guid>
      <dc:creator>manurlruiz</dc:creator>
      <dc:date>2018-07-26T05:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Read UID MK66FN2M0VMQ18 Through EzPort (board FDRM-K66F)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-UID-MK66FN2M0VMQ18-Through-EzPort-board-FDRM-K66F/m-p/785855#M47832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="323162" data-username="manurlruiz" href="https://community.nxp.com/people/manurlruiz"&gt;Manurl Ruiz&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Why you need to convert the address 4004_8054 of 32 bits to 24 bits? Could you give me more details? I think you can send the 32bits address directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Actually, about the EzPort operation, we have a document for your reference, please check it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-102282"&gt;How to use EzPort module&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Even it is used for K60 and K22, but you still can refer to that code.&lt;/P&gt;&lt;P&gt;Wish it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&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, 26 Jul 2018 08:18:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-UID-MK66FN2M0VMQ18-Through-EzPort-board-FDRM-K66F/m-p/785855#M47832</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-07-26T08:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Read UID MK66FN2M0VMQ18 Through EzPort (board FDRM-K66F)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-UID-MK66FN2M0VMQ18-Through-EzPort-board-FDRM-K66F/m-p/785856#M47833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/kerryzhou"&gt;kerryzhou&lt;/A&gt;,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;I am trying read register using the&amp;nbsp;EzPort&amp;nbsp; commands, specifically command Flash Read Data. The struct of this command is:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;lt;code command(7:0)&amp;gt;,&amp;lt;address(23:00)&amp;gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;The address of SIM Register that I want, it need 32 bits for its representations. In addition, the reference Manual of MK66FN2M0VMQ18 indicates that changes must be to made to the address maintain a width 24 bits.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Next, I show the function that I am using:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;* @param addr Addres of register.&lt;BR /&gt;* @param data Param where store data.&lt;BR /&gt;* @param size Number data to read.&lt;BR /&gt;* @return EZ_RESULT_SUCCESS / EZ_RESULT_ERROR&lt;BR /&gt;*/&lt;BR /&gt;TEzResult ezSectorReadSIM(uint32_t addr, uint8_t *data, uint32_t size)&lt;BR /&gt;{&lt;BR /&gt;if( !data || !size ) return EZ_RESULT_ERROR;&lt;BR /&gt;if( size&amp;gt;4096 ) return EZ_RESULT_ERROR;&lt;BR /&gt;if( addr &amp;amp; 0xBFFB7F03) return EZ_RESULT_ERROR; //Valid Addres SIM UID&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Command EzPort Flahs Read Data.&lt;BR /&gt;wrBuf[0] = 0x03;&lt;BR /&gt;wrBuf[1] = (uint8_t)((addr &amp;gt;&amp;gt; 16) &amp;amp; 0xFF);&lt;BR /&gt;wrBuf[2] = (uint8_t)((addr &amp;gt;&amp;gt; 8) &amp;amp; 0xFF);&lt;BR /&gt;wrBuf[3] = (uint8_t)(addr &amp;amp; 0xFF);&lt;BR /&gt;// Sending of the command and Receive data.&lt;BR /&gt;if( ezSpiTransfer(wrBuf, rdBuf, 5+size) == EZ_RESULT_SUCCESS ){&lt;BR /&gt;memcpy(data, &amp;amp;rdBuf[4], size);&lt;BR /&gt;return EZ_RESULT_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;else {&lt;BR /&gt;return EZ_RESULT_ERROR;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/66536i125117AE834D1E73/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 09:47:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Read-UID-MK66FN2M0VMQ18-Through-EzPort-board-FDRM-K66F/m-p/785856#M47833</guid>
      <dc:creator>manurlruiz</dc:creator>
      <dc:date>2018-07-26T09:47:54Z</dc:date>
    </item>
  </channel>
</rss>

