AM243x MCU+ SDK  10.00.00

Introduction

This module contains APIs to program and use the CRC module.

Files

file  crc/v0/crc.h
 CRC Driver API/interface file.
 

Data Structures

struct  CRC_Signature
 Structure for accessing CRC register data which are 64 bit wide. More...
 
struct  CRC_SignatureRegAddr
 Structure for accessing CRC registers address which are 64 bit wide. More...
 
struct  CRC_ChannelStaticRegs
 CRC channel static registers list. More...
 
struct  CRC_StaticRegs
 CRC static registers list. More...
 

Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
int32_t CRC_channelReset (uint32_t baseAddr, CRC_Channel_t channel)
 This API is used to reset the CRC channel. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
int32_t CRC_getHighestPriorityIntrStatus (uint32_t baseAddr, uint32_t *pIntVecAddr)
 This API is used to get the pending interrupt with highest priority. More...
 
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. More...
 
int32_t CRC_enableIntr (uint32_t baseAddr, CRC_Channel_t channel, uint32_t intrMask)
 This API is used to enable interrupts for given Channel. More...
 
int32_t CRC_disableIntr (uint32_t baseAddr, CRC_Channel_t channel, uint32_t intrMask)
 This API is used to disable interrupts for given Channel. More...
 
int32_t CRC_clearIntr (uint32_t baseAddr, CRC_Channel_t channel, uint32_t intrMask)
 This API is used to clear interrupts for given Channel. More...
 
int32_t CRC_powerDownCtrl (uint32_t baseAddr, uint32_t ctrlFlag)
 This API is used to control the power down of the CRC module. More...
 
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. More...
 
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 mode for given channel. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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 initial configuration is done and hence mutliple read between static registers do not change the values. More...
 

Macros

#define CRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL
 Macro defines mask for all the interrupts for a channel. More...
 
#define CRC_PATTERN_COUNT_MAX   (0x000FFFFFU)
 Macro defines maximum value of CRC Pattern Count. More...
 
#define CRC_SECTOR_COUNT_MAX   (0x0000FFFFU)
 Macro defines maximum value of CRC Sector Count. More...
 
#define CRC_BCTOPLD_MAX   (0x00FFFFFFU)
 Macro defines maximum value of CRC Block Complete Timeout Counter Preload. More...
 
#define CRC_WDTOPLD_MAX   (0x00FFFFFFU)
 Macro defines maximum value of CRC Watchdog Timeout Counter Preload. More...
 
#define CRC_MAX_NUM_OF_CHANNELS   (4U)
 Max number of channels supported in CRC. More...
 

CRC Operation Mode

typedef uint32_t CRC_OperationMode_t
 CRC operation mode supported. CRC can either operate in Semi-CPU, Full-CPU or Auto mode. More...
 
#define CRC_OPERATION_MODE_DATA   (CRC_CTRL2_CH1_MODE_DATA)
 
#define CRC_OPERATION_MODE_AUTO   (CRC_CTRL2_CH1_MODE_AUTO)
 
#define CRC_OPERATION_MODE_SEMICPU   (CRC_CTRL2_CH1_MODE_SEMICPU)
 
#define CRC_OPERATION_MODE_FULLCPU   (CRC_CTRL2_CH1_MODE_FULLCPU)
 

CRC channel

typedef uint32_t CRC_Channel_t
 CRC channel supported. More...
 
#define CRC_CHANNEL_1   (0x1U)
 
#define CRC_CHANNEL_2   (0x2U)
 
#define CRC_CHANNEL_3   (0x3U)
 
#define CRC_CHANNEL_4   (0x4U)
 

CRC Interrupt Priority

The offset for the highest pending priority interrupt. These interrupt offset returned in CRC_getHighestPriorityIntrStatus function

typedef uint32_t CRC_IntrPriority_t
 The offset for the highest pending priority interrupt. These interrupt offset returned in CRC_getHighestPriorityIntrStatus function. More...
 
#define CRC_INTR_PRIORITY_CH1_FAIL   (0x1U)
 
#define CRC_INTR_PRIORITY_CH2_FAIL   (0x2U)
 
#define CRC_INTR_PRIORITY_CH3_FAIL   (0x3U)
 
#define CRC_INTR_PRIORITY_CH4_FAIL   (0x4U)
 
#define CRC_INTR_PRIORITY_CH1_COMPRESSION_DONE   (0x9U)
 
#define CRC_INTR_PRIORITY_CH2_COMPRESSION_DONE   (0xaU)
 
#define CRC_INTR_PRIORITY_CH3_COMPRESSION_DONE   (0xbU)
 
