@Jiri Kral #S32K #CRC
the reference manual says the CRC Data register can be written 8bits,16bits,or 32bits at a time;with MSB of data written first,but in the s32k sdk crc example ,the CRC_DRV_WriteData function only use the Data register LL field, why LU,HL,HU is not used ?how to make sure MSB of data written first?
/*FUNCTION**********************************************************************
*
* Function Name : CRC_DRV_WriteData
* Description : This function appends a block of bytes to the current CRC calculation.
*
* Implements : CRC_DRV_WriteData_Activity
*END**************************************************************************/
void CRC_DRV_WriteData(uint32_t instance,
const uint8_t * data,
uint32_t dataSize)
{
#ifdef DEV_ERROR_DETECT
DEV_ASSERT(instance < CRC_INSTANCE_COUNT);
DEV_ASSERT(data != NULL);
#endif
CRC_Type * base = g_crcBase[instance];
uint32_t i;
/* 8-bit reads and writes till end of data buffer */
for (i = 0U; i < dataSize; i++)
{
CRC_HAL_SetDataLLReg(base, data[i]);
}
}
Hello sandor.sd.xu@johnsonelectric.com,
Here on the Model-Based Design community we handle questions regarding our toolbox or other MATLAB/Simulink related questions. I think your question is best suited for the https://community.nxp.com/community/s32/s32k community, so my advice is to ask it there (as I can not move it myself).
As an alternative you could open a ticket for technical support here (go to 'Go to Ticket').
Kind regards,
Razvan.