AM263Px MCU+ SDK: MCRC API

| AM263Px MCU+ SDK 26.00.00 |

Files | Data Structures | Functions | Enumerations | Macros
MCRC API
APIs for SDL Module » APIs for SDL MCRC

## Introduction

# Overview

MCRC programming sequence:

1. SDL_MCRC_channelReset()
2. SDL_MCRC_init()
3. SDL_MCRC_config()
4. SDL_MCRC_addconfig() (not applicable for AM64x and AM243x)

1. SDL_MCRC_enableIntr() - if needed
2. Transfer data to PSA signature for generation of signature value
   - DMA is utilized in Semi-CPU mode
   - CPU need to pump data into PSA register in Full CPU mode.
3. SDL_MCRC_getPSASectorSig()
   - After complete transfer read MCRC signature.

MCRC signature generated depends on amount of data copied into PSA register at a time/in single write. Though data pattern can be 8, 16, 32, or 64 bit, data copied into PSA register is always 64 bit wide. If data pattern is less than 64 bit, then it is padded with zeros to make it 64 bit write.

## Files
file | mcrc/v0/sdl_mcrc.h
| This file contains the prototypes of the APIs present in the device abstraction layer file of MCRC. This also contains some related macros.

## Data Structures
struct | SDL_MCRC_Config_t
| CRC Configuration. More...
struct | SDL_MCRC_Signature_t
| Structure for accessing MCRC register data which are 64 bit wide. More...
struct | SDL_MCRC_SignatureRegAddr_t
| Structure for accessing MCRC registers address which are 64 bit wide. More...
struct | SDL_MCRC_ChannelStaticRegs
| MCRC channel static registers list. More...
struct | SDL_MCRC_StaticRegs_t
| MCRC static registers list. More...
struct | SDL_MCRC_DataConfig_t
| Structure for MCRC CPU inputs data. More...

