<?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: CRC Configuration in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746786#M10380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks James, &lt;/P&gt;&lt;P&gt;I got it. Thanks for your support. But I had this question.&lt;/P&gt;&lt;P&gt;Is CRC Module will take only strings for calculating the proper CRC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raju.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Nov 2017 08:14:58 GMT</pubDate>
    <dc:creator>bjrajendra</dc:creator>
    <dc:date>2017-11-07T08:14:58Z</dc:date>
    <item>
      <title>CRC Configuration</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746783#M10377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I'm using codewarrior v2.9&amp;nbsp;platform for my MPC5602P. I adopted the &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-332223"&gt;Example MPC5748G CRC32 GHS614&lt;/A&gt;&amp;nbsp;to implement for MPC5602P. Though I initialized the registers, it is not updating properly.&lt;/P&gt;&lt;P&gt;ie., after the line&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;CRC.CNTX[&lt;SPAN style="color: #ff0000;"&gt;1&lt;/SPAN&gt;].CRC_CFG.BIT.POLYG = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* crcCCITT polynomial is selected */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If I check in the debug window, the registers still show&amp;nbsp;0. One more interesting thing I found is context is defined as structure array of two. If I do this &lt;STRONG&gt;CRC.CNTX[&lt;SPAN style="color: #ff0000;"&gt;10100&lt;/SPAN&gt;].CRC_CFG.BIT.POLYG = 1 &lt;/STRONG&gt;still&amp;nbsp;executes without&amp;nbsp;any errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "Pictus_Header_v1_09.h"&lt;/P&gt;&lt;P&gt;const uint8_t TextString1[] = {0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20};&lt;/P&gt;&lt;P&gt;int main(void) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;volatile int i = 0;&lt;BR /&gt;&amp;nbsp;System_Init();&lt;/P&gt;&lt;P&gt;&amp;nbsp;CRC.CNTX[1].CRC_CFG.BIT.POLYG = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* crcCCITT polynomial is selected */ &lt;BR /&gt;&amp;nbsp;CRC.CNTX[1].CRC_CFG.BIT.INV = 0;&lt;BR /&gt;&amp;nbsp;CRC.CNTX[1].CRC_CSTAT.H[0] = 0xFFFF;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Seed value 0xFFFFFFFF */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;for(i=0; i&amp;lt;sizeof(TextString1)-1; i++)&amp;nbsp;/* size of TextString1 is decreased by 1 due to null character of string */&lt;BR /&gt;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;*(uint8_t*)&amp;amp;(CRC.CNTX[0].CRC_INP) = TextString1[i];&lt;BR /&gt;&amp;nbsp; &amp;nbsp;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; /* Loop forever */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; for (;;) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i++;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Hope some one comes with the solution.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Thanks &amp;amp; Regards,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;BJ Rajendranath&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Nov 2017 13:45:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746783#M10377</guid>
      <dc:creator>bjrajendra</dc:creator>
      <dc:date>2017-11-03T13:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: CRC Configuration</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746784#M10378</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 finally accessed those registers using their memories. But still&amp;nbsp;the CRC values calculated is not matching.&lt;/P&gt;&lt;P&gt;&amp;nbsp;*((uint32_t*) 0xFFE68000) = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* crcCCITT polynomial is selected */&amp;nbsp;&lt;BR /&gt;&amp;nbsp;*((uint32_t*) 0xFFE68008)=0xFFFF0000;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* Seed value 0xFFFF0000 for&amp;nbsp;crcCCITT&amp;nbsp;*/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;*((uint32_t*) 0xFFE68004) = 'A';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;/* input Register going to MSByte*/&lt;/P&gt;&lt;P&gt;I Just sent ASCII parameter 'A' whose CRC value is &lt;STRONG&gt;0xB915 &lt;/STRONG&gt;but I'm getting a CRC value &lt;STRONG&gt;0x3050. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use this statement for Input register&lt;/P&gt;&lt;P&gt;&amp;nbsp;*(uint8_t*)&amp;amp;(CRC.CNTX[0].CRC_INP) = 'A';&amp;nbsp;&amp;nbsp;&amp;nbsp;/* input Register going to LSByte*/&lt;/P&gt;&lt;P&gt;The CRC value is &lt;STRONG&gt;0xB1CA. &lt;/STRONG&gt;Still the value is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest where I went wrong.&lt;/P&gt;&lt;P style="padding: 0px; min-height: 8pt;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Thanks &amp;amp; Regards,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;BJ Rajendranath&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="margin: 0in 0in 0pt;"&gt;&lt;SPAN style="color: #1f497d;"&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Nov 2017 11:59:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746784#M10378</guid>
      <dc:creator>bjrajendra</dc:creator>
      <dc:date>2017-11-04T11:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: CRC Configuration</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746785#M10379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it correct to seed the register with a 32bit number when using 16bit CRCs?&lt;/P&gt;&lt;P&gt;When testing CRC32 I found that I had to play with the invert bits to get the same output as a standard Linux "crc32" programme. The FS code as supplied didn't match.&lt;/P&gt;&lt;P&gt;I also found that it was slower using the hardware CRC than the software function I already had and that the DMA example was even slower ?!&lt;/P&gt;&lt;P&gt;However, using the hardware CRC and 32bit writes (mind that aligmnent on reads) was optimal.&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2017 00:35:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746785#M10379</guid>
      <dc:creator>jamesmurray</dc:creator>
      <dc:date>2017-11-07T00:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: CRC Configuration</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746786#M10380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks James, &lt;/P&gt;&lt;P&gt;I got it. Thanks for your support. But I had this question.&lt;/P&gt;&lt;P&gt;Is CRC Module will take only strings for calculating the proper CRC?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Raju.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2017 08:14:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746786#M10380</guid>
      <dc:creator>bjrajendra</dc:creator>
      <dc:date>2017-11-07T08:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: CRC Configuration</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746787#M10381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you mean? The CRC module takes 8bit, 16bit or 32bit numbers from whatever source and calculates the CRC.&lt;/P&gt;&lt;P&gt;Possibly the most common usage is to calculate the CRC of a data buffer, so that's most likely char type. As I said though, I found that sending it to the CRC module in 4 byte lumps greatly improved performance, but I had to tweak the swap/invert config bits to make it work. (The settings in the AN didn't work for me.)&lt;/P&gt;&lt;P&gt;To get the same results as: &lt;A class="link-titled" href="http://csbruce.com/software/crc32.c" title="http://csbruce.com/software/crc32.c"&gt;http://csbruce.com/software/crc32.c&lt;/A&gt;&amp;nbsp;&amp;nbsp; I used:&lt;/P&gt;&lt;P&gt;CRC_0.CFG.R = 0x00000027; /* CRC-32 polynomial, set to match PC-side crc32 */&lt;BR /&gt;To figure that out I wrote code that used all combinations and stepped through in the debugger until I got the answer I wanted...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2017 13:16:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746787#M10381</guid>
      <dc:creator>jamesmurray</dc:creator>
      <dc:date>2017-11-07T13:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: CRC Configuration</title>
      <link>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746788#M10382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi James,&lt;/P&gt;&lt;P&gt;Finally I got it even for integer array also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;const uint&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;16&lt;/STRONG&gt;&lt;/SPAN&gt;_t TextString1[] = {0x72,0x61,0x6A,0x75};&lt;/P&gt;&lt;P&gt;I used &amp;nbsp;for(i=0; i&amp;lt;sizeof(TextString1)-1; i++) &lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;for CRC_INP register. But the sizeof(TextString1) is giving a wrong size for (16 bit )integer array which resulted a wrong CRC.&lt;/P&gt;&lt;P&gt;Instead I used const uint&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;8&lt;/STRONG&gt;&lt;/SPAN&gt;_t TextString1[] = {0x72,0x61,0x6A,0x75}; giving the right size. Therefore giving the right CRC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your support,&lt;/P&gt;&lt;P&gt;Raju&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 11:32:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/CRC-Configuration/m-p/746788#M10382</guid>
      <dc:creator>bjrajendra</dc:creator>
      <dc:date>2017-11-08T11:32:49Z</dc:date>
    </item>
  </channel>
</rss>

