AM261x MCU+ SDK: CCM Low-Level API

| AM261x MCU+ SDK 26.00.00 |

Functions
CCM Low-Level API
APIs for SDL Module » APIs for CCM MODULE

## Introduction

CCM for R5F provides APIs to select the operating modes and read the status for

1. CPU compare block
2. Inactivity monitor
3. VIM compare block The APIs for programming the polarity of the CPU signals are also provided. The errors issued by the RTL are routed to the ESM (error signaling module) external to the subsystem.

## Functions
int32_t | SDL_armR5ReadCCMRegister (uintptr_t baseAddress, SDL_McuArmssCcmR5RegId regId, uint32_t *pValToBeRead, int32_t *pMetaInfo)
| Read CCM Regiser. More...
int32_t | SDL_armR5ConfigureCCMRegister (uintptr_t baseAddress, SDL_McuArmssCcmR5RegId regId, uint32_t valToBeWritten, int32_t *pMetaInfo)
| Configure CCM Regiser. More...
int32_t | SDL_armR5CCMSetOperationModeKey (uintptr_t baseAddress, SDL_McuArmssCcmR5ModuleId moduleId, SDL_McuArmssCcmR5OpModeKey opModeKey, int32_t *pMetaInfo)
| Configure Operating mode for CPU, VIM, CCM Inactivity monitor. More...
int32_t | SDL_armR5CCMGetCompareError (uintptr_t baseAddress, SDL_McuArmssCcmR5ModuleId moduleId, uint32_t *pCmpError, int32_t *pMetaInfo)
| Read Compare Error status for CPU, VIM, CCM Inactivity monitor. More...
int32_t | SDL_armR5CCMGetOperationModeKey (uintptr_t baseAddress, SDL_McuArmssCcmR5ModuleId moduleId, SDL_McuArmssCcmR5OpModeKey *pOpModeKey, int32_t *pMetaInfo)
| Get Operation mode key value for CPU, VIM, CCM Inactivity monitor. More...
int32_t | SDL_armR5CCMClearCompareError (uintptr_t baseAddress, SDL_McuArmssCcmR5ModuleId moduleId, int32_t *pMetaInfo)
| Clear Compare Error value for CPU, VIM, CCM Inactivity monitor. More...

## CCM R5 Register IDs
enum | SDL_McuArmssCcmR5RegId { SDL_MCU_ARMSS_CCMR5_CCMSR1_REGID = (0u), SDL_MCU_ARMSS_CCMR5_CCMKEYR1_REGID = (1u), SDL_MCU_ARMSS_CCMR5_CCMSR2_REGID = (2u), SDL_MCU_ARMSS_CCMR5_CCMKEYR2_REGID = (3u), SDL_MCU_ARMSS_CCMR5_CCMSR3_REGID = (4u), SDL_MCU_ARMSS_CCMR5_CCMKEYR3_REGID = (5u), SDL_MCU_ARMSS_CCMR5_POLCNTRL_REGID = (6u), SDL_MCU_ARMSS_CCMR5_INVALID_REGID = (11u) }
| This typedef defines the MCU ARMSS CCM R5 register ID type used under the context of SDL CCMR5 APIs. More...

## CCM R5 Module IDs
enum | SDL_McuArmssCcmR5ModuleId { SDL_MCU_ARMSS_CCMR5_CPU_MODULE_ID = (0u), SDL_MCU_ARMSS_CCMR5_VIM_MODULE_ID = (1u), SDL_MCU_ARMSS_CCMR5_INACTIVITY_MONITOR_MODULE_ID = (2u), SDL_MCU_ARMSS_CCMR5_INVALID_MODULE_ID = (255u) }
| This enum defines the MCU ARMSS CCM R5 module ID type used under the context of SDL CCMR5 APIs. More...

## CCM R5 Operation Mode Key values
enum | SDL_McuArmssCcmR5OpModeKey { SDL_MCU_ARMSS_CCMR5_MKEY_CMP_MODE_ACTIVE = (0u), SDL_MCU_ARMSS_CCMR5_MKEY_SELF_TEST_MODE = (6u), SDL_MCU_ARMSS_CCMR5_MKEY_ERR_FORCE_MODE = (9u), SDL_MCU_ARMSS_CCMR5_MKEY_SELF_TEST_ERR_FORCE_MODE = (15u) }
| This enum defines the MCU ARMSS CCM R5 Operation Mode Key values used under the context of SDL CCMR5 APIs. More...

## Enumeration Type Documentation

## ◆ SDL_McuArmssCcmR5RegId