## Functions
int32_t | SDL_MCRC_init (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t watchdogPreload, uint32_t blockPreload)
| Initialize MCRC channel and will configure watchdog and block preload value for given channel. More...
int32_t | SDL_MCRC_verifyInit (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t watchdogPreload, uint32_t blockPreload)
| Verify the MCRC watchdog and block preload value initialized for given channel. More...
int32_t | SDL_MCRC_config (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t patternCount, uint32_t sectorCount, SDL_MCRC_ModeType mode)
| This API will configure MCRC mode, pattern and sector count for given channel. More...
int32_t | SDL_MCRC_verifyConfig (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t patternCount, uint32_t sectorCount, SDL_MCRC_ModeType mode)
| This API will verify the configure of MCRC mode, pattern and sector count for given channel. More...
int32_t | SDL_MCRC_channelReset (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel)
| This API is used to reset the MCRC channel. More...
int32_t | SDL_MCRC_setPSASeedSig (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, const SDL_MCRC_Signature_t *pSeedSign)
| This API is used to set the PSA seed value without compression for given Channel. More...
int32_t | SDL_MCRC_getPSASectorSig (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, SDL_MCRC_Signature_t *pSecSign)
| This API is used to get sector signature Value/ MCRC value for given channel. More...
int32_t | SDL_MCRC_getIntrStatus (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t *pIntrStatus)
| This API is used to get the pending interrupts for given Channel. More...
int32_t | SDL_MCRC_enableIntr (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t intrMask)
| This API is used to enable interrupts for given Channel. More...
int32_t | SDL_MCRC_disableIntr (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t intrMask)
| This API is used to disable interrupts for given Channel. More...
int32_t | SDL_MCRC_clearIntr (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t intrMask)
| This API is used to clear interrupts for given Channel. More...
int32_t | SDL_MCRC_isBusy (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, uint32_t *pBusyFlag)
| This API is used to check if MCRC is busy for given Channel. More...
int32_t | SDL_MCRC_getCurSecNum (SDL_MCRC_InstType instance, SDL_MCRC_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 | SDL_MCRC_getPSASig (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, SDL_MCRC_Signature_t *pPSAsig)
| This API is used to get current known good signature value/ MCRC value for given channel. More...
int32_t | SDL_MCRC_readStaticReg (SDL_MCRC_InstType instance, SDL_MCRC_StaticRegs_t *pStaticRegs)
| This API is used to read static registers of MCRC 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...
int32_t | SDL_MCRC_getCurPSASig (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, SDL_MCRC_Signature_t *pCurPSASig)
| This API is used to get current known good signature value/ MCRC value for given channel. More...
int32_t | SDL_MCRC_getPSASigRegAddr (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, SDL_MCRC_SignatureRegAddr_t *pMCRCregAddr)
| This API is used to get the PSA register address for given Channel. More...
int32_t | SDL_MCRC_computeSignCPUmode (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, const SDL_MCRC_DataConfig_t *pDataConfig, SDL_MCRC_Signature_t *sectSignVal)
| This API is used to compute the signature for CPU-only mode and it check if the generated MCRC signature value matches with the reference signature value. More...
int32_t | SDL_MCRC_getCRCRegAddr (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel, SDL_MCRC_SignatureRegAddr_t *pMCRCregAddr)
| This API is used to get the MCRC register address for given Channel. More...
int32_t | SDL_MCRC_configCRCType (SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel)
| This API is used to configure the MCRC type for given Channel. Legacy API for devices other than AM273X and AWR294X. More...
int32_t | SDL_MCRC_getBaseaddr (SDL_MCRC_InstType instance, uint32_t *baseAddr)
| This API is used to get the base address of the instance. More...

## Enumerations
enum | SDL_MCRC_DataBitSize { SDL_MCRC_DATA_8_BIT = 1, SDL_MCRC_DATA_16_BIT = 2, SDL_MCRC_DATA_32_BIT = 3 }
| This enumerator defines the Data size for input MCRC DATA. More...
enum | SDL_MCRC_InstType { MCRC0 = 1, SDL_MCRC_INVALID = 0xffff }
| MCRC Instance supported. More...

## Macros
#define | SDL_MCRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL
| Macro defines mask for all the interrupts for a channel. More...
#define | SDL_MCRC_PATTERN_COUNT_MAX (0x000FFFFFU)
| Macro defines maximum value of MCRC Pattern Count. More...
#define | SDL_MCRC_SECTOR_COUNT_MAX (0x0000FFFFU)
| Macro defines maximum value of MCRC Sector Count. More...
#define | SDL_MCRC_BCTOPLD_MAX (0x00FFFFFFU)
| Macro defines maximum value of MCRC Block Complete Timeout Counter Preload. More...
#define | SDL_MCRC_WDTOPLD_MAX (0x00FFFFFFU)
| Macro defines maximum value of MCRC Watchdog Timeout Counter Preload. More...
#define | SDL_MCRC_DATAWIDTH_SEL_64BIT (0x00000000U)
| Macro defines value of MCRC Control Register. More...
#define | SDL_MCRC_DATAWIDTH_SEL_16BIT (0x00000001U)
#define | SDL_MCRC_DATAWIDTH_SEL_32BIT (0x00000002U)
#define | SDL_MCRC_MAX_NUM_OF_CHANNELS (4U)
| Max number of channels supported in MCRC. More...

## MCRC Operation Mode
typedef uint32_t | SDL_MCRC_ModeType
| MCRC operation mode supported. MCRC can either operate in Semi-CPU, Full-CPU or Auto mode. More...
#define | SDL_MCRC_OPERATION_MODE_DATA (SDL_MCRC_CTRL2_CH1_MODE_DATA)
#define | SDL_MCRC_OPERATION_MODE_AUTO (SDL_MCRC_CTRL2_CH1_MODE_AUTO)
#define | SDL_MCRC_OPERATION_MODE_SEMICPU (SDL_MCRC_CTRL2_CH1_MODE_SEMICPU)
#define | SDL_MCRC_OPERATION_MODE_FULLCPU (SDL_MCRC_CTRL2_CH1_MODE_FULLCPU)

## MCRC channel
typedef uint32_t | SDL_MCRC_Channel_t
| MCRC channel supported. More...
#define | SDL_MCRC_CHANNEL_1 (0x1U)
#define | SDL_MCRC_CHANNEL_2 (0x2U)
#define | SDL_MCRC_CHANNEL_3 (0x3U)
#define | SDL_MCRC_CHANNEL_4 (0x4U)

## CRC Type
typedef uint32_t | SDL_MCRC_Type_t
| CRC Type supported. More...
#define | SDL_MCRC_TYPE_16BIT (SDL_MCRC_CTRL0_CH1_CRC_SEL_16BIT)
#define | SDL_MCRC_TYPE_32BIT (SDL_MCRC_CTRL0_CH1_CRC_SEL_32BIT)
#define | SDL_MCRC_TYPE_64BIT (SDL_MCRC_CTRL0_CH1_CRC_SEL_64BIT)
#define | SDL_MCRC_TYPE_E2EPROFILE (SDL_MCRC_CTRL0_CH1_CRC_SEL_E2EPROFILE4)
#define | SDL_MCRC_TYPE_VDA_CAN_SAEJ1850 (SDL_MCRC_CTRL0_CH1_CRC_SEL_VDA_CAN_SAEJ1850)
#define | SDL_MCRC_TYPE_H2F_AUTOSAR4 (SDL_MCRC_CTRL0_CH1_CRC_SEL_H2F_AUTOSAR4)
#define | SDL_MCRC_TYPE_CASTAGNOLI_ISCSI (SDL_MCRC_CTRL0_CH1_CRC_SEL_CASTAGNOLI_ISCSI)

## CRC Data Length
typedef uint32_t | SDL_MCRC_DataLength_t
| CRC Data Length supported. More...
#define | SDL_MCRC_DATALENGTH_16BIT (SDL_MCRC_CTRL0_CH1_DW_SEL_16BIT)
#define | SDL_MCRC_DATALENGTH_32BIT (SDL_MCRC_CTRL0_CH1_DW_SEL_32BIT)
#define | SDL_MCRC_DATALENGTH_64BIT (SDL_MCRC_CTRL0_CH1_DW_SEL_64BIT)

## CRC Bit Swap
typedef uint32_t | SDL_MCRC_BitSwap_t
| CRC Bit Swap supported. More...
#define | SDL_MCRC_BITSWAP_MSB (SDL_MCRC_CTRL0_CH1_BIT_SWAP_MSB)
#define | SDL_MCRC_BITSWAP_LSB (SDL_MCRC_CTRL0_CH1_BIT_SWAP_LSB)

## CRC Byte Swap
typedef uint32_t | SDL_MCRC_ByteSwap_t
| CRC Byte Swap supported. More...
#define | SDL_MCRC_BYTESWAP_DISABLE (SDL_MCRC_CTRL0_CH1_BTYE_SWAP_DISABLE)
#define | SDL_MCRC_BYTESWAP_ENABLE (SDL_MCRC_CTRL0_CH1_BTYE_SWAP_ENABLE)

## Macro Definition Documentation

## ◆ SDL_MCRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL

#define SDL_MCRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL

Value:
(uint32_t) ((uint32_t)SDL_MCRC_INTS_CH1_CCITENS_MASK | \
(uint32_t)SDL_MCRC_INTR_CH1_FAILENR_MASK | \
(uint32_t)SDL_MCRC_INTR_CH1_OVERENR_MASK | \
(uint32_t)SDL_MCRC_INTR_CH1_UNDERENR_MASK | \
(uint32_t)SDL_MCRC_INTR_CH1_TIME_OUT_ENR_MASK)

Macro defines mask for all the interrupts for a channel.

## ◆ SDL_MCRC_PATTERN_COUNT_MAX

#define SDL_MCRC_PATTERN_COUNT_MAX (0x000FFFFFU)

Macro defines maximum value of MCRC Pattern Count.

## ◆ SDL_MCRC_SECTOR_COUNT_MAX

#define SDL_MCRC_SECTOR_COUNT_MAX (0x0000FFFFU)

Macro defines maximum value of MCRC Sector Count.

## ◆ SDL_MCRC_BCTOPLD_MAX

#define SDL_MCRC_BCTOPLD_MAX (0x00FFFFFFU)

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

## ◆ SDL_MCRC_WDTOPLD_MAX

#define SDL_MCRC_WDTOPLD_MAX (0x00FFFFFFU)

Macro defines maximum value of MCRC Watchdog Timeout Counter Preload.

## ◆ SDL_MCRC_DATAWIDTH_SEL_64BIT

#define SDL_MCRC_DATAWIDTH_SEL_64BIT (0x00000000U)

Macro defines value of MCRC Control Register.

## ◆ SDL_MCRC_DATAWIDTH_SEL_16BIT

#define SDL_MCRC_DATAWIDTH_SEL_16BIT (0x00000001U)

## ◆ SDL_MCRC_DATAWIDTH_SEL_32BIT

#define SDL_MCRC_DATAWIDTH_SEL_32BIT (0x00000002U)

## ◆ SDL_MCRC_MAX_NUM_OF_CHANNELS

#define SDL_MCRC_MAX_NUM_OF_CHANNELS (4U)

Max number of channels supported in MCRC.

## ◆ SDL_MCRC_OPERATION_MODE_DATA

#define SDL_MCRC_OPERATION_MODE_DATA (SDL_MCRC_CTRL2_CH1_MODE_DATA)

Configure MCRC operation mode to Data Captures

## ◆ SDL_MCRC_OPERATION_MODE_AUTO

#define SDL_MCRC_OPERATION_MODE_AUTO (SDL_MCRC_CTRL2_CH1_MODE_AUTO)

Configure MCRC operation mode to Auto

## ◆ SDL_MCRC_OPERATION_MODE_SEMICPU

#define SDL_MCRC_OPERATION_MODE_SEMICPU (SDL_MCRC_CTRL2_CH1_MODE_SEMICPU)

Configure MCRC operation mode to Semi-CPU

## ◆ SDL_MCRC_OPERATION_MODE_FULLCPU

#define SDL_MCRC_OPERATION_MODE_FULLCPU (SDL_MCRC_CTRL2_CH1_MODE_FULLCPU)

Configure MCRC operation mode to Full-CPU

## ◆ SDL_MCRC_CHANNEL_1

#define SDL_MCRC_CHANNEL_1 (0x1U)

Select channel 1 for operation

## ◆ SDL_MCRC_CHANNEL_2

#define SDL_MCRC_CHANNEL_2 (0x2U)

Select channel 2 for operation

## ◆ SDL_MCRC_CHANNEL_3

#define SDL_MCRC_CHANNEL_3 (0x3U)

Select channel 3 for operation

## ◆ SDL_MCRC_CHANNEL_4

#define SDL_MCRC_CHANNEL_4 (0x4U)

Select channel 4 for operation

## ◆ SDL_MCRC_TYPE_16BIT

#define SDL_MCRC_TYPE_16BIT (SDL_MCRC_CTRL0_CH1_CRC_SEL_16BIT)

CRC 16-bit operation

## ◆ SDL_MCRC_TYPE_32BIT

#define SDL_MCRC_TYPE_32BIT (SDL_MCRC_CTRL0_CH1_CRC_SEL_32BIT)

CRC 32-bit operation

## ◆ SDL_MCRC_TYPE_64BIT

#define SDL_MCRC_TYPE_64BIT (SDL_MCRC_CTRL0_CH1_CRC_SEL_64BIT)

CRC 64-bit operation

## ◆ SDL_MCRC_TYPE_E2EPROFILE

#define SDL_MCRC_TYPE_E2EPROFILE (SDL_MCRC_CTRL0_CH1_CRC_SEL_E2EPROFILE4)

CRC E2E PROFILE operation

## ◆ SDL_MCRC_TYPE_VDA_CAN_SAEJ1850

#define SDL_MCRC_TYPE_VDA_CAN_SAEJ1850 (SDL_MCRC_CTRL0_CH1_CRC_SEL_VDA_CAN_SAEJ1850)

CRC VDA,CAN,SAEJ1850 operation

## ◆ SDL_MCRC_TYPE_H2F_AUTOSAR4

#define SDL_MCRC_TYPE_H2F_AUTOSAR4 (SDL_MCRC_CTRL0_CH1_CRC_SEL_H2F_AUTOSAR4)

CRC H2,AUTOSAR4 operation

## ◆ SDL_MCRC_TYPE_CASTAGNOLI_ISCSI

#define SDL_MCRC_TYPE_CASTAGNOLI_ISCSI (SDL_MCRC_CTRL0_CH1_CRC_SEL_CASTAGNOLI_ISCSI)

CRC CASTAGNOLI,ISCSI operation

## ◆ SDL_MCRC_DATALENGTH_16BIT

#define SDL_MCRC_DATALENGTH_16BIT (SDL_MCRC_CTRL0_CH1_DW_SEL_16BIT)

CRC 16-bit data operation

## ◆ SDL_MCRC_DATALENGTH_32BIT

#define SDL_MCRC_DATALENGTH_32BIT (SDL_MCRC_CTRL0_CH1_DW_SEL_32BIT)

CRC 32-bit data operation

## ◆ SDL_MCRC_DATALENGTH_64BIT

#define SDL_MCRC_DATALENGTH_64BIT (SDL_MCRC_CTRL0_CH1_DW_SEL_64BIT)

CRC 64-bit data operation

## ◆ SDL_MCRC_BITSWAP_MSB

#define SDL_MCRC_BITSWAP_MSB (SDL_MCRC_CTRL0_CH1_BIT_SWAP_MSB)

MSB first

## ◆ SDL_MCRC_BITSWAP_LSB

#define SDL_MCRC_BITSWAP_LSB (SDL_MCRC_CTRL0_CH1_BIT_SWAP_LSB)

LSB first

## ◆ SDL_MCRC_BYTESWAP_DISABLE

#define SDL_MCRC_BYTESWAP_DISABLE (SDL_MCRC_CTRL0_CH1_BTYE_SWAP_DISABLE)

Byte wwap disabled across data size

## ◆ SDL_MCRC_BYTESWAP_ENABLE

#define SDL_MCRC_BYTESWAP_ENABLE (SDL_MCRC_CTRL0_CH1_BTYE_SWAP_ENABLE)

Byte swap enabled across data size

## Typedef Documentation

## ◆ SDL_MCRC_ModeType

typedef uint32_t SDL_MCRC_ModeType

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

## ◆ SDL_MCRC_Channel_t

typedef uint32_t SDL_MCRC_Channel_t

MCRC channel supported.

## ◆ SDL_MCRC_Type_t

typedef uint32_t SDL_MCRC_Type_t

CRC Type supported.

## ◆ SDL_MCRC_DataLength_t

typedef uint32_t SDL_MCRC_DataLength_t

CRC Data Length supported.

## ◆ SDL_MCRC_BitSwap_t

typedef uint32_t SDL_MCRC_BitSwap_t

CRC Bit Swap supported.

## ◆ SDL_MCRC_ByteSwap_t

typedef uint32_t SDL_MCRC_ByteSwap_t

CRC Byte Swap supported.

## Enumeration Type Documentation

## ◆ SDL_MCRC_DataBitSize

enum SDL_MCRC_DataBitSize

This enumerator defines the Data size for input MCRC DATA.

Enumerator
SDL_MCRC_DATA_8_BIT | 8 Bit data packed
SDL_MCRC_DATA_16_BIT | 16 Bit data packed
SDL_MCRC_DATA_32_BIT | 32 Bit data packed

## ◆ SDL_MCRC_InstType

enum SDL_MCRC_InstType

MCRC Instance supported.

Enumerator
MCRC0 | MCRC0 Instance
SDL_MCRC_INVALID | Invalid instance

## Function Documentation

## ◆ SDL_MCRC_init()

int32_t SDL_MCRC_init | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t | watchdogPreload,
|  | uint32_t | blockPreload
| ) |  |

