AM273x MCU+ SDK
09.02.00
CRC (Cyclic Redundancy Check) driver provide API to perform CRC operation
Features Supported
Two channels
8, 16, 32 and 64 bit data size
CPU mode of operations
SysConfig Features
Note It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
Features NOT Supported
Important Usage Guidelines
Example Usage
Include the below file to access the APIs
CRC Module Initialization Example
CRC Module Configuration Example
CRC Operation Example
int32_t status;
uint32_t patternCnt;
uint32_t loopCnt, data = 0xAA55AA55;
patternCnt = 100;
for (loopCnt = 0; loopCnt < patternCnt; loopCnt++)
{
HW_WR_REG32(psaSignRegAddr.
regL , data);
}
API
APIs for CRC
#define CRC_OPERATION_MODE_FULLCPU
Definition: crc/v1/crc.h:139
int32_t CRC_getPSASectorSig(uint32_t baseAddr, CRC_Channel_t channel, CRC_Signature *pCRCSectorSign)
This API is used to get sector signature Value/ CRC value for given channel.
uint32_t CRC_Channel_t
CRC channel supported.
Definition: crc/v1/crc.h:151
CRC_ByteSwap_t byteSwap
Definition: crc/v1/crc.h:303
#define CRC_DATALENGTH_16BIT
Definition: crc/v1/crc.h:187
uint32_t patternCount
Definition: crc/v1/crc.h:305
Structure for accessing CRC register data which are 64 bit wide.
Definition: crc/v1/crc.h:315
uint32_t sectorCount
Definition: crc/v1/crc.h:307
Structure for accessing CRC registers address which are 64 bit wide.
Definition: crc/v1/crc.h:326
#define CRC_BITSWAP_MSB
Definition: crc/v1/crc.h:205
#define SystemP_SUCCESS
Return status when the API execution was successful.
Definition: SystemP.h:56
CRC Configuration.
Definition: crc/v1/crc.h:294
int32_t CRC_initialize(uint32_t baseAddr, CRC_Channel_t channel, uint32_t crcWatchdogPreload, uint32_t crcBlockPreload)
Initialize CRC channel and will configure watchdog and block preload value for given channel.
int32_t CRC_configure(uint32_t baseAddr, CRC_Channel_t channel, const CRC_Config *config)
This API will configure CRC mode, pattern and sector count for given channel.
#define CRC_TYPE_16BIT
Definition: crc/v1/crc.h:169
int32_t CRC_channelReset(uint32_t baseAddr, CRC_Channel_t channel)
This API is used to reset the CRC channel.
#define CRC_BYTESWAP_ENABLE
Definition: crc/v1/crc.h:223
CRC_OperationMode_t mode
Definition: crc/v1/crc.h:295
int32_t CRC_getPSASigRegAddr(uint32_t baseAddr, CRC_Channel_t channel, CRC_SignatureRegAddr *pCRCRegAddr)
This API is used to get the PSA register address for given Channel.
CRC_BitSwap_t bitSwap
Definition: crc/v1/crc.h:301
uint32_t regL
Definition: crc/v1/crc.h:327
#define DebugP_assert(expression)
Function to call for assert check.
Definition: DebugP.h:177
#define CRC_CHANNEL_1
Definition: crc/v1/crc.h:153
CRC_DataLength_t dataLen
Definition: crc/v1/crc.h:299
CRC_Type_t type
Definition: crc/v1/crc.h:297