|
AM243x MCU+ SDK
08.06.00
|
|
Go to the documentation of this file.
69 #include "sdl_mcrc_hw.h"
70 #include <sdl/include/sdlr.h>
71 #include <sdl/mcrc/v0/soc/sdl_mcrc_soc.h>
84 #define SDL_MCRC_CHANNEL_IRQSTATUS_RAW_MAIN_ALL \
85 (uint32_t) ((uint32_t)SDL_MCRC_INTS_CH1_CCITENS_MASK | \
86 (uint32_t)SDL_MCRC_INTR_CH1_FAILENR_MASK | \
87 (uint32_t)SDL_MCRC_INTR_CH1_OVERENR_MASK | \
88 (uint32_t)SDL_MCRC_INTR_CH1_UNDERENR_MASK | \
89 (uint32_t)SDL_MCRC_INTR_CH1_TIME_OUT_ENR_MASK)
94 #define SDL_MCRC_PATTERN_COUNT_MAX (0x000FFFFFU)
99 #define SDL_MCRC_SECTOR_COUNT_MAX (0x0000FFFFU)
105 #define SDL_MCRC_BCTOPLD_MAX (0x00FFFFFFU)
110 #define SDL_MCRC_WDTOPLD_MAX (0x00FFFFFFU)
116 #define SDL_MCRC_TYPE_16BIT (0x4CU)
118 #define SDL_MCRC_TYPE_32BIT (0x54U)
120 #define SDL_MCRC_TYPE_64BIT (0x44U)
124 #define SDL_MCRC_MAX_NUM_OF_CHANNELS (4U)
138 #define SDL_MCRC_OPERATION_MODE_DATA (SDL_MCRC_CTRL2_CH1_MODE_DATA)
140 #define SDL_MCRC_OPERATION_MODE_AUTO (SDL_MCRC_CTRL2_CH1_MODE_AUTO)
142 #define SDL_MCRC_OPERATION_MODE_SEMICPU (SDL_MCRC_CTRL2_CH1_MODE_SEMICPU)
144 #define SDL_MCRC_OPERATION_MODE_FULLCPU (SDL_MCRC_CTRL2_CH1_MODE_FULLCPU)
158 #define SDL_MCRC_CHANNEL_1 (0x1U)
160 #define SDL_MCRC_CHANNEL_2 (0x2U)
162 #define SDL_MCRC_CHANNEL_3 (0x3U)
164 #define SDL_MCRC_CHANNEL_4 (0x4U)
188 typedef struct SDL_MCRC_Signature
199 typedef struct SDL_MCRC_SigantureRegAddr
238 typedef struct SDL_MCRC_DataConfig
275 uint32_t watchdogPreload,
276 uint32_t blockPreload);
300 uint32_t watchdogPreload,
301 uint32_t blockPreload);
322 uint32_t patternCount,
323 uint32_t sectorCount,
347 uint32_t patternCount,
348 uint32_t sectorCount,
419 uint32_t *pIntrStatus);
495 uint32_t *pBusyFlag);
516 uint32_t *pCurSecNum);
uint32_t regL
Definition: mcrc/v0/sdl_mcrc.h:201
volatile uint32_t CTRL1
Definition: mcrc/v0/sdl_mcrc.h:229
int32_t SDL_MCRC_channelReset(SDL_MCRC_InstType instance, SDL_MCRC_Channel_t channel)
This API is used to reset the MCRC channel.
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.
volatile uint32_t CTRL0
Definition: mcrc/v0/sdl_mcrc.h:227
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.
volatile uint32_t BUS_SEL
Definition: mcrc/v0/sdl_mcrc.h:231
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.
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.
uint32_t SDL_MCRC_Channel_t
MCRC channel supported.
Definition: mcrc/v0/sdl_mcrc.h:157
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.
SDL_MCRC_InstType
MCRC Instance supported.
Definition: sdl_mcrc_soc.h:60
MCRC static registers list.
Definition: mcrc/v0/sdl_mcrc.h:224
SDL_MCRC_DataBitSize
This enumerator defines the Data size for input MCRC DATA.
Definition: mcrc/v0/sdl_mcrc.h:172
#define SDL_MCRC_MAX_NUM_OF_CHANNELS
Max number of channels supported in MCRC.
Definition: mcrc/v0/sdl_mcrc.h:124
@ SDL_MCRC_DATA_32_BIT
Definition: mcrc/v0/sdl_mcrc.h:177
@ SDL_MCRC_DATA_8_BIT
Definition: mcrc/v0/sdl_mcrc.h:173
uint32_t regH
Definition: mcrc/v0/sdl_mcrc.h:203
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.
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.
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.
MCRC channel static registers list.
Definition: mcrc/v0/sdl_mcrc.h:210
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.
uint32_t regH
Definition: mcrc/v0/sdl_mcrc.h:192
volatile uint32_t WDTOPLD
Definition: mcrc/v0/sdl_mcrc.h:215
volatile uint32_t SCOUNT
Definition: mcrc/v0/sdl_mcrc.h:213
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.
Structure for MCRC CPU inputs data.
Definition: mcrc/v0/sdl_mcrc.h:239
SDL_MCRC_DataBitSize dataBitSize
Definition: mcrc/v0/sdl_mcrc.h:244
uint32_t size
Definition: mcrc/v0/sdl_mcrc.h:242
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.
uint32_t SDL_MCRC_ModeType
MCRC operation mode supported. MCRC can either operate in Semi-CPU, Full-CPU or Auto mode.
Definition: mcrc/v0/sdl_mcrc.h:136
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 m...
volatile uint32_t BCTOPLD
Definition: mcrc/v0/sdl_mcrc.h:217
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.
char mode[32]
Definition: tisci_pm_core.h:1
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.
volatile uint32_t PCOUNT
Definition: mcrc/v0/sdl_mcrc.h:211
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 signat...
uint32_t * pMCRCData
Definition: mcrc/v0/sdl_mcrc.h:240
Structure for accessing MCRC register data which are 64 bit wide.
Definition: mcrc/v0/sdl_mcrc.h:189
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 initi...
Structure for accessing MCRC registers address which are 64 bit wide.
Definition: mcrc/v0/sdl_mcrc.h:200
@ SDL_MCRC_DATA_16_BIT
Definition: mcrc/v0/sdl_mcrc.h:175
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.
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.
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.
uint32_t regL
Definition: mcrc/v0/sdl_mcrc.h:190