Initialize MCRC channel and will configure watchdog and block preload value for given channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number to be initializaed. Values given by SDL_MCRC_Channel_t.
  watchdogPreload | It is used to check if DMA does supply a block of data responding to a request in a given time frame.
  blockPreload | It is used to check if MCRC for an entire block is completed in a given time frame.

Returns
  status MCRC channel initialization status. SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_verifyInit()

int32_t SDL_MCRC_verifyInit | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t | watchdogPreload,
|  | uint32_t | blockPreload
| ) |  |

Verify the MCRC watchdog and block preload value initialized for given channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number to be verified initialization. Values given by SDL_MCRC_Channel_t.
  watchdogPreload | It is used to check if DMA does supply a block of data responding to a request in a given time frame.
  blockPreload | It is used to check if MCRC for an entire block is completed in a given time frame.

Returns
  status MCRC channel verfiy initialization status. SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments SDL_EFAIL: failure, indicate verify initialization failed

## ◆ SDL_MCRC_config()

int32_t SDL_MCRC_config | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t | patternCount,
|  | uint32_t | sectorCount,
|  | SDL_MCRC_ModeType | mode
| ) |  |

This API will configure MCRC mode, pattern and sector count for given channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number to be configured. Values given by SDL_MCRC_Channel_t.
  patternCount | Number of data patterns in one sector to be compressed.
  sectorCount | Number of sectors in a block of memory.
  mode | MCRC operational mode. Refer SDL_MCRC_ModeType.

