Hi ,
Can anyone tell me what the CRC polynomila is that is used by the CRC calc functions in ESP32
uint32_t crc32_le(uint32_t crc, uint8_t const *buf, uint32_t len);
example : 0x04C11DB7U - generally used by ST chips.
Thanks
Imtiaz
CRC Polynomial
Re: CRC Polynomial
G(x) = x^32 +x^26 + x^23 + x^22 + x^16 + x^12 + x^11 + x^10 + x^8 + x^7 + x^5 + x^4 + x^2 + x^1 + 1
(i trust you can translate that into hex)
(i trust you can translate that into hex)
Re: CRC Polynomial
Thanks : should be
binary : 100000100110000010001110110110111
hex :104C11DB7
So can it be changed????
binary : 100000100110000010001110110110111
hex :104C11DB7
So can it be changed????
Re: CRC Polynomial
Hi ESP_igrr,
Two questions please :
1 - Can CC Polynomial be changed?
2 - Has the ESP got h/w CRC support?
If not then I guess I will need to write my own CRC calcs - which may be slow .
Thanks
Two questions please :
1 - Can CC Polynomial be changed?
2 - Has the ESP got h/w CRC support?
If not then I guess I will need to write my own CRC calcs - which may be slow .
Thanks
Re: CRC Polynomial
No, these functions are defined in ROM code, so they can not be changed. Even if they weren't defined there, I wouldn't advise changing them because some other components rely on the way they behave. So if you need a different polynomial, just add your own function.
ESP32 has only one HW CRC32, for calculating CRC of RTC fast memory. The functions in ROM use a LUT and do calculations in software.
ESP32 has only one HW CRC32, for calculating CRC of RTC fast memory. The functions in ROM use a LUT and do calculations in software.
Re: CRC Polynomial
Excellent thank you ... thats all I needed to know.
Who is online
Users browsing this forum: No registered users and 88 guests