<?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: CAAM endianess for computed CRC in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2337380#M36395</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/59276"&gt;@Kan_Li&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You didn't answer the question:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2026-03-23_08-53-39.png" style="width: 725px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/380054iF1C4089A042C16D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2026-03-23_08-53-39.png" alt="Screenshot_2026-03-23_08-53-39.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2026 07:56:54 GMT</pubDate>
    <dc:creator>mastupristi</dc:creator>
    <dc:date>2026-03-23T07:56:54Z</dc:date>
    <item>
      <title>CAAM endianess for computed CRC</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2337053#M36391</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Using the CAAM example from SDK 25.06.00 as a starting point, I created the attached project.&lt;BR /&gt;In this test, I have an array of 16 elements containing the numbers 0 through 15, and I calculate the CRC for progressively larger portions of this array using two different CRC algorithms.&lt;/P&gt;&lt;P&gt;I calculate the first 16 values using these CRC parameters:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Poly = 0x1edc6f41&lt;/LI&gt;&lt;LI&gt;XorIn = 0xffffffff&lt;/LI&gt;&lt;LI&gt;ReflectIn = True&lt;/LI&gt;&lt;LI&gt;XorOut = 0xffffffff&lt;/LI&gt;&lt;LI&gt;ReflectOut = True&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This means that the mode is&amp;nbsp;&lt;SPAN&gt;kCAAM_CRC_ModeDefault&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;These are the expected CRC values and the actual CRC values:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;num elements in the array&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;expected crc&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;&lt;STRONG&gt;computed crc&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;0x527d5351&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;527d5351&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;2&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;0x30af4d1&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;30af4d1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;0x92fd4bfa&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;92fd4bfa&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;4&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;0xd9331aa3&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;d9331aa3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;5&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;0x2425b106&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;2425b106&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;6&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;0x41098514&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;41098514&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;7&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;0xa359ed4c&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;a359ed4c&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;8&lt;/TD&gt;&lt;TD height="24px"&gt;0x8a2cbc3b&lt;/TD&gt;&lt;TD height="24px"&gt;8a2cbc3b&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;9&lt;/TD&gt;&lt;TD height="24px"&gt;0x7144c5a8&lt;/TD&gt;&lt;TD height="24px"&gt;7144c5a8&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;10&lt;/TD&gt;&lt;TD height="24px"&gt;0x22c2131&lt;/TD&gt;&lt;TD height="24px"&gt;22c2131&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;11&lt;/TD&gt;&lt;TD height="24px"&gt;0xfb159dfa&lt;/TD&gt;&lt;TD height="24px"&gt;fb159dfa&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;12&lt;/TD&gt;&lt;TD height="24px"&gt;0x5383aaba&lt;/TD&gt;&lt;TD height="24px"&gt;5383aaba&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;13&lt;/TD&gt;&lt;TD height="24px"&gt;0xc69a45da&lt;/TD&gt;&lt;TD height="24px"&gt;c69a45da&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;14&lt;/TD&gt;&lt;TD height="24px"&gt;0x55a24c54&lt;/TD&gt;&lt;TD height="24px"&gt;55a24c54&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;15&lt;/TD&gt;&lt;TD height="24px"&gt;0x68ef03f6&lt;/TD&gt;&lt;TD height="24px"&gt;68ef03f6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD height="24px"&gt;16&lt;/TD&gt;&lt;TD height="24px"&gt;0xd9c908eb&lt;/TD&gt;&lt;TD height="24px"&gt;d9c908eb&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;They all match, and I believe they would do so for any input I might provide. From this, we can conclude that the CRC calculated by CAAM is stored in memory in little-endian format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now let's make just a small change to the algorithm:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Poly = 0x1edc6f41&lt;/LI&gt;&lt;LI&gt;XorIn = 0xffffffff&lt;/LI&gt;&lt;LI&gt;ReflectIn = True&lt;/LI&gt;&lt;LI&gt;XorOut = 0xffffffff&lt;/LI&gt;&lt;LI&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;ReflectOut = False&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This means that the mode is &lt;STRONG&gt;kCAAM_CRC_ModeDOS&lt;/STRONG&gt;, the DOS bit is 1.&lt;BR /&gt;&lt;BR /&gt;Let's check the results&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;&lt;STRONG&gt;num elements in the array&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;&lt;STRONG&gt;expected crc&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;&lt;STRONG&gt;computed crc&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x8acabe4a&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;4abeca8a&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;2&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x8b2f50c0&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;c0502f8b&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;3&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x5fd2bf49&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;49bfd25f&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;4&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0xc558cc9b&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;9bcc58c5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;5&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x608da424&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;24a48d60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;6&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x28a19082&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;8290a128&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;7&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x32b79ac5&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;c59ab732&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;8&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0xdc3d3451&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;51343ddc&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;9&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x15a3228e&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;8e22a315&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;10&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x8c843440&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;4034848c&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;11&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x5fb9a8df&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;dfa8b95f&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;12&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x5d55c1ca&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;cac1555d&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;13&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x5ba25963&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;6359a25b&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;14&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x2a3245aa&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;aa45322a&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;15&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0x6fc0f716&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;16f7c06f&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="226.3px" height="24px"&gt;16&lt;/TD&gt;&lt;TD width="226.317px" height="24px"&gt;0xd710939b&lt;/TD&gt;&lt;TD width="226.283px" height="24px"&gt;9b9310d7&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The endianess is different. It's as if, in this case, they were saved in big-endian format.&lt;BR /&gt;&lt;BR /&gt;All it took was the DOS bit, which is described in two different ways in the manual&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2026-03-21_22-47-23.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/379987iF514231E601C632E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot_2026-03-21_22-47-23.png" alt="Screenshot_2026-03-21_22-47-23.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;At one point, DOS is described as bit-swap, while shortly thereafter it is described as bit/byte swap.&lt;BR /&gt;&lt;BR /&gt;The question is: How can I ensure that the calculation is consistent regardless of the DOS bit and, above all, consistent with the expected value?&lt;/P&gt;&lt;P&gt;In the project you will find the bash script test.sh to compute crc a get the expected values.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;best regards&lt;/P&gt;&lt;P&gt;Max &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Mar 2026 21:56:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2337053#M36391</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2026-03-21T21:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: CAAM endianess for computed CRC</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2337328#M36394</link>
      <description>&lt;P&gt;&amp;nbsp;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The description for DOS in Table 6-212 is correct, then it is enabled, the output value is bit- and byte-swapping. It can also be interpreted from your results, For example , when DOS is not enabled, the CRC is 0x&lt;SPAN&gt;527d5351, when DOS is enabled, the result would be&amp;nbsp;0x8acabe4a if it just enables bit-swapping, while it is bit- and byte-swapping, so the result is 0x4abeca8a.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope that makes sense,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 06:26:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2337328#M36394</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2026-03-23T06:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: CAAM endianess for computed CRC</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2337380#M36395</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/59276"&gt;@Kan_Li&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You didn't answer the question:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_2026-03-23_08-53-39.png" style="width: 725px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/380054iF1C4089A042C16D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot_2026-03-23_08-53-39.png" alt="Screenshot_2026-03-23_08-53-39.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2026 07:56:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2337380#M36395</guid>
      <dc:creator>mastupristi</dc:creator>
      <dc:date>2026-03-23T07:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: CAAM endianess for computed CRC</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2338206#M36399</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/124967"&gt;@mastupristi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I mentioned before, referring to Table 6-212, for the output, the bit swapping and byte swapping options are enabled/disabled together, so there isn't a way to do one, but not the other. so it is not possible to have an output with only bit swapping is enabled.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a great day,&lt;BR /&gt;Kan&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt;Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Mar 2026 07:46:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/CAAM-endianess-for-computed-CRC/m-p/2338206#M36399</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2026-03-24T07:46:00Z</dc:date>
    </item>
  </channel>
</rss>