Returns
  status MCRC channel configuration status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_verifyConfig()

int32_t SDL_MCRC_verifyConfig | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t | patternCount,
|  | uint32_t | sectorCount,
|  | SDL_MCRC_ModeType | mode
| ) |  |

This API will verify the configure of MCRC mode, pattern and sector count for given channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number to be verified configuration. Values given by SDL_MCRC_Channel_t.
  patternCount | Number of data patterns in one sector to be compressed.
  sectorCount | Number of sectors in a block of memory.
  mode | MCRC operational mode. Refer SDL_MCRC_ModeType.

Returns
  status MCRC channel configuration status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments SDL_EFAIL: failure, indicate verify configure failed

## ◆ SDL_MCRC_channelReset()

int32_t SDL_MCRC_channelReset | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel
| ) |  |

This API is used to reset the MCRC channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which reset is to be done. Values given by SDL_MCRC_Channel_t.

Returns
  status MCRC channel reset status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_setPSASeedSig()

int32_t SDL_MCRC_setPSASeedSig | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | const SDL_MCRC_Signature_t * | pSeedSign
| ) |  |

This API is used to set the PSA seed value without compression for given Channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which PSA seed value to be set. Values given by SDL_MCRC_Channel_t.
  pSeedSign | Pointer to MCRC PSA seed signature values. Refer struct SDL_MCRC_Signature_t for details.

