Implementing the XMEGA CRC Polynomial in software

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Freaks,

I am looking to implement the XMEGA CRC in software to in order to verify that application code bootloaded to the device is correct. That is, I want to implement the same calculation from the bootloader program to what will be calculated on-board the xmega.

The polynomial is as follows:
x^24 + 4*x^3 + 3*x + 1

Does anyone recognise the polynomial from another application? Or will I have to bite the bullet and implement it from scratch.

-- Damien.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

That polynomial (with 4* and 3* in it) does not look right anyway - the point is that the usually it's just X^ exponents that are just defining bit positions so it doesn't make sense for 4* and 3* to be in there. Anyway, Wikipedia has a list of common polynomials:

http://en.wikipedia.org/wiki/Cyc...

That most definitely does not appear in the list (though like everything on Wikipedia there's no guarantee that it is always definitive)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
That polynomial (with 4* and 3* in it) does not look right anyway - the point is that the usually it's just X^ exponents that are just defining bit positions so it doesn't make sense for 4* and 3* to be in there.

Agreed, it's unusual and I haven't seen anything like it. But it's what listed in the xmega reference manual (p339).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

See this thread for a possible solution:
https://www.avrfreaks.net/index.p...