#define CRC_INTR_PRIORITY_CH4_COMPRESSION_DONE   (0xcU)
 
#define CRC_INTR_PRIORITY_CH1_OVERRUN   (0x11U)
 
#define CRC_INTR_PRIORITY_CH2_OVERRUN   (0x12U)
 
#define CRC_INTR_PRIORITY_CH3_OVERRUN   (0x13U)
 
#define CRC_INTR_PRIORITY_CH4_OVERRUN   (0x14U)
 
#define CRC_INTR_PRIORITY_CH1_UNDERRUN   (0x19U)
 
#define CRC_INTR_PRIORITY_CH2_UNDERRUN   (0x1aU)
 
#define CRC_INTR_PRIORITY_CH3_UNDERRUN   (0x1bU)
 
#define CRC_INTR_PRIORITY_CH4_UNDERRUN   (0x1cU)
 
#define CRC_INTR_PRIORITY_CH1_TIMEOUT   (0x21U)
 
#define CRC_INTR_PRIORITY_CH2_TIMEOUT   (0x22U)
 
#define CRC_INTR_PRIORITY_CH3_TIMEOUT   (0x23U)
 
#define CRC_INTR_PRIORITY_CH4_TIMEOUT   (0x24U)
 

CRC data bus type mask

typedef uint32_t CRC_DataBusMask_t
 CRC data bus type mask selected for tracing control. More...
 
#define CRC_DATA_BUS_ITCM_MASK   (CRC_MCRC_BUS_SEL_ITC_MEN_MASK)
 
#define CRC_DATA_BUS_DTCM_MASK   (CRC_MCRC_BUS_SEL_DTC_MEN_MASK)
 
#define CRC_DATA_BUS_VBUSM_MASK   (CRC_MCRC_BUS_SEL_MEN_MASK)
 
#define CRC_DATA_BUS_MASK_ALL
 

Macro Definition Documentation

◆ CRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL

#define CRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL
Value:
(uint32_t) ((uint32_t)CRC_INTS_CH1_CCITENS_MASK | \
(uint32_t)CRC_INTR_CH1_FAILENR_MASK | \
(uint32_t)CRC_INTR_CH1_OVERENR_MASK | \
(uint32_t)CRC_INTR_CH1_UNDERENR_MASK | \
(uint32_t)CRC_INTR_CH1_TIME_OUT_ENR_MASK)

Macro defines mask for all the interrupts for a channel.

◆ CRC_PATTERN_COUNT_MAX

#define CRC_PATTERN_COUNT_MAX   (0x000FFFFFU)

Macro defines maximum value of CRC Pattern Count.

◆ CRC_SECTOR_COUNT_MAX

#define CRC_SECTOR_COUNT_MAX   (0x0000FFFFU)

Macro defines maximum value of CRC Sector Count.

◆ CRC_BCTOPLD_MAX

#define CRC_BCTOPLD_MAX   (0x00FFFFFFU)

Macro defines maximum value of CRC Block Complete Timeout Counter Preload.

◆ CRC_WDTOPLD_MAX

#define CRC_WDTOPLD_MAX   (0x00FFFFFFU)

Macro defines maximum value of CRC Watchdog Timeout Counter Preload.

◆ CRC_MAX_NUM_OF_CHANNELS

#define CRC_MAX_NUM_OF_CHANNELS   (4U)

Max number of channels supported in CRC.

◆ CRC_OPERATION_MODE_DATA

#define CRC_OPERATION_MODE_DATA   (CRC_CTRL2_CH1_MODE_DATA)

Configure CRC operation mode to Data Captures

◆ CRC_OPERATION_MODE_AUTO

#define CRC_OPERATION_MODE_AUTO   (CRC_CTRL2_CH1_MODE_AUTO)

Configure CRC operation mode to Auto

◆ CRC_OPERATION_MODE_SEMICPU

#define CRC_OPERATION_MODE_SEMICPU   (CRC_CTRL2_CH1_MODE_SEMICPU)

Configure CRC operation mode to Semi-CPU

◆ CRC_OPERATION_MODE_FULLCPU

#define CRC_OPERATION_MODE_FULLCPU   (CRC_CTRL2_CH1_MODE_FULLCPU)

Configure CRC operation mode to Full-CPU

◆ CRC_CHANNEL_1

#define CRC_CHANNEL_1   (0x1U)

Select channel 1 for operation

◆ CRC_CHANNEL_2

#define CRC_CHANNEL_2   (0x2U)

Select channel 2 for operation

◆ CRC_CHANNEL_3