Returns
  status MCRC channel set PSA seed value status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_getPSASectorSig()

int32_t SDL_MCRC_getPSASectorSig | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | SDL_MCRC_Signature_t * | pSecSign
| ) |  |

This API is used to get sector signature Value/ MCRC value for given channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number which was configured for MCRC calculation. Values given by SDL_MCRC_Channel_t.
  pSecSign | Pointer to MCRC PSA sector signature values Refer struct SDL_MCRC_Signature_t.

Returns
  status MCRC channel get PSA sector signaure value status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_getIntrStatus()

int32_t SDL_MCRC_getIntrStatus | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t * | pIntrStatus
| ) |  |

This API is used to get the pending interrupts for given Channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which pending interrupt is to get. Values given by SDL_MCRC_Channel_t.
  pIntrStatus | Pointer to pending interrupt status/occurred.

Returns
  status MCRC get pending interrupts status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_enableIntr()

int32_t SDL_MCRC_enableIntr | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t | intrMask
| ) |  |

This API is used to enable interrupts for given Channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which interrupt is to enable. Values given by SDL_MCRC_Channel_t.
  intrMask | Interrupts to enable.

Returns
  status MCRC enable interrupts status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_disableIntr()

int32_t SDL_MCRC_disableIntr | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t | intrMask
| ) |  |

