Forum Upgrade 03/11/2017
Search the Community
Showing results for tags 'crc'.
Found 1 result
win10 - ccsv7 - energia 18 - msp432 launchpad I'm trying to use the crc32 library from driverlib to do a simple crc-16-ccitt calculation and stumbled across a weird problem. Just to give a quick background, the way the crc32 library works is the following: 1) initialize 2) add N bytes to be processed 3) request the computation to be done In order to get the routine to work correctly, I must slow down the code with some additional code in between steps 2 and 3. This can be operations, Serial.print, or even just a simple 1 us delay. If I do not do this, the answer I get is equal to the crc checksum of just the N-1 bytes (dumb luck figuring this out). So it kind of looks like the last byte is not getting added fast enough before the request to perform the crc is being made. Anyone run across this? I've not seen it mentioned anywhere. Example code attached. This code will repeatedly try and perform a crc until it fails. When it does fail, it pauses briefly and then reboots. Currently, it fails instantly for me...but if I add it some timing operations between 2 and 3, for example, it will fail at a seemingly random attempt number. If you un-comment the 1 us delay, it will run successfully. Although I've not tested yet, I'm wondering if I will see the same issue appear with the aes256 stuff as well since it looks like its implemented in a similar way. thx. jrd PS CRC-CCITT (0x1D0F) calculation has been verified a software implementation I haveas well as the value that is calculated here: https://www.lammertbies.nl/comm/info/crc-calculation.html code.ino