Skip to content
Commit 4e7b5769 authored by Klaus H. Sorensen's avatar Klaus H. Sorensen Committed by Anas Nashif
Browse files

lib: crc32_sw: 4 bit at a time implementation



Calculate crc32 4 bits at a time. The return value of the calculation is
identical to the previous 1 bit at a time implementation.

Results in a speed up of a factor 3 at the cost of using 64 bytes of
flash for a crc table.

Calculating crc32 of 128kB of flash on a 120MHz Kinetis MKE16F512
Cortex-M4 takes 99ms using the 1 bit at a time implementation, and 30ms
using the 4 bits at a time implementation.

The crc32 routine is used by subsys/canbus/canopen/canopen_program.c to
calculate crc of flash images.

Signed-off-by: default avatarKlaus H. Sorensen <khso@vestas.com>
parent e89fe33a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment