@@ -19,7 +19,8 @@ The framework implements a number of common embedded system functions:
19
19
7 . A 16-bit Fletcher checksum interface.
20
20
8 . A finite state machine framework.
21
21
9 . A Reed-Solomon FEC encoder/decoder interface.
22
- 10 . A 16-bit XMODEM/CCITT-16 0x1021 CRC interface.
22
+ 10 . A 16-bit XMODEM/CCITT-16 CRC interface.
23
+ 11 . A 32-bit CCITT-32 CRC interface.
23
24
24
25
To give you an idea of the framework size here are some program memory estimates for each component compiled on an MSP430 with Level 3 optimization:
25
26
Byte FIFO, linked list, memory pool, Base64, Hex ASCII are each about 1000 bytes.
@@ -609,10 +610,30 @@ crc = SSFCRC16("e", 1, crc);
609
610
/* crc == 0x3EE1 */
610
611
```
611
612
613
+ ### 32-bit CCITT-32 CRC Interface
614
+
615
+ This 32-bit CRC uses the 0x04C11DB7 polynomial. It uses a table lookup to reduce execution time at the expense of 1024 bytes of program memory.
616
+ Use if you need more error detection than provided by CRC16 and/or in conjunction with Reed-Solomon to detect wrong solutions.
617
+
618
+ The API can compute the CRC of data incrementally.
619
+
620
+ For example, the first call to SSFCRC32() results in the same CRC as the following three calls.
621
+ ```
622
+ uint32_t crc;
623
+
624
+ crc = SSFCRC32("abcde", 5, SSF_CRC32_INITIAL);
625
+ /* crc == 0x8587D865 */
626
+
627
+ crc = SSFCRC32("a", 1, SSF_CRC32_INITIAL);
628
+ crc = SSFCRC32("bcd", 3, crc);
629
+ crc = SSFCRC32("e", 1, crc);
630
+ /* crc == 0x8587D865 */
631
+ ```
632
+
612
633
## Conclusion
613
634
614
635
I built this framework for primarily myself, although I hope you can find a good use for it.
615
- In the future I plan to add example documentation, CRCs , and possibly de-init interfaces.
636
+ In the future I plan to add additional documentation, cryptographic hashes , and possibly de-init interfaces.
616
637
617
638
Drop me a line if you have a question or comment.
618
639
0 commit comments