<?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>S32K中的主题 CRC configuration for online values</title>
    <link>https://community.nxp.com/t5/S32K/CRC-configuration-for-online-values/m-p/1282412#M10965</link>
    <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to implement the CRC-32/BZIP2 using the HW crc. My reference is &lt;A href="https://crccalc.com/?crc=01020304&amp;amp;method=crc32&amp;amp;datatype=hex" target="_self"&gt;this&lt;/A&gt;&amp;nbsp;site.&lt;/P&gt;&lt;P&gt;I am able to compute the ieee_CRC32 with following parameters:&lt;/P&gt;&lt;PRE&gt; CRC-&amp;gt;CTRL = 1&amp;lt;&amp;lt;31 | // Type Of Transpose For Writes: Bits in bytes are transposed; bytes are not transposed&lt;BR /&gt;1&amp;lt;&amp;lt;29 | // Type Of Transpose For Read: 10b - Both bits in bytes and bytes are transposed&lt;BR /&gt;1&amp;lt;&amp;lt;26 | // Complement Read Of CRC Data Register;&lt;BR /&gt;1&amp;lt;&amp;lt;25 | // CRC Data Register as seed &lt;BR /&gt;1&amp;lt;&amp;lt;24 ; // TCRC32 bit&lt;BR /&gt;&lt;BR /&gt;CRC-&amp;gt;DATAu.DATA = 0xffffffff; &lt;BR /&gt;CRC-&amp;gt;CTRL &amp;amp;= ~(uint32_t)(1&amp;lt;&amp;lt;25); // CRC Data Register as data&lt;BR /&gt;CRC-&amp;gt;GPOLY = 0x04C11DB7;&lt;/PRE&gt;&lt;P&gt;input -&amp;gt;&amp;nbsp;2000f000, expected output -&amp;gt;&amp;nbsp;&lt;SPAN&gt;0xAFEE8C04, correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Now,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Catosh_0-1622017981926.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/145552i343DC81428FAA839/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Catosh_0-1622017981926.png" alt="Catosh_0-1622017981926.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am not able to replicate any of the other combinations, for example the second line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any detailed guide or some reference where I can look in detail how to configure the HW Crc peripheral on the S23K? Or in general a guide to understand how to map common poly/algos into hw crc?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;L.T.&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 08:35:55 GMT</pubDate>
    <dc:creator>Catosh</dc:creator>
    <dc:date>2021-05-26T08:35:55Z</dc:date>
    <item>
      <title>CRC configuration for online values</title>
      <link>https://community.nxp.com/t5/S32K/CRC-configuration-for-online-values/m-p/1282412#M10965</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to implement the CRC-32/BZIP2 using the HW crc. My reference is &lt;A href="https://crccalc.com/?crc=01020304&amp;amp;method=crc32&amp;amp;datatype=hex" target="_self"&gt;this&lt;/A&gt;&amp;nbsp;site.&lt;/P&gt;&lt;P&gt;I am able to compute the ieee_CRC32 with following parameters:&lt;/P&gt;&lt;PRE&gt; CRC-&amp;gt;CTRL = 1&amp;lt;&amp;lt;31 | // Type Of Transpose For Writes: Bits in bytes are transposed; bytes are not transposed&lt;BR /&gt;1&amp;lt;&amp;lt;29 | // Type Of Transpose For Read: 10b - Both bits in bytes and bytes are transposed&lt;BR /&gt;1&amp;lt;&amp;lt;26 | // Complement Read Of CRC Data Register;&lt;BR /&gt;1&amp;lt;&amp;lt;25 | // CRC Data Register as seed &lt;BR /&gt;1&amp;lt;&amp;lt;24 ; // TCRC32 bit&lt;BR /&gt;&lt;BR /&gt;CRC-&amp;gt;DATAu.DATA = 0xffffffff; &lt;BR /&gt;CRC-&amp;gt;CTRL &amp;amp;= ~(uint32_t)(1&amp;lt;&amp;lt;25); // CRC Data Register as data&lt;BR /&gt;CRC-&amp;gt;GPOLY = 0x04C11DB7;&lt;/PRE&gt;&lt;P&gt;input -&amp;gt;&amp;nbsp;2000f000, expected output -&amp;gt;&amp;nbsp;&lt;SPAN&gt;0xAFEE8C04, correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Now,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Catosh_0-1622017981926.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/145552i343DC81428FAA839/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Catosh_0-1622017981926.png" alt="Catosh_0-1622017981926.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am not able to replicate any of the other combinations, for example the second line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any detailed guide or some reference where I can look in detail how to configure the HW Crc peripheral on the S23K? Or in general a guide to understand how to map common poly/algos into hw crc?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and best regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;L.T.&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 08:35:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CRC-configuration-for-online-values/m-p/1282412#M10965</guid>
      <dc:creator>Catosh</dc:creator>
      <dc:date>2021-05-26T08:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: CRC configuration for online values</title>
      <link>https://community.nxp.com/t5/S32K/CRC-configuration-for-online-values/m-p/1284421#M11000</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;it's just necessary to find the right combination of TOT, TOTR and FXOR bit fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For CRC-32, use:&lt;/P&gt;
&lt;P&gt;TOT = 0b01, TOTR = 0b10, FXOR = 0b1&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;TOT = 0b10, TOTR = 0b10, FXOR = 0b1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For CRC-32/BZIP2, use:&lt;/P&gt;
&lt;P&gt;TOT = 0b00, TOTR = 0b00, FXOR = 0b1&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;TOT = 0b11, TOTR = 0b00, FXOR = 0b1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Frankly, I didn't have time to study the differences between individual algorithms, so I used brutal force method which was faster - I wrote simple code which tries all the combinations and then I compared the results...&lt;/P&gt;
&lt;P&gt;Hope it helps anyway...&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Sun, 30 May 2021 17:59:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/CRC-configuration-for-online-values/m-p/1284421#M11000</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2021-05-30T17:59:24Z</dc:date>
    </item>
  </channel>
</rss>

