<?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: DCP CRC32 not matching CRC in python/ubuntu in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1995049#M32588</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you for your updated information.&lt;/P&gt;
&lt;P&gt;Dear bp1979, I can support you any question&amp;nbsp; about NXP&amp;nbsp;&lt;SPAN&gt;chip MIMXRT1024 and SDK library.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But I am sorry that question about CRC32 of python is out of my scope.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suggest you to check the difference of CRC32&amp;nbsp;&amp;nbsp;parameters between NXP DCP and Python.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish you a nice day!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mayliu&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 02:08:41 GMT</pubDate>
    <dc:creator>mayliu1</dc:creator>
    <dc:date>2024-11-15T02:08:41Z</dc:date>
    <item>
      <title>DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1993168#M32554</link>
      <description>&lt;P&gt;Dear NXP,&lt;/P&gt;&lt;P&gt;We are trying to calculate the CRC of some files we store in flash. We are using the DCP driver. The SHA256 is matching perfectly, but the CRC is not.&lt;/P&gt;&lt;P&gt;With the input string "abcdef" python calculates the CRC "05b367b3", while NXP SDK example calculates "735c1ca1".&lt;/P&gt;&lt;P&gt;After some digging in the SDK example/driver, I found this comment:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    /* Expected CRC-32 for the message.
     * CRC-32 params:
     * width=32 poly=0x04c11db7 init=0xffffffff refin=false refout=false xorout=0x00000000
     * http://reveng.sourceforge.net/crc-catalogue/
     */
&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are the parameters different than the "standard" CRC32 which is done in both ubuntu native and python running in ubuntu? Is it possible to change the parameters in registers so that the CRC32 hash matches with ubuntu / python / any CRC methd I am using so far?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 22:46:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1993168#M32554</guid>
      <dc:creator>bp1979</dc:creator>
      <dc:date>2024-11-12T22:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994198#M32565</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your interest in the NXP MIMXRT product, I would&amp;nbsp; like to provide service for you.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Question: Are the parameters different than the "standard" CRC32 which is done in both ubuntu native and python running in ubuntu? &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Answer:&amp;nbsp; Polynomial 0x04C11DB7 is adopted by the IEEE 802.3 standard.&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Question: Is it possible to change the parameters in registers so that the CRC32 hash matches with ubuntu / python / any CRC methd I am using so far?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Answer: I have consulted an expert about this question.&amp;nbsp; I will sync the latest update to you. Please keep patience.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish you a nice day!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mayliu&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 03:36:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994198#M32565</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-11-14T03:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994514#M32570</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hi,&amp;nbsp; I have consulted an expert in this field , and the reply is&amp;nbsp;&amp;nbsp;CRC in DCP is implemented to that fixed parameters, its not possible to change it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish you a nice day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 09:25:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994514#M32570</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-11-14T09:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994742#M32573</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for getting back to this. Could you do me a huge favor, and confirm&lt;/P&gt;&lt;P&gt;that python gives a different CRC checksum than the DCP unit on an imx rt1024?&lt;/P&gt;&lt;P&gt;If you use the SDK example with a defined input (e.g. "abcdef"), and calculate the CRC on the IMX, and you would do the same on python, do you also get different results?&lt;/P&gt;&lt;P&gt;I just want to be 100% sure that I am not making any stupid mistake.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 15:21:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994742#M32573</guid>
      <dc:creator>bp1979</dc:creator>
      <dc:date>2024-11-14T15:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994957#M32579</link>
      <description>&lt;P&gt;Hi, we have observed that the CRC implemented in the DCP matches CRC32/MPEG-2, which is documented e.g. &lt;A href="https://reveng.sourceforge.io/crc-catalogue/17plus.htm#crc.cat-bits.32" target="_self"&gt;here&lt;/A&gt; (ctrl-F for MPEG-2).&amp;nbsp; We've had success using the mkCrcFun() function from the &lt;A href="https://pypi.org/project/crcmod/" target="_self"&gt;crcmod python module&lt;/A&gt; to generate a CRC calculator using these parameters whose output matches the CRC performed by the DCP peripheral.&amp;nbsp; It can take a bit of messing around, but it definitely does match an existing CRC-32 implementation.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 21:54:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1994957#M32579</guid>
      <dc:creator>MultipleMonomials</dc:creator>
      <dc:date>2024-11-14T21:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1995049#M32588</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you for your updated information.&lt;/P&gt;
