1.3.8.15 1.4.6.15 1.5.7.15 1.6.6.15 1.7.7.15 1.10.7.12 1.11.8.12 1.12.7.12 1.13.7.12 1.15.8.12 1.16.6.12 1.17.6.12 1.18.7.12 1.19.6.12 1.20.6.12 1.21.7.12 1.22.9.12 1.23.8.12 1.24.7.12 1.29.8.15 1.30.5.15 1.31.5.15 1.32.8.15 1.33.5.15 1.37.5.15 1.38.6.15 1.39.5.15 1.40.6.15 DMAC_CRCRead Function
C
uint32_t DMAC_CRCRead( void )
Summary
DMA CRC read function
Description
Reads the generated DMA CRC value.
For some devices, It performs crc reverse and final xor operation based on setup parameters during DMAC_ChannelCRCSetup()
For some devices, when CRC-32 polynomial is used via CRCSetup, the final checksum read is bit reversed and complemented
Parameters
None
Returns
crc - Generated crc value
Example
Example of this function varies based on device family. Refer to the one which is applicable for the device being used.
DMAC_CRC_SETUP crcSetup = {0}; transfer_completed = false; uint32_t crc = 0; crcSetup.reverse_data_input = true; crcSetup.polynomial_length = 32; crcSetup.polynomial = 0x04C11DB7; crcSetup.non_direct_seed = 0x46AF6449; crcSetup.reverse_crc_output = true; crcSetup.final_xor_value = 0xFFFFFFFF; DMAC_ChannelCRCSetup(DMAC_CHANNEL_0, crcSetup); DMAC_ChannelTransfer(...); if (transfer_completed == true) { crc = DMAC_CRCRead(); }
DMAC_CRC_SETUP crcSetup = {0}; transfer_completed = false; uint32_t crc = 0; crcSetup.polynomial_type = DMAC_CRC_TYPE_32; crcSetup.seed = 0xFFFFFFFF; DMAC_ChannelCRCSetup(DMAC_CHANNEL_0, crcSetup); DMAC_ChannelTransfer(...); if (transfer_completed == true) { crc = DMAC_CRCRead(); }
Remarks
Once Read is done, DMAC_ChannelCRCSetup() has to be called again to setup the seed before performing DMA transfer for CRC generation.