|
AM243x MCU+ SDK
10.00.00
|
|
Go to the documentation of this file.
72 #include <drivers/hw_include/cslr.h>
73 #include <drivers/hw_include/cslr_crc.h>
74 #include <drivers/hw_include/hw_types.h>
87 #define CRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL \
88 (uint32_t) ((uint32_t)CRC_INTS_CH1_CCITENS_MASK | \
89 (uint32_t)CRC_INTR_CH1_FAILENR_MASK | \
90 (uint32_t)CRC_INTR_CH1_OVERENR_MASK | \
91 (uint32_t)CRC_INTR_CH1_UNDERENR_MASK | \
92 (uint32_t)CRC_INTR_CH1_TIME_OUT_ENR_MASK)
97 #define CRC_PATTERN_COUNT_MAX (0x000FFFFFU)
102 #define CRC_SECTOR_COUNT_MAX (0x0000FFFFU)
108 #define CRC_BCTOPLD_MAX (0x00FFFFFFU)
113 #define CRC_WDTOPLD_MAX (0x00FFFFFFU)
118 #define CRC_MAX_NUM_OF_CHANNELS (4U)
131 #define CRC_OPERATION_MODE_DATA (CRC_CTRL2_CH1_MODE_DATA)
133 #define CRC_OPERATION_MODE_AUTO (CRC_CTRL2_CH1_MODE_AUTO)
135 #define CRC_OPERATION_MODE_SEMICPU (CRC_CTRL2_CH1_MODE_SEMICPU)
137 #define CRC_OPERATION_MODE_FULLCPU (CRC_CTRL2_CH1_MODE_FULLCPU)
151 #define CRC_CHANNEL_1 (0x1U)
153 #define CRC_CHANNEL_2 (0x2U)
155 #define CRC_CHANNEL_3 (0x3U)
157 #define CRC_CHANNEL_4 (0x4U)
176 #define CRC_INTR_PRIORITY_CH1_FAIL (0x1U)
178 #define CRC_INTR_PRIORITY_CH2_FAIL (0x2U)
180 #define CRC_INTR_PRIORITY_CH3_FAIL (0x3U)
182 #define CRC_INTR_PRIORITY_CH4_FAIL (0x4U)
184 #define CRC_INTR_PRIORITY_CH1_COMPRESSION_DONE (0x9U)
186 #define CRC_INTR_PRIORITY_CH2_COMPRESSION_DONE (0xaU)
188 #define CRC_INTR_PRIORITY_CH3_COMPRESSION_DONE (0xbU)
190 #define CRC_INTR_PRIORITY_CH4_COMPRESSION_DONE (0xcU)
192 #define CRC_INTR_PRIORITY_CH1_OVERRUN (0x11U)
194 #define CRC_INTR_PRIORITY_CH2_OVERRUN (0x12U)
196 #define CRC_INTR_PRIORITY_CH3_OVERRUN (0x13U)
198 #define CRC_INTR_PRIORITY_CH4_OVERRUN (0x14U)
200 #define CRC_INTR_PRIORITY_CH1_UNDERRUN (0x19U)
202 #define CRC_INTR_PRIORITY_CH2_UNDERRUN (0x1aU)
204 #define CRC_INTR_PRIORITY_CH3_UNDERRUN (0x1bU)
206 #define CRC_INTR_PRIORITY_CH4_UNDERRUN (0x1cU)
208 #define CRC_INTR_PRIORITY_CH1_TIMEOUT (0x21U)
210 #define CRC_INTR_PRIORITY_CH2_TIMEOUT (0x22U)
212 #define CRC_INTR_PRIORITY_CH3_TIMEOUT (0x23U)
214 #define CRC_INTR_PRIORITY_CH4_TIMEOUT (0x24U)
228 #define CRC_DATA_BUS_ITCM_MASK (CRC_MCRC_BUS_SEL_ITC_MEN_MASK)
230 #define CRC_DATA_BUS_DTCM_MASK (CRC_MCRC_BUS_SEL_DTC_MEN_MASK)
232 #define CRC_DATA_BUS_VBUSM_MASK (CRC_MCRC_BUS_SEL_MEN_MASK)
234 #define CRC_DATA_BUS_MASK_ALL (CRC_MCRC_BUS_SEL_ITC_MEN_MASK | \
235 CRC_MCRC_BUS_SEL_DTC_MEN_MASK | \
236 CRC_MCRC_BUS_SEL_MEN_MASK)
247 typedef struct CRC_Signature_s
258 typedef struct CRC_SignatureRegAddr_s
327 uint32_t crcWatchdogPreload,
328 uint32_t crcBlockPreload);
354 uint32_t crcWatchdogPreload,
355 uint32_t crcBlockPreload);
377 uint32_t crcPatternCount,
378 uint32_t crcSectorCount,
402 uint32_t crcPatternCount,
403 uint32_t crcSectorCount,
528 uint32_t *pIntrStatus);
620 uint32_t *pBusyFlag);
641 uint32_t *pCurSecNum);
volatile uint32_t BCTOPLD
Definition: crc/v0/crc.h:276
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/v0/crc.h:251
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/v0/crc.h:270
uint32_t CRC_Channel_t
CRC channel supported.
Definition: crc/v0/crc.h:149
uint32_t regH
Definition: crc/v0/crc.h:262
uint32_t CRC_OperationMode_t
CRC operation mode supported. CRC can either operate in Semi-CPU, Full-CPU or Auto mode.
Definition: crc/v0/crc.h:129
int32_t CRC_configure(uint32_t baseAddr, CRC_Channel_t channel, uint32_t crcPatternCount, uint32_t crcSectorCount, CRC_OperationMode_t crcMode)
This API will configure CRC mode, pattern and sector count for given channel.
uint32_t regL
Definition: crc/v0/crc.h:249
Structure for accessing CRC register data which are 64 bit wide.
Definition: crc/v0/crc.h:248
volatile uint32_t SCOUNT
Definition: crc/v0/crc.h:272
uint32_t CRC_IntrPriority_t
The offset for the highest pending priority interrupt. These interrupt offset returned in CRC_getHigh...
Definition: crc/v0/crc.h:174
CRC static registers list.
Definition: crc/v0/crc.h:283
Structure for accessing CRC registers address which are 64 bit wide.
Definition: crc/v0/crc.h:259
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/v0/crc.h:286
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/v0/crc.h:118
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.
uint32_t CRC_DataBusMask_t
CRC data bus type mask selected for tracing control.
Definition: crc/v0/crc.h:226
int32_t CRCVerifyConfigure(uint32_t baseAddr, CRC_Channel_t channel, uint32_t crcPatternCount, uint32_t crcSectorCount, CRC_OperationMode_t crcMode)
This API will verify the configure of CRC mode, pattern and sector count for given channel.
CRC channel static registers list.
Definition: crc/v0/crc.h:269
int32_t CRC_channelReset(uint32_t baseAddr, CRC_Channel_t channel)
This API is used to reset the CRC channel.
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.
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/v0/crc.h:288
uint32_t regL
Definition: crc/v0/crc.h:260
volatile uint32_t BUS_SEL
Definition: crc/v0/crc.h:290
volatile uint32_t WDTOPLD
Definition: crc/v0/crc.h:274