AM62x MCU+ SDK  09.02.00
SAFETY_CHECKERS_PM

PM safety checkers library APIs are integrated into the safety application to verify the PSC/PLL configurations and validate the current PSC/PLL configurations against golden reference. Also provides the PLL lock API which is responsible for locking a PLL control module registers by preventing the stray writes.

Features Supported

The module supports below API's for the application

  • API to get the configurations registers for PSC , PLL and RM modules.
  • API to read PLL and PSC registers at run time and validate they are matching with golden state for modules in the safety loop.
  • API to lock the PLL configuration registers.

SysConfig Features

  • None

Features NOT Supported

  • None

Important Usage Guidelines

  • None

Example Usage

The following shows an example of PM safety checkers API usage

Include the below file to access the APIs

#include "../../src/safety_checkers_pm.h"

return the pscRegCfg with register configuration for PSC module.

compares the pscRegCfg (golden reference) with runtime PSC configuration values and return success or failure.

if(gflag == 1)
{
gflag = 0;
retVal = SafetyCheckers_pmVerifyPscRegCfg(pscRegCfg, size);
if(retVal != 0)
{
DebugP_log("Register Mismatch\r\n");
} else{
DebugP_log("No Register Mismatch\r\n");
}
}

return the pllRegCfg with register configuration for PLL module.

compares the pllRegCfg (golden reference) with runtime PLL configuration values and return success or failure.

if(gflag == 1)
{
gflag = 0;
retVal = SafetyCheckers_pmVerifyPllRegCfg(pllRegCfg, size);
if(retVal != 0)
{
DebugP_log("Register Mismatch\r\n");
} else{
DebugP_log("No Register Mismatch\r\n");
}
}

lock the PLL control module registers.

if(gflag == 1)
{
gflag = 0;
if(retVal != 0)
{
DebugP_log("PLL register lock failed\r\n");
} else{
DebugP_log("PLL register lock passes\r\n");
}
}

API

PM Safety Checkers Library

size
uint16_t size
Definition: tisci_boardcfg.h:1
SafetyCheckers_pmVerifyPllRegCfg
int32_t SafetyCheckers_pmVerifyPllRegCfg(const uintptr_t *pllRegCfg, uint32_t size)
API to read back and compares the current register configuration for PLL module. E....
DebugP_log
#define DebugP_log(format,...)
Function to log a string to the enabled console.
Definition: DebugP.h:227
SafetyCheckers_pmGetPscRegCfg
int32_t SafetyCheckers_pmGetPscRegCfg(uintptr_t *pscRegCfg, uint32_t size)
API to get register configuration for PSC module. E.g. When the PSC register config is requested,...
SafetyCheckers_pmRegisterLock
int32_t SafetyCheckers_pmRegisterLock(void)
API to lock the PLL control module registers. E.g. When the PLL register lock is requested,...
SafetyCheckers_pmVerifyPscRegCfg
int32_t SafetyCheckers_pmVerifyPscRegCfg(const uintptr_t *pscRegCfg, uint32_t size)
API to read back and compares the current register configuration for PSC module. E....
SafetyCheckers_pmGetPllRegCfg
int32_t SafetyCheckers_pmGetPllRegCfg(uintptr_t *pllRegCfg, uint32_t size)
API to get register configuration for PLL module. E.g. When the PLL register config is requested,...