#define CRC_CHANNEL_3   (0x3U)

Select channel 3 for operation

◆ CRC_CHANNEL_4

#define CRC_CHANNEL_4   (0x4U)

Select channel 4 for operation

◆ CRC_INTR_PRIORITY_CH1_FAIL

#define CRC_INTR_PRIORITY_CH1_FAIL   (0x1U)

Offset return for channel 1 fail interrupt

◆ CRC_INTR_PRIORITY_CH2_FAIL

#define CRC_INTR_PRIORITY_CH2_FAIL   (0x2U)

Offset return for channel 1 fail interrupt

◆ CRC_INTR_PRIORITY_CH3_FAIL

#define CRC_INTR_PRIORITY_CH3_FAIL   (0x3U)

Offset return for channel 1 fail interrupt

◆ CRC_INTR_PRIORITY_CH4_FAIL

#define CRC_INTR_PRIORITY_CH4_FAIL   (0x4U)

Offset return for channel 4 fail interrupt

◆ CRC_INTR_PRIORITY_CH1_COMPRESSION_DONE

#define CRC_INTR_PRIORITY_CH1_COMPRESSION_DONE   (0x9U)

Offset return for channel 1 compression done interrupt

◆ CRC_INTR_PRIORITY_CH2_COMPRESSION_DONE

#define CRC_INTR_PRIORITY_CH2_COMPRESSION_DONE   (0xaU)

Offset return for channel 2 compression done interrupt

◆ CRC_INTR_PRIORITY_CH3_COMPRESSION_DONE

#define CRC_INTR_PRIORITY_CH3_COMPRESSION_DONE   (0xbU)

Offset return for channel 3 compression done interrupt

◆ CRC_INTR_PRIORITY_CH4_COMPRESSION_DONE

#define CRC_INTR_PRIORITY_CH4_COMPRESSION_DONE   (0xcU)

Offset return for channel 4 compression done interrupt

◆ CRC_INTR_PRIORITY_CH1_OVERRUN

#define CRC_INTR_PRIORITY_CH1_OVERRUN   (0x11U)

Offset return for channel 1 overrun interrupt

◆ CRC_INTR_PRIORITY_CH2_OVERRUN

#define CRC_INTR_PRIORITY_CH2_OVERRUN   (0x12U)

Offset return for channel 2 overrun interrupt

◆ CRC_INTR_PRIORITY_CH3_OVERRUN

#define CRC_INTR_PRIORITY_CH3_OVERRUN   (0x13U)

Offset return for channel 3 overrun interrupt

◆ CRC_INTR_PRIORITY_CH4_OVERRUN

#define CRC_INTR_PRIORITY_CH4_OVERRUN   (0x14U)

Offset return for channel 4 overrun interrupt

◆ CRC_INTR_PRIORITY_CH1_UNDERRUN

#define CRC_INTR_PRIORITY_CH1_UNDERRUN   (0x19U)

Offset return for channel 1 underrun interrupt

◆ CRC_INTR_PRIORITY_CH2_UNDERRUN

#define CRC_INTR_PRIORITY_CH2_UNDERRUN   (0x1aU)

Offset return for channel 2 underrun interrupt

◆ CRC_INTR_PRIORITY_CH3_UNDERRUN

#define CRC_INTR_PRIORITY_CH3_UNDERRUN   (0x1bU)

Offset return for channel 3 underrun interrupt

◆ CRC_INTR_PRIORITY_CH4_UNDERRUN

#define CRC_INTR_PRIORITY_CH4_UNDERRUN   (0x1cU)

Offset return for channel 4 underrun interrupt

◆ CRC_INTR_PRIORITY_CH1_TIMEOUT

#define CRC_INTR_PRIORITY_CH1_TIMEOUT   (0x21U)

Offset return for channel 1 timeout interrupt

◆ CRC_INTR_PRIORITY_CH2_TIMEOUT

#define CRC_INTR_PRIORITY_CH2_TIMEOUT   (0x22U)

Offset return for channel 2 timeout interrupt

◆ CRC_INTR_PRIORITY_CH3_TIMEOUT

#define CRC_INTR_PRIORITY_CH3_TIMEOUT   (0x23U)

Offset return for channel 3 timeout interrupt

◆ CRC_INTR_PRIORITY_CH4_TIMEOUT

#define CRC_INTR_PRIORITY_CH4_TIMEOUT   (0x24U)

Offset return for channel 4 timeout interrupt

◆ CRC_DATA_BUS_ITCM_MASK

#define CRC_DATA_BUS_ITCM_MASK   (CRC_MCRC_BUS_SEL_ITC_MEN_MASK)