enum SDL_McuArmssCcmR5RegId

This typedef defines the MCU ARMSS CCM R5 register ID type used under the context of SDL CCMR5 APIs.

Enumerator
SDL_MCU_ARMSS_CCMR5_CCMSR1_REGID | register id for Status Register 1
SDL_MCU_ARMSS_CCMR5_CCMKEYR1_REGID | register id for KEY register 1
SDL_MCU_ARMSS_CCMR5_CCMSR2_REGID | register id for Status Register 2
SDL_MCU_ARMSS_CCMR5_CCMKEYR2_REGID | register id for KEY register 2
SDL_MCU_ARMSS_CCMR5_CCMSR3_REGID | register id for Status Register 3
SDL_MCU_ARMSS_CCMR5_CCMKEYR3_REGID | register id for KEY register 3
SDL_MCU_ARMSS_CCMR5_POLCNTRL_REGID | register id for Polatiry Control Reg
SDL_MCU_ARMSS_CCMR5_INVALID_REGID | Invalid RegID

## ◆ SDL_McuArmssCcmR5ModuleId

enum SDL_McuArmssCcmR5ModuleId

This enum defines the MCU ARMSS CCM R5 module ID type used under the context of SDL CCMR5 APIs.

Enumerator
SDL_MCU_ARMSS_CCMR5_CPU_MODULE_ID | module id for Cpu
SDL_MCU_ARMSS_CCMR5_VIM_MODULE_ID | module id for VIM
SDL_MCU_ARMSS_CCMR5_INACTIVITY_MONITOR_MODULE_ID | module id for Inactivity monitor
SDL_MCU_ARMSS_CCMR5_INVALID_MODULE_ID | invalid module id for Cpu

## ◆ SDL_McuArmssCcmR5OpModeKey

enum SDL_McuArmssCcmR5OpModeKey

This enum defines the MCU ARMSS CCM R5 Operation Mode Key values used under the context of SDL CCMR5 APIs.

Enumerator
SDL_MCU_ARMSS_CCMR5_MKEY_CMP_MODE_ACTIVE | compare mode active operation Mode key
SDL_MCU_ARMSS_CCMR5_MKEY_SELF_TEST_MODE | Self Test active operation Mode key
SDL_MCU_ARMSS_CCMR5_MKEY_ERR_FORCE_MODE | Error Force mode operation Mode key
SDL_MCU_ARMSS_CCMR5_MKEY_SELF_TEST_ERR_FORCE_MODE | Self test and Error Force Mode key

## Function Documentation

## ◆ SDL_armR5ReadCCMRegister()

int32_t SDL_armR5ReadCCMRegister | ( | uintptr_t | baseAddress,
|  | SDL_McuArmssCcmR5RegId | regId,
|  | uint32_t * | pValToBeRead,
|  | int32_t * | pMetaInfo
| ) |  |

Read CCM Regiser.

This function reads the contents of a given CCM register and returns the status of the operation for API caller to indicate success or failure on the operation.

Parameters

  baseAddress | [IN] Base address of MCU_ARMSS_CCMR5 registers
  regId | [IN] CCMR5 register ID to be read
  pValToBeRead | [OUT] pointer to address of Register value read
  pMetaInfo | [OUT] pointer to meta info (Optional) for SDL_EFAIL: reason for API failure as defined under SDL_ErrType_t for SDL_PASS: Not applicable

Returns
  The SDL error code for the API. Success: SDL_PASS Fail : SDL_EFAIL

## ◆ SDL_armR5ConfigureCCMRegister()

int32_t SDL_armR5ConfigureCCMRegister | ( | uintptr_t | baseAddress,
|  | SDL_McuArmssCcmR5RegId | regId,
|  | uint32_t | valToBeWritten,
|  | int32_t * | pMetaInfo
| ) |  |

Configure CCM Regiser.

This function configures a given CCM register and returns the status of the operation for API caller to indicate success or failure on the operation.

Parameters

  baseAddress | [IN] Base address of MCU_ARMSS_CCMR5 registers
  regId | [IN] CCMR5 register ID to be configured
  valToBeWritten | [OUT] Register value to be written to
  pMetaInfo | [OUT] pointer to meta info (Optional) for SDL_EFAIL: reason for API failure as defined under SDL_ErrType_t for SDL_PASS: Not applicable

Returns
  The SDL error code for the API. Success: SDL_PASS Fail : SDL_EFAIL

## ◆ SDL_armR5CCMSetOperationModeKey()

