FastCRC icon indicating copy to clipboard operation
FastCRC copied to clipboard

ESP32 ROM Table Support

Open imwhocodes opened this issue 1 year ago • 2 comments

ESP32 already have CRC tables in the ROM blob https://github.com/espressif/esp-idf/blob/master/components/esp_rom/include/esp32/rom/crc.h

This is an initial commit to open the discussion for an ESP32 specialisation

I only implemented CRC32 (but not tested checksum mode, only CRC32)

Given the documentation all modes of CRC8 and CRC16 can be implemented

For the moment it is only a draft given:

  1. Various CRC8 and CRC16 not implemented
  2. Documentation say that you should bitwise negate (~) both the initial seed and the result, but I find out that it work (give same result as the library) only if I bitwise negate only the seed

imwhocodes avatar Mar 20 '24 15:03 imwhocodes

That's very interesting! I'm currently moving house and will be looking at this next week or the week after.

FrankBoesing avatar Mar 23 '24 18:03 FrankBoesing

For the moment I disabled it on my codebase, I'm having problem where if I use the crc32 functions of the ROM the FreeRTOS start missing ticks, I'm supposing it is because being a ROM function it implicitly disable interrupts (even if there should be no need given what it do)

It need more testing and investigation for sure

imwhocodes avatar Mar 25 '24 09:03 imwhocodes