Select tracing control of instruction TCM

◆ CRC_DATA_BUS_DTCM_MASK

#define CRC_DATA_BUS_DTCM_MASK   (CRC_MCRC_BUS_SEL_DTC_MEN_MASK)

Select tracing control of data TCM

◆ CRC_DATA_BUS_VBUSM_MASK

#define CRC_DATA_BUS_VBUSM_MASK   (CRC_MCRC_BUS_SEL_MEN_MASK)

Select tracing control of VBUSM

◆ CRC_DATA_BUS_MASK_ALL

#define CRC_DATA_BUS_MASK_ALL
Value:
(CRC_MCRC_BUS_SEL_ITC_MEN_MASK | \
CRC_MCRC_BUS_SEL_DTC_MEN_MASK | \
CRC_MCRC_BUS_SEL_MEN_MASK)

Select tracing control of all data buses

Typedef Documentation

◆ CRC_OperationMode_t

typedef uint32_t CRC_OperationMode_t

CRC operation mode supported. CRC can either operate in Semi-CPU, Full-CPU or Auto mode.

◆ CRC_Channel_t

typedef uint32_t CRC_Channel_t

CRC channel supported.

◆ CRC_IntrPriority_t

typedef uint32_t CRC_IntrPriority_t

The offset for the highest pending priority interrupt. These interrupt offset returned in CRC_getHighestPriorityIntrStatus function.

◆ CRC_DataBusMask_t

typedef uint32_t CRC_DataBusMask_t

CRC data bus type mask selected for tracing control.

Function Documentation

◆ CRC_initialize()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number to be initializaed. Values given by CRC_Channel_t.
crcWatchdogPreloadIt is used to check if DMA does supply a block of data responding to a request in a given time frame.
crcBlockPreloadIt is used to check if CRC for an entire block is completed in a given time frame.
Returns
status CRC channel initialization status. CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_verifyInitialize()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number to be verified initialization. Values given by CRC_Channel_t.
crcWatchdogPreloadIt is used to check if DMA does supply a block of data responding to a request in a given time frame.
crcBlockPreloadIt is used to check if CRC for an entire block is completed in a given time frame.
Returns
status CRC channel verfiy initialization status. CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments CSL_EFAIL: failure, indicate verify initialization failed

◆ CRC_configure()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number to be configured. Values given by CRC_Channel_t.
crcPatternCountNumber of data patterns in one sector to be compressed.
crcSectorCountNumber of sectors in a block of memory.
crcModeCRC operational mode. Refer CRC_OperationMode_t.
Returns
status CRC channel configuration status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRCVerifyConfigure()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number to be verified configuration. Values given by CRC_Channel_t.
crcPatternCountNumber of data patterns in one sector to be compressed.
crcSectorCountNumber of sectors in a block of memory.
crcModeCRC operational mode. Refer CRC_OperationMode_t.
Returns
status CRC channel configuration status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments CSL_EFAIL: failure, indicate verify configure failed

◆ CRC_channelReset()

int32_t CRC_channelReset ( uint32_t  baseAddr,
CRC_Channel_t  channel 
)

This API is used to reset the CRC channel.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which reset is to be done. Values given by CRC_Channel_t.
Returns
status CRC channel reset status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getPSASigRegAddr()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which PSA register address is to get. Values given by CRC_Channel_t.
pCRCRegAddrPointer to CRC PSA register address structure. Refer structure CRC_SignatureRegAddr.
Returns
status CRC channel get PSA signature register address status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getPSASig()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which PSA register data is to get. Values given by CRC_Channel_t.
pCRCPSASignPointer to CRC PSA signature values. Refer struct CRC_Signature.
Returns
status CRC channel get PSA signature register value status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_setPSASeedSig()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which PSA seed value to be set. Values given by CRC_Channel_t.
pCRCPSASeedSignPointer to CRC PSA seed signature values. Refer struct CRC_Signature for details.
Returns
status CRC channel set PSA seed value status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getPSASectorSig()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number which was configured for CRC calculation. Values given by CRC_Channel_t.
pCRCSectorSignPointer to CRC PSA sector signature values Refer struct CRC_Signature.
Returns
status CRC channel get PSA sector signaure value status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getHighestPriorityIntrStatus()

int32_t CRC_getHighestPriorityIntrStatus ( uint32_t  baseAddr,
uint32_t *  pIntVecAddr 
)

This API is used to get the pending interrupt with highest priority.