&lt;P&gt;Dear bp1979, I can support you any question&amp;nbsp; about NXP&amp;nbsp;&lt;SPAN&gt;chip MIMXRT1024 and SDK library.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But I am sorry that question about CRC32 of python is out of my scope.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I suggest you to check the difference of CRC32&amp;nbsp;&amp;nbsp;parameters between NXP DCP and Python.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Wish you a nice day!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;mayliu&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 02:08:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1995049#M32588</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-11-15T02:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1995278#M32599</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've came a little bit further. DCP / CRC32 indeed calculates a CRC of "&lt;SPAN&gt;CRC-32/MPEG-2&lt;/SPAN&gt;" (thanks for the input there &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/219813"&gt;@MultipleMonomials&lt;/a&gt; !), but... it ONLY does that, when I supply an input which has a length % 4 == 0.&lt;/P&gt;&lt;P&gt;So for the input string "aaaa" it calculates &lt;SPAN&gt;0x77EDCC59&lt;/SPAN&gt; which matches perfectly with the &lt;A href="https://crccalc.com/?crc=aaaa&amp;amp;method=CRC-32&amp;amp;datatype=0&amp;amp;outtype=0" target="_self"&gt;algo online &lt;/A&gt;&lt;/P&gt;&lt;P&gt;We can repeat this with any string, as long as the length is a factor of 4.&lt;/P&gt;&lt;P&gt;Can you help explaining why a random length fails? Is this a bug in the DCP driver? Or does this go wrong in hardware?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 08:29:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1995278#M32599</guid>
      <dc:creator>bp1979</dc:creator>
      <dc:date>2024-11-15T08:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1996283#M32624</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Dear bp1979, Thanks for your replay.&lt;/P&gt;
&lt;P&gt;I do a validation for input different length of CRC32.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I use&amp;nbsp; a CRC32 checksum URL for comparison.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1731926734200.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/311016i0B3A6EE7D1067775/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1731926734200.png" alt="mayliu1_0-1731926734200.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;1:&amp;nbsp; &lt;SPAN data-teams="true"&gt;If I input string length is multiple of 4, the result is same.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;2:&amp;nbsp;If I input “abcde”,length is 5,NXP DCP CRC32 calculate &amp;nbsp;the result is different from Web .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;I will submit a request ticket&amp;nbsp; for support from the relevant module owner.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Please keep patience, Thanks very much.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;mayliu&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Nov 2024 10:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1996283#M32624</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-11-18T10:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1997877#M32644</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your patience.&lt;/P&gt;
&lt;P&gt;In the Security Reference Manual for the i.MX RT102X Processor, It describe as following Fig.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If user data is not 4bytes-aligned, HW will pad it with zeros.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_0-1732092243358.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/311432i94B93ECDC15F5BDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_0-1732092243358.png" alt="mayliu1_0-1732092243358.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So it is not a bug,&amp;nbsp; SRM have describe this.&lt;/P&gt;
&lt;P&gt;Wish it helps you.&lt;BR /&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 08:49:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1997877#M32644</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-11-20T08:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1999007#M32664</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/239163"&gt;@mayliu1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for that comment! It had to be something like that, given the test results.&lt;/P&gt;&lt;P&gt;I would LOVE to get my hands on that document you are referring to. Where can I find it? Googled for it and clicked around a bit on NXP site, but couldn't find it.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 15:42:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1999007#M32664</guid>
      <dc:creator>bp1979</dc:creator>
      <dc:date>2024-11-21T15:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: DCP CRC32 not matching CRC in python/ubuntu</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1999556#M32667</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/189239"&gt;@bp1979&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please refer to the following, It shows detail information to help you download SRM.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/i-mx-rt-crossover-mcus/i-mx-rt1020-crossover-mcu-with-arm-cortex-m7:i.MX-RT1020" target="_blank"&gt;i.MX RT1020 | Crossover MCU with ARM Cortex-M7 up to 500 MHz | NXP Semiconductors&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mayliu1_2-1732238191690.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/311837i67AD6C6EC2BAF976/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mayliu1_2-1732238191690.png" alt="mayliu1_2-1732238191690.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your problem is solved, Please tell me to close this case, thanks.&lt;/P&gt;
&lt;P&gt;Wish you a nice day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;mayliu&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2024 01:18:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/DCP-CRC32-not-matching-CRC-in-python-ubuntu/m-p/1999556#M32667</guid>
      <dc:creator>mayliu1</dc:creator>
      <dc:date>2024-11-22T01:18:25Z</dc:date>
    </item>
  </channel>
</rss>