This API is used to disable interrupts for given Channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which interrupt is to disable. Values given by SDL_MCRC_Channel_t.
  intrMask | Interrupts to disable.

Returns
  status MCRC disable interrupts status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_clearIntr()

int32_t SDL_MCRC_clearIntr | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t | intrMask
| ) |  |

This API is used to clear interrupts for given Channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which interrupt is to clear. Values given by SDL_MCRC_Channel_t.
  intrMask | Interrupts to clear status.

Returns
  status MCRC clear interrupts status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_isBusy()

int32_t SDL_MCRC_isBusy | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | uint32_t * | pBusyFlag
| ) |  |

This API is used to check if MCRC 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

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which busy status is to get. Values given by SDL_MCRC_Channel_t.
  pBusyFlag | Pointer to busy flag. 1U: MCRC channel is busy. 0U: MCRC channel is free.

Returns
  status MCRC channel check busy status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_getCurSecNum()

int32_t SDL_MCRC_getCurSecNum | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_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 MCRC fail interrupt is generated.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which the curent sector number is to get. Values given by SDL_MCRC_Channel_t.
  pCurSecNum | Pointer to current sector number.

Returns
  status MCRC channel get current sector number status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_getPSASig()

int32_t SDL_MCRC_getPSASig | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | SDL_MCRC_Signature_t * | pPSAsig
| ) |  |

