77 static uint16_t crcCalls = 0u;
79 uint32_t dataBufferLow = 0u;
80 uint32_t dataBufferHigh = 0u;
81 uint32_t remainingBytes = lengthInBytes;
82 uint32_t remainingData = 0u;
88 uint8_t *pRead = pData;
104 volatile uint64_t *pCrcRegister = (
volatile uint64 *)(&crcREG1->PSA_SIGREGL1);
112 uint8_t dataBuffer = *(pRead + i);
119 uint8_t dataBuffer = *(pRead + i);
124 *pCrcRegister = crcData;
131 if (remainingBytes > 0u) {
134 while (remainingBytes > 0u) {
135 uint8_t dataBuffer = *pRead;
141 dataBufferLow = remainingData;
144 dataBufferHigh = remainingData;
147 *pCrcRegister = crcData;
154 crcREG1->PSA_SIGREGL1 = dataBufferLow;
157 *pCrc = crcREG1->PSA_SIGREGL1;
170 #ifdef UNITY_UNIT_TEST
STD_RETURN_TYPE_e CRC_CalculateCrc(uint64_t *pCrc, uint8_t *pData, uint32_t lengthInBytes)
Computes CRC of data flow.
#define CRC_DATA_CAPTURE_MODE_CLEAR_MASK
#define CRC_REGISTER_SIZE_IN_BYTES
#define CRC_BYTE_SIZE_IN_BITS
#define CRC_REVERSE_BYTES_ORDER
#define CRC_FULL_CPU_MODE_SET_MASK
#define CRC_REGISTER_SIZE_IN_BITS
Assert macro implementation.
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
Definition of foxBMS standard types.
#define NULL_PTR
Null pointer.