<?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 Re: i.MX6 SX OTP MAC in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790926#M122557</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is no one else having any OTP issues?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Jan 2019 22:56:21 GMT</pubDate>
    <dc:creator>davidpatton</dc:creator>
    <dc:date>2019-01-28T22:56:21Z</dc:date>
    <item>
      <title>i.MX6 SX OTP MAC</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790923#M122554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple script I've been using to program the OTP MAC registers, worked fine on the current boards. Just got new rev of boards and now MAC2 will not program, always shows as 0x0; MAC0/MAC1 program just fine. Any idea's?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;root@cpng:~# la /sys/fsl_otp/HW_OCOTP_MAC*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;-rw------- 1 root root 4096 Oct 5 11:13 /sys/fsl_otp/HW_OCOTP_MAC0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;-rw------- 1 root root 4096 Oct 5 11:13 /sys/fsl_otp/HW_OCOTP_MAC1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;-rw------- 1 root root 4096 Oct 5 11:13 /sys/fsl_otp/HW_OCOTP_MAC2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;root@cpng:~# cat /sys/fsl_otp/HW_OCOTP_MAC*&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;0x4b007053&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;0x7054001f&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;0x0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;root@cpng:~#&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;cat macaddr&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;#!/bin/sh&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;if [ "$1" = "" ]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; echo "Usage: macaddr &amp;lt;colon seperated MAC address&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; exit 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;fi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;mac_addr0=$1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;# get each byte of MAC address 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;mac0_byte0=`echo ${mac_addr0} | cut -d: -f6`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;mac0_byte1=`echo ${mac_addr0} | cut -d: -f5`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;mac0_byte2=`echo ${mac_addr0} | cut -d: -f4`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;mac0_byte3=`echo ${mac_addr0} | cut -d: -f3`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;mac0_byte4=`echo ${mac_addr0} | cut -d: -f2`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;mac0_byte5=`echo ${mac_addr0} | cut -d: -f1`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;# if they passed a second MAC address, use it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;if [ "$2" != "" ]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac_addr1=$2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; # get each byte of MAC address 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte0=`echo ${mac_addr1} | cut -d: -f6`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte1=`echo ${mac_addr1} | cut -d: -f5`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte2=`echo ${mac_addr1} | cut -d: -f4`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte3=`echo ${mac_addr1} | cut -d: -f3`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte4=`echo ${mac_addr1} | cut -d: -f2`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte5=`echo ${mac_addr1} | cut -d: -f1`&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; # if not, use MAC address 0 and increment byte0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte0=`printf %X $((0x$mac0_byte0 + 1))`&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte1=$mac0_byte1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte2=$mac0_byte2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte3=$mac0_byte3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte4=$mac0_byte4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp; &amp;nbsp; mac1_byte5=$mac0_byte5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;fi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;# mash it all together into 3 32-bit values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;MAC0=${mac0_byte3}${mac0_byte2}${mac0_byte1}${mac0_byte0}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;MAC1=${mac1_byte1}${mac1_byte0}${mac0_byte5}${mac0_byte4}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;MAC2=${mac1_byte5}${mac1_byte4}${mac1_byte3}${mac1_byte2}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;echo MAC0 = $MAC0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;echo -n $MAC0 &amp;gt; /sys/fsl_otp/HW_OCOTP_MAC0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;echo MAC1 = $MAC1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;echo -n $MAC1 &amp;gt; /sys/fsl_otp/HW_OCOTP_MAC1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;echo MAC2 = $MAC2&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;echo -n $MAC2 &amp;gt; /sys/fsl_otp/HW_OCOTP_MAC2&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'courier new', courier, monospace;"&gt;exit 0&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 15:27:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790923#M122554</guid>
      <dc:creator>davidpatton</dc:creator>
      <dc:date>2018-12-12T15:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 SX OTP MAC</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790924#M122555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please make sure that the fuses are not locked with MAC_ADDR_LOCK bits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;Victor&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, 17 Dec 2018 08:32:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790924#M122555</guid>
      <dc:creator>b36401</dc:creator>
      <dc:date>2018-12-17T08:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 SX OTP MAC</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790925#M122556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks...shouldn't that lock all MAC ADDR OTP's? MAC0 and MAC1 program fine, it's only MAC2 that will not take the value I write to it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 16:52:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790925#M122556</guid>
      <dc:creator>davidpatton</dc:creator>
      <dc:date>2018-12-18T16:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 SX OTP MAC</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790926#M122557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is no one else having any OTP issues?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Jan 2019 22:56:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790926#M122557</guid>
      <dc:creator>davidpatton</dc:creator>
      <dc:date>2019-01-28T22:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX6 SX OTP MAC</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790927#M122558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, new round of boards, same old problem: I cannot program MAC2!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I put several debug statements in this time, the process of programming MAC0 and MAC1 appears exactly the same as MAC2, but MAC2 either does not program or gets programmed with 0x00000000!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added a dump of the lock register, the lock bits for the MAC region are NOT set:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root@NEBULA001F4B007043:~# ./macaddr 00:1f:4b:00:70:4e&lt;BR /&gt;MAC0 = 4b00704e&lt;/P&gt;&lt;P&gt;drivers/char/fsl_otp.c-fsl_otp_store() index = 34, buf = "4b00704e", value = 0x4B00704E&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() reading data = 0x20820002 from lock register 0xA11C0400&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() reading data = 0x00000000 from ctrl register 0xA11C0004&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() writing data = 0x3E770022 to ctrl register 0xA11C0004&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() writing data = 0x4B00704E to data register 0xA11C0020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAC1 = 704f001f&lt;/P&gt;&lt;P&gt;drivers/char/fsl_otp.c-fsl_otp_store() index = 35, buf = "704f001f", value = 0x704F001F&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() reading data = 0x20820002 from lock register 0xA11C0400&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() reading data = 0x00000022 from ctrl register 0xA11C0004&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() writing data = 0x3E770023 to ctrl register 0xA11C0004&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() writing data = 0x704F001F to data register 0xA11C0020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MAC2 = 001f4b00&lt;/P&gt;&lt;P&gt;drivers/char/fsl_otp.c-fsl_otp_store() index = 36, buf = "001f4b00", value = 0x001F4B00&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() reading data = 0x20820002 from lock register 0xA11C0400&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() reading data = 0x00000023 from ctrl register 0xA11C0004&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() writing data = 0x3E770024 to ctrl register 0xA11C0004&lt;BR /&gt;drivers/char/fsl_otp.c-imx6_otp_write_bits() writing data = 0x001F4B00 to data register 0xA11C0020&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;root@NEBULA001F4B007043:~# cat /sys/fsl_otp/HW_OCOTP_MAC?&lt;BR /&gt;drivers/char/fsl_otp.c-fsl_otp_show() reading data = 0x4B00704E from register 0xA11C0620&lt;BR /&gt;0x4b00704e&lt;BR /&gt;drivers/char/fsl_otp.c-fsl_otp_show() reading data = 0x704F001F from register 0xA11C0630&lt;BR /&gt;0x704f001&lt;BR /&gt;fdrivers/char/fsl_otp.c-fsl_otp_show() reading data = 0x00000000 from register 0xA11C0640&lt;BR /&gt;0x0&lt;BR /&gt;root@NEBULA001F4B007043:~#&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2019 19:47:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/i-MX6-SX-OTP-MAC/m-p/790927#M122558</guid>
      <dc:creator>davidpatton</dc:creator>
      <dc:date>2019-07-02T19:47:18Z</dc:date>
    </item>
  </channel>
</rss>

