CRC in CAN Controller.

Discussion in 'General Computer Support' started by renvilakathu, Sep 25, 2008.

  1. renvilakathu

    renvilakathu

    Joined:
    Sep 25, 2008
    Messages:
    1
    Dear all,

    While reading the CAN controller Bosch spec, I noticed the CRC logic mentioned in it.

    I know that the CRC is the reminder after the division of the input sequence by the generator polynomial.

    I am familiar with the concept/logic of,

    MSB of zero --> Shift left bring in next bit.

    MSB one --> Xor with generator polynomial and shift left.

    But this logic cannot be used directly if the input is serial.

    On the other hand, we cannot waste clocks waiting for enough bits to come to start CRC calculation.

    Logic in Bosch spec is tackling this situation. But i couln't get the real mathematics behind this logic.

    This is the pseudo code. Generator polynomial is x15+x14+x10+x8+x7+x4+x3+1 equivalent to 4599 H.

    ****************************************

    CRC_RG = 0; // initialize 15-bit shift register
    REPEAT
    CRCNXT = NXTBIT EXOR CRC_RG(14);
    CRC_RG(14:1) = CRC_RG(13:0); // shift left by 1
    CRC_RG(0) = 0;
    IF CRCNXT THEN
    CRC_RG(14:0) = CRC_RG(14:0) EXOR (4599hex);
    ENDIF
    UNTIL (CRC SEQUENCE starts or there is an ERROR condition)

    *****************************************

    Please help.

    Looking forward to hear from you.

    Thanks in advance.


    Regards,
    Renju
     
    renvilakathu, Sep 25, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    8
    Views:
    53,097
    ulziit_delger
    Jul 30, 2010
  2. SP

    350 Bridge CRC error

    SP, Dec 20, 2003, in forum: Cisco
    Replies:
    1
    Views:
    496
  3. Trent Collicutt

    crc errors on a 2950G - 3750 link

    Trent Collicutt, Apr 26, 2004, in forum: Cisco
    Replies:
    12
    Views:
    2,617
    Trent Collicutt
    May 7, 2004
  4. Jackal
    Replies:
    1
    Views:
    3,834
    Ghostrider
    Oct 8, 2003
  5. Abaaseen
    Replies:
    9
    Views:
    1,033
    Kline Sphere
    Jan 19, 2009
Loading...

Share This Page