|
AM273x MCU+ SDK
08.06.00
|
|
Go to the documentation of this file.
72 #include <drivers/hw_include/cslr.h>
73 #include <drivers/hw_include/cslr_crc.h>
86 #define CRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL \
87 (uint32_t) ((uint32_t)CRC_INTR_CH1_FAILENR_MASK | \
88 (uint32_t)CRC_INTR_CH1_OVERENR_MASK | \
89 (uint32_t)CRC_INTR_CH1_UNDERENR_MASK | \
90 (uint32_t)CRC_INTR_CH1_TIME_OUT_ENR_MASK)
95 #define CRC_PATTERN_COUNT_MAX (0x000FFFFFU)
100 #define CRC_SECTOR_COUNT_MAX (0x0000FFFFU)
106 #define CRC_BCTOPLD_MAX (0x00FFFFFFU)
111 #define CRC_WDTOPLD_MAX (0x00FFFFFFU)
116 #define CRC_MAX_NUM_OF_CHANNELS (2U)
122 #define CRC_REG_OFFSET (0x40U)
127 #define CRC_SHIFT_BY_EIGHT (0x08U)
139 #define CRC_OPERATION_MODE_FULLCPU (CRC_CTRL2_CH1_MODE_FULLCPU)
153 #define CRC_CHANNEL_1 (0x1U)
155 #define CRC_CHANNEL_2 (0x2U)
169 #define CRC_TYPE_16BIT (CRC_CTRL0_CH1_CRC_SEL_16BIT)
171 #define CRC_TYPE_32BIT (CRC_CTRL0_CH1_CRC_SEL_32BIT)
173 #define CRC_TYPE_64BIT (CRC_CTRL0_CH1_CRC_SEL_64BIT)
187 #define CRC_DATALENGTH_16BIT (CRC_CTRL0_CH1_DW_SEL_16BIT)
189 #define CRC_DATALENGTH_32BIT (CRC_CTRL0_CH1_DW_SEL_32BIT)
191 #define CRC_DATALENGTH_64BIT (CRC_CTRL0_CH1_DW_SEL_64BIT)
205 #define CRC_BITSWAP_MSB (CRC_CTRL0_CH1_BIT_SWAP_MSB)
207 #define CRC_BITSWAP_LSB (CRC_CTRL0_CH1_BIT_SWAP_LSB)
221 #define CRC_BYTESWAP_DISABLE (CRC_CTRL0_CH1_BTYE_SWAP_DISABLE)
223 #define CRC_BYTESWAP_ENABLE (CRC_CTRL0_CH1_BTYE_SWAP_ENABLE)
242 #define CRC_INTR_PRIORITY_CH1_FAIL (0x1U)
244 #define CRC_INTR_PRIORITY_CH2_FAIL (0x2U)
246 #define CRC_INTR_PRIORITY_CH1_COMPRESSION_DONE (0x9U)
248 #define CRC_INTR_PRIORITY_CH2_COMPRESSION_DONE (0xaU)
250 #define CRC_INTR_PRIORITY_CH1_OVERRUN (0x11U)
252 #define CRC_INTR_PRIORITY_CH2_OVERRUN (0x12U)
254 #define CRC_INTR_PRIORITY_CH1_UNDERRUN (0x19U)
256 #define CRC_INTR_PRIORITY_CH2_UNDERRUN (0x1aU)
258 #define CRC_INTR_PRIORITY_CH1_TIMEOUT (0x21U)
260 #define CRC_INTR_PRIORITY_CH2_TIMEOUT (0x22U)
274 #define CRC_DATA_BUS_ITCM_MASK (CRC_MCRC_BUS_SEL_ITC_MEN_MASK)
276 #define CRC_DATA_BUS_DTCM_MASK (CRC_MCRC_BUS_SEL_DTC_MEN_MASK)
278 #define CRC_DATA_BUS_VBUSM_MASK (CRC_MCRC_BUS_SEL_MEN_MASK)
280 #define CRC_DATA_BUS_MASK_ALL (CRC_MCRC_BUS_SEL_ITC_MEN_MASK | \
281 CRC_MCRC_BUS_SEL_DTC_MEN_MASK | \
282 CRC_MCRC_BUS_SEL_MEN_MASK)
293 typedef struct CRC_Config_s
314 typedef struct CRC_Signature_s
325 typedef struct CRC_SignatureRegAddr_s
396 uint32_t crcWatchdogPreload,
397 uint32_t crcBlockPreload);
423 uint32_t crcWatchdogPreload,
424 uint32_t crcBlockPreload);
466 uint32_t patternCount,
467 uint32_t sectorCount,
592 uint32_t *pIntrStatus);
684 uint32_t *pBusyFlag);
705 uint32_t *pCurSecNum);
volatile uint32_t BCTOPLD
Definition: crc/v1/crc.h:344
int32_t CRC_dataBusTracingCtrl(uint32_t baseAddr, uint32_t ctrlFlag, CRC_DataBusMask_t dataBusMask, CRC_DataBusMask_t busEnableMask)
This API is used to control the CRC data bus tracing.
int32_t CRC_clearIntr(uint32_t baseAddr, CRC_Channel_t channel, uint32_t intrMask)
This API is used to clear interrupts for given Channel.
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 regH
Definition: crc/v1/crc.h:318
int32_t CRC_verifyBusTracingCtrl(uint32_t baseAddr, uint32_t ctrlFlag, CRC_DataBusMask_t dataBusMask, CRC_DataBusMask_t busEnableMask)
This API is used to verify the control the CRC data bus tracing.
int32_t CRC_setPSASeedSig(uint32_t baseAddr, CRC_Channel_t channel, const CRC_Signature *pCRCPSASeedSign)
This API is used to set the PSA seed value without compression for given Channel.
int32_t CRC_getIntrStatus(uint32_t baseAddr, CRC_Channel_t channel, uint32_t *pIntrStatus)
This API is used to get the pending interrupts for given Channel.
int32_t CRC_powerDownCtrl(uint32_t baseAddr, uint32_t ctrlFlag)
This API is used to control the power down of the CRC module.
int32_t CRC_getRawData(uint32_t baseAddr, CRC_Channel_t channel, CRC_Signature *pRawData)
This API is used to get the uncompressed raw data value for given channel.
volatile uint32_t PCOUNT
Definition: crc/v1/crc.h:338
uint32_t CRC_Channel_t
CRC channel supported.
Definition: crc/v1/crc.h:151
CRC_ByteSwap_t byteSwap
Definition: crc/v1/crc.h:303
uint32_t regH
Definition: crc/v1/crc.h:329
uint32_t CRC_OperationMode_t
CRC operation mode supported. CRC can either operate in Semi-CPU, Full-CPU or Auto mode.
Definition: crc/v1/crc.h:138
uint32_t regL
Definition: crc/v1/crc.h:316
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
volatile uint32_t SCOUNT
Definition: crc/v1/crc.h:340
uint32_t CRC_IntrPriority_t
The offset for the highest pending priority interrupt. These interrupt offset returned in CRC_getHigh...
Definition: crc/v1/crc.h:240
CRC static registers list.
Definition: crc/v1/crc.h:352
Structure for accessing CRC registers address which are 64 bit wide.
Definition: crc/v1/crc.h:326
int32_t CRC_disableIntr(uint32_t baseAddr, CRC_Channel_t channel, uint32_t intrMask)
This API is used to disable interrupts for given Channel.
int32_t CRC_getCurPSASig(uint32_t baseAddr, CRC_Channel_t channel, CRC_Signature *pCurPSASig)
This API is used to get current known good signature value/ CRC value for given channel.
volatile uint32_t CTRL0
Definition: crc/v1/crc.h:355
uint32_t CRC_BitSwap_t
CRC Bit Swap supported.
Definition: crc/v1/crc.h:203
CRC Configuration.
Definition: crc/v1/crc.h:294
int32_t CRC_verifyInitialize(uint32_t baseAddr, CRC_Channel_t channel, uint32_t crcWatchdogPreload, uint32_t crcBlockPreload)
Verify the CRC watchdog and block preload value initialized for given channel.
#define CRC_MAX_NUM_OF_CHANNELS
Max number of channels supported in CRC.
Definition: crc/v1/crc.h:116
int32_t CRC_getCurSecNum(uint32_t baseAddr, CRC_Channel_t channel, uint32_t *pCurSecNum)
This API is used to get the current sector number of which the signature verification fails in AUTO m...
int32_t CRC_enableIntr(uint32_t baseAddr, CRC_Channel_t channel, uint32_t intrMask)
This API is used to enable interrupts for given Channel.
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_getPSASig(uint32_t baseAddr, CRC_Channel_t channel, CRC_Signature *pCRCPSASign)
This API is used to get the PSA register 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.
uint32_t CRC_DataBusMask_t
CRC data bus type mask selected for tracing control.
Definition: crc/v1/crc.h:272
CRC channel static registers list.
Definition: crc/v1/crc.h:337
int32_t CRC_channelReset(uint32_t baseAddr, CRC_Channel_t channel)
This API is used to reset the CRC channel.
uint32_t CRC_Type_t
CRC Type supported.
Definition: crc/v1/crc.h:167
uint32_t CRC_DataLength_t
CRC Data Length supported.
Definition: crc/v1/crc.h:185
int32_t CRC_isBusy(uint32_t baseAddr, CRC_Channel_t channel, uint32_t *pBusyFlag)
This API is used to check if CRC is busy for given Channel.
int32_t CRC_getHighestPriorityIntrStatus(uint32_t baseAddr, uint32_t *pIntVecAddr)
This API is used to get the pending interrupt with highest priority.
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.
int32_t CRC_readStaticRegs(uint32_t baseAddr, CRC_StaticRegs *pStaticRegs)
This API is used to read static registers of CRC module. This API needs to be called after the initia...
volatile uint32_t CTRL1
Definition: crc/v1/crc.h:357
CRC_BitSwap_t bitSwap
Definition: crc/v1/crc.h:301
uint32_t regL
Definition: crc/v1/crc.h:327
CRC_DataLength_t dataLen
Definition: crc/v1/crc.h:299
CRC_Type_t type
Definition: crc/v1/crc.h:297
int32_t CRC_verifyConfigure(uint32_t baseAddr, CRC_Channel_t channel, uint32_t patternCount, uint32_t sectorCount, CRC_OperationMode_t mode)
This API will verify the configure of CRC mode, pattern and sector count for given channel.
volatile uint32_t BUS_SEL
Definition: crc/v1/crc.h:359
volatile uint32_t WDTOPLD
Definition: crc/v1/crc.h:342
uint32_t CRC_ByteSwap_t
CRC Byte Swap supported.
Definition: crc/v1/crc.h:219