Skip to content

Commit fda4988

Browse files
committed
Extend MbedCRC class doxygen to add more operational details
1 parent 9e2b516 commit fda4988

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

drivers/MbedCRC.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,19 @@ namespace mbed {
4545

4646
extern SingletonPtr<PlatformMutex> mbed_crc_mutex;
4747

48-
/** CRC object provides CRC generation through hardware/software
48+
/** CRC object provides CRC generation through hardware or software
4949
*
50-
* ROM polynomial tables for supported polynomials (::crc_polynomial) will be used for
51-
* software CRC computation, if ROM tables are not available then CRC is computed runtime
52-
* bit by bit for all data input.
50+
* CRC sums can be generated using three different method: hardware, software ROM tables
51+
* and bitwise computation. The mode used is selected automatically based on required
52+
* polynomial and hardware capabilities. Any polynomial in standard form (`x^3 + x + 1`)
53+
* can be used for computation, but custom ones can affect the performance.
54+
*
55+
* First choice is the hardware mode, the supported polynomial are hardware specific and
56+
* you will need to consult your MCU manual to discover them. Next ROM polynomial tables
57+
* are tried (you can find list of supported polynomials here ::crc_polynomial) if selected
58+
* configuration is supported it will accelerate the software computations. If ROM tables
59+
* are not available for selected polynomial then CRC is computed at runtime bit by bit
60+
* for all data input.
5361
* @note Synchronization level: Thread safe
5462
*
5563
* @tparam polynomial CRC polynomial value in hex

0 commit comments

Comments
 (0)