Parameters
baseAddrBase address of the CRC registers.
pIntVecAddrPointer to highest priority pending interrupt vector address defined in CRC_IntrPriority_t
Returns
status CRC get interrupt vector address status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getIntrStatus()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which pending interrupt is to get. Values given by CRC_Channel_t.
pIntrStatusPointer to pending interrupt status/occurred.
Returns
status CRC get pending interrupts status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_enableIntr()

int32_t CRC_enableIntr ( uint32_t  baseAddr,
CRC_Channel_t  channel,
uint32_t  intrMask 
)

This API is used to enable interrupts for given Channel.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which interrupt is to enable. Values given by CRC_Channel_t.
intrMaskInterrupts to enable.
Returns
status CRC enable interrupts status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_disableIntr()

int32_t CRC_disableIntr ( uint32_t  baseAddr,
CRC_Channel_t  channel,
uint32_t  intrMask 
)

This API is used to disable interrupts for given Channel.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which interrupt is to disable. Values given by CRC_Channel_t.
intrMaskInterrupts to disable.
Returns
status CRC disable interrupts status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_clearIntr()

int32_t CRC_clearIntr ( uint32_t  baseAddr,
CRC_Channel_t  channel,
uint32_t  intrMask 
)

This API is used to clear interrupts for given Channel.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which interrupt is to clear. Values given by CRC_Channel_t.
intrMaskInterrupts to clear status.
Returns
status CRC clear interrupts status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_powerDownCtrl()

int32_t CRC_powerDownCtrl ( uint32_t  baseAddr,
uint32_t  ctrlFlag 
)

This API is used to control the power down of the CRC module.

Parameters
baseAddrBase address of the CRC registers.
ctrlFlagPointer to power control flag. CSL_TRUE: power down the CRC. CSL_FALSE: power on the CRC.
Returns
status CRC power control status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_isBusy()

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.

  During Auto or Semi-CPU mode, the busy flag is set when the first data
  pattern of the block is compressed and remains set until the the last
  data pattern of the block is compressed. The flag is cleared when the
  last data pattern of the block is compressed.
Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which busy status is to get. Values given by CRC_Channel_t.
pBusyFlagPointer to busy flag. CSL_TRUE: CRC channel is busy. CSL_FALSE: CRC channel is free.
Returns
status CRC channel check busy status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getCurSecNum()

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 mode for given channel.

When a sector fails, the erroneous sector number is logged and the CRC fail interrupt is generated.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which the curent sector number is to get. Values given by CRC_Channel_t.
pCurSecNumPointer to current sector number.
Returns
status CRC channel get current sector number status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getCurPSASig()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which current CRC value is to get. Values given by CRC_Channel_t.
pCurPSASigPointer to current CRC PSA signature values Refer struct CRC_Signature.
Returns
status CRC channel get current PSA signaure value status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_getRawData()

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.

Parameters
baseAddrBase address of the CRC registers.
channelChannel number for which raw data value is to get. Values given by CRC_Channel_t.
pRawDataPointer to raw data value Refer struct CRC_Signature.
Returns
status CRC channel get raw data value status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_dataBusTracingCtrl()

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.

  Data tracing is only available on channel 1, when it is enabled, the
  operation mode is automatically reset to data capture mode on channel 1
Parameters
baseAddrBase address of the CRC registers.
ctrlFlagData bus tracing control flag. CSL_TRUE: enable data tracing. CSL_FALSE: disable data tracing.
dataBusMaskData bus mask bits for which what data buses are to be selected. Values given by CRC_DataBusMask_t.
busEnableMaskData bus enable mask bits for which what data buses are to be enabled or disabled. Values given by CRC_DataBusMask_t.
Returns
status CRC data bus tracing control status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments

◆ CRC_verifyBusTracingCtrl()

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.

Parameters
baseAddrBase address of the CRC registers.
ctrlFlagData bus tracing control flag. CSL_TRUE: enable data tracing. CSL_FALSE: disable data tracing.
dataBusMaskData bus mask bits for which what data buses are to be selected. Values given by CRC_DataBusMask_t.
busEnableMaskData bus enable mask bits for which what data buses are to be enabled or disabled. Values given by CRC_DataBusMask_t.
Returns
status CRC verify data bus tracing control status CSL_PASS: success CSL_EBADARGS: failure, indicate the bad input arguments CSL_EFAIL: failure, indicate verify failed

◆ CRC_readStaticRegs()

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 initial configuration is done and hence mutliple read between static registers do not change the values.

Parameters
baseAddrBase Address of the CRC Registers.
pStaticRegspointer to static registers to be read
Returns
CSL_PASS - success CSL_EBADARGS - API fails due to bad input arguments