This API is used to get current known good signature value/ MCRC value for given channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which current MCRC value is to get. Values given by SDL_MCRC_Channel_t.
  pPSAsig | Pointer to current MCRC PSA signature values Refer struct SDL_MCRC_Signature_t.

Returns
  status MCRC channel get current PSA signaure value status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_readStaticReg()

int32_t SDL_MCRC_readStaticReg | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_StaticRegs_t * | pStaticRegs
| ) |  |

This API is used to read static registers of MCRC 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

  instance | MCRC instance either MCU or Main.
  pStaticRegs | pointer to static registers to be read

Returns
  SDL_PASS - success
  SDL_EBADARGS - API fails due to bad input arguments

## ◆ SDL_MCRC_getCurPSASig()

int32_t SDL_MCRC_getCurPSASig | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | SDL_MCRC_Signature_t * | pCurPSASig
| ) |  |

This API is used to get current known good signature value/ MCRC value for given channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which current MCRC value is to get. Values given by SDL_MCRC_Channel_t.
  pCurPSASig | Pointer to current MCRC PSA signature values Refer struct SDL_MCRC_Signature_t.

Returns
  status MCRC channel get current PSA signaure value status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_getPSASigRegAddr()

int32_t SDL_MCRC_getPSASigRegAddr | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | SDL_MCRC_SignatureRegAddr_t * | pMCRCregAddr
| ) |  |

This API is used to get the PSA register address for given Channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which PSA register address is to get. Values given by SDL_MCRC_Channel_t.
  pMCRCregAddr | Pointer to MCRC PSA register address structure. Refer structure SDL_MCRC_SignatureRegAddr_t.

Returns
  status MCRC channel get PSA signature register address status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_computeSignCPUmode()

int32_t SDL_MCRC_computeSignCPUmode | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | const SDL_MCRC_DataConfig_t * | pDataConfig,
|  | SDL_MCRC_Signature_t * | sectSignVal
| ) |  |

This API is used to compute the signature for CPU-only mode and it check if the generated MCRC signature value matches with the reference signature value.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | MCRC channel number to be used
  pDataConfig | Pointer to data configuration
  sectSignVal | Generated sector signature value.

Returns
  SDL_PASS: Success; SDL_FAIL: Failure; SDL_EBADARGS: Bad arguments error

## ◆ SDL_MCRC_getCRCRegAddr()

int32_t SDL_MCRC_getCRCRegAddr | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel,
|  | SDL_MCRC_SignatureRegAddr_t * | pMCRCregAddr
| ) |  |

This API is used to get the MCRC register address for given Channel.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number for which MCRC register address is to get. Values given by SDL_MCRC_Channel_t.
  pMCRCregAddr | Pointer to MCRC register address structure. Refer structure SDL_MCRC_SignatureRegAddr_t.

Returns
  status MCRC channel get MCRC signature register address status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

## ◆ SDL_MCRC_configCRCType()

int32_t SDL_MCRC_configCRCType | ( | SDL_MCRC_InstType | instance,
|  | SDL_MCRC_Channel_t | channel
| ) |  |

This API is used to configure the MCRC type for given Channel. Legacy API for devices other than AM273X and AWR294X.

Parameters

  instance | MCRC instance either MCU or Main.
  channel | Channel number

Returns
  status SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments

Note
  This legacy API only supports 64-bit CRC type configuration. For AM273X and AWR294X, use the new API signature with SDL_MCRC_Config_t.

## ◆ SDL_MCRC_getBaseaddr()

int32_t SDL_MCRC_getBaseaddr | ( | SDL_MCRC_InstType | instance,
|  | uint32_t * | baseAddr
| ) |  |

This API is used to get the base address of the instance.

Parameters

  instance | MCRC instance either MCU or Main.
  baseAddr | Dbase address of the instance.

Returns
  status return the base address of th instance. SDL_PASS: success SDL_EBADARGS: failure, indicate the bad input arguments SDL_EFAIL: failure, indicate verify failed