FXTH87xx11 and FXTH87xx12 Embedded Firmware User Guide, Rev. 2.1
36
Freescale Semiconductor, Inc.
Firmware Functions
3.2.34
UINT8 TPMS_CRC8(UINT8 *u8Buffer, UINT16 u16SizeInBytes, UINT8
u8Remainder)
•
Description:
Calculates a CRC8 on a portion of the designated area using polynomial x^8 + x^5
+ x^3 + x^2 + x + 1.
•
Stack size:
9 bytes
•
Approx. Duration:
240 usec for 8 bytes of data.
•
Power Management:
This function executes entirely in RUN mode.
•
Interrupt Management:
This function does not await any interrupts. It will not be affected by
interrupts.
•
Resources:
N/A
•
Input Parameters:
— UINT8 *u8Buffer: Buffer where data is located.
— UINT16 u16SizeInBytes: Size of the designated buffer (in bytes).
— UINT8 u8Remainder: Initial remainder. This argument is useful when the function is used
recursively. It must equal “0” if there is no previous data.
•
Returns
:
— UINT8 u8NewCRC: New calculated CRC8.
3.2.35
UINT16 TPMS_CRC16(UINT8 *u8Buffer, UINT16 u16MByteSize,
UINT16 u16Remainder)
•
Description:
Calculates a CRC16 on a portion of the designated memory area by using a look-up
table. Polynomial used is $1021 (standard for CRC16-CCITT).
•
Stack size:
13 bytes
•
Approx. Duration:
226 usec for 8 bytes.
•
Power Management:
This function executes entirely in RUN mode.
•
Interrupt Management:
This function does not await any interrupts. It will not be affected by
interrupts.
•
Resources:
N/A
•
Input Parameters:
— UINT8 *u8Buffer: Buffer where data is located.
— UINT16 u16MByteSize: Size of the designated buffer (in bytes)
— UINT16 u16Remainder: Initial remainder.
•
Returns
:
— UINT16 u16NewCRC: New calculated CRC16.