int32_t SDL_armR5CCMSetOperationModeKey | ( | uintptr_t | baseAddress,
|  | SDL_McuArmssCcmR5ModuleId | moduleId,
|  | SDL_McuArmssCcmR5OpModeKey | opModeKey,
|  | int32_t * | pMetaInfo
| ) |  |

Configure Operating mode for CPU, VIM, CCM Inactivity monitor.

This function configures a Operation mode key and returns the status of the operation for API caller to indicate success or failure on the operation.

Parameters

  baseAddress | [IN] Base address of MCU_ARMSS_CCMR5 registers
  moduleId | [IN] CCMR5 module ID to be configured
  opModeKey | [OUT] Operating mode to be set in KEY register
  pMetaInfo | [OUT] pointer to meta info (Optional) for SDL_EFAIL: reason for API failure as defined under SDL_ErrType_t for SDL_PASS: Not applicable

Returns
  The SDL error code for the API. Success: SDL_PASS Fail : SDL_EFAIL

## ◆ SDL_armR5CCMGetCompareError()

int32_t SDL_armR5CCMGetCompareError | ( | uintptr_t | baseAddress,
|  | SDL_McuArmssCcmR5ModuleId | moduleId,
|  | uint32_t * | pCmpError,
|  | int32_t * | pMetaInfo
| ) |  |

Read Compare Error status for CPU, VIM, CCM Inactivity monitor.

This function reads the a Compare Error status and returns the status of the operation for API caller to indicate success or failure on the operation.

Parameters

  baseAddress | [IN] Base address of MCU_ARMSS_CCMR5 registers
  moduleId | [IN] CCMR5 module ID to be configured
  pCmpError | [OUT] Pointer to Compare Error for the module
  pMetaInfo | [OUT] pointer to meta info (Optional) for SDL_EFAIL: reason for API failure as defined under SDL_ErrType_t for SDL_PASS: Not applicable

Returns
  The SDL error code for the API. Success: SDL_PASS Fail : SDL_EFAIL

## ◆ SDL_armR5CCMGetOperationModeKey()

int32_t SDL_armR5CCMGetOperationModeKey | ( | uintptr_t | baseAddress,
|  | SDL_McuArmssCcmR5ModuleId | moduleId,
|  | SDL_McuArmssCcmR5OpModeKey * | pOpModeKey,
|  | int32_t * | pMetaInfo
| ) |  |

Get Operation mode key value for CPU, VIM, CCM Inactivity monitor.

This function reads the a Operation mode key and returns the status of the operation for API caller to indicate success or failure on the operation.

Parameters

  baseAddress | [IN] Base address of MCU_ARMSS_CCMR5 registers
  moduleId | [IN] CCMR5 module ID to be configured
  pOpModeKey | [OUT] Pointer to Operation Mode for the module
  pMetaInfo | [OUT] pointer to meta info (Optional) for SDL_EFAIL: reason for API failure as defined under SDL_ErrType_t for SDL_PASS: Not applicable

Returns
  The SDL error code for the API. Success: SDL_PASS Fail : SDL_EFAIL Note: Please note that we cannot read the value that is written to the MKEY register unless the programmed key value is lockstep mode Additional information: Only 4 valid key values are expected to be programmed
  1. LOCK_STEP_MODE
  2. SELF_TEST_MODE
  3. ERR_FORCE_MODE
  4. ST_ERR_FORCE_MODE For any other value that is programmed the CCMKEYR register would reflect LOCK_STEP MODE. Also the error forcing/self test error forcing mode operates for 1 cpuclk cycle and after that the key register would reflect the LOCK STEP mode, even though the ERR FORCE & SELF TEST ERR FORCE mode would not complete in 1 cycle

## ◆ SDL_armR5CCMClearCompareError()

int32_t SDL_armR5CCMClearCompareError | ( | uintptr_t | baseAddress,
|  | SDL_McuArmssCcmR5ModuleId | moduleId,
|  | int32_t * | pMetaInfo
| ) |  |

Clear Compare Error value for CPU, VIM, CCM Inactivity monitor.

This function clears the a Compare Error Statusand returns the status of the operation for API caller to indicate success or failure on the operation.

Parameters

  baseAddress | [IN] Base address of MCU_ARMSS_CCMR5 registers
  moduleId | [IN] CCMR5 module ID to be configured
  pMetaInfo | [OUT] pointer to meta info (Optional) for SDL_EFAIL: reason for API failure as defined under SDL_ErrType_t for SDL_PASS: Not applicable

Returns
  The SDL error code for the API. Success: SDL_PASS Fail : SDL_EFAIL