F29H85x-SDK  26.01.00
 
Sdl_lcm_group

Introduction

Functions

int32_t SDL_LCM_checkRegisterParity (uint32_t lcmBase)
 Checks the LCM register parity logic.
 
int32_t SDL_LCM_runSelfTest (uint32_t lcmBase)
 Runs the LCM self-test.
 
int32_t SDL_LCM_checkCompareError (uint32_t lcmBase)
 Checks LCM compare error force.
 
int32_t SDL_LCM_enableLockstep (void)
 Enables the Lockstep module.
 
int32_t SDL_LCM_disableLockstep (uint32_t lcmBase)
 Disables the Lockstep module.
 
int32_t SDL_LCM_enableComparator (uint32_t lcmBase)
 Enables the LCM comparators.
 
int32_t SDL_LCM_disableComparator (uint32_t lcmBase)
 disables the LCM comparators.
 
int32_t SDL_LCM_getStatus (uint32_t lcmBase, uint32_t *pStatus)
 Fetches the status register.
 
int32_t SDL_LCM_clearStatus (uint32_t lcmBase, uint32_t clearStatus)
 Clears the status of a field in the status register.
 
int32_t SDL_LCM_lockRegister (uint32_t lcmBase, uint32_t lcmRegs)
 Locks a particular register's configuration.
 
int32_t SDL_LCM_unlockRegister (uint32_t lcmBase, uint32_t lcmRegs)
 Unlocks a particular register's configuration.
 
int32_t SDL_LCM_commitRegister (uint32_t lcmBase, uint32_t lcmRegs)
 Commits register lock configurations in the commit register.
 
void SDL_LCM_handleESMIntr (uint32_t esmBase, uint32_t intSrc, void *callbackArg)
 Handles ESM interrupts.
 

Macros

#define SDL_LCM_NO_INTERRUPT   (0U)
 
#define SDL_LCM_INTERRUPT   (1U)
 

Macro Definition Documentation

◆ SDL_LCM_NO_INTERRUPT

#define SDL_LCM_NO_INTERRUPT   (0U)

◆ SDL_LCM_INTERRUPT

#define SDL_LCM_INTERRUPT   (1U)

Function Documentation

◆ SDL_LCM_checkRegisterParity()

int32_t SDL_LCM_checkRegisterParity ( uint32_t lcmBase)

Checks the LCM register parity logic.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.

This function performs a test of the MMR parity logic, using the parity error test functionality in LCM. An error is injected into a byte in each parity-protected LCM register and the function confirms that ESM will raise an interrupt if there is any error.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_runSelfTest()

int32_t SDL_LCM_runSelfTest ( uint32_t lcmBase)

Runs the LCM self-test.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.

This function performs a self-test of the LCM using the built-in self-test capability. The self-test is kicked off and the function waits for it to complete. If the self-test times out or the LCM_STATUS registers indicate that the self-test did not complete and pass, the test fails.

This test can be run either before or after LCM_CONTROL.CMPEN is set.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_checkCompareError()

int32_t SDL_LCM_checkCompareError ( uint32_t lcmBase)

Checks LCM compare error force.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.

This function performs a test of the error signaling path between the LCM and the error aggregation logic. For each of the LCM comparators (referred to as CMP1 and CMP2) an error is forced and the function confirms that ESM will raise and handle the interrupt.

If not already set by the software, this test sets LCM_CONTROL.CMPEN.

Note
This function will generate an error if there are any disparity and ESM will handle the error by raising an interrupt.
Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_enableLockstep()

int32_t SDL_LCM_enableLockstep ( void )

Enables the Lockstep module.

This function Enables the lockstep functionality of LCM if it got disabled by any software function.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_disableLockstep()

int32_t SDL_LCM_disableLockstep ( uint32_t lcmBase)

Disables the Lockstep module.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.

This function Disables the lockstep functionality of LCM for the systems that do not require the redundant module output for comparison in functional safety requirements, the LCM redundant module can be used for functional output.

To change the LCM comparators configuration upon device startup or after reset, this function must be called at the beginning of the user application code

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_enableComparator()

int32_t SDL_LCM_enableComparator ( uint32_t lcmBase)

Enables the LCM comparators.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.

This function Enables the LCM comparators which are disabled by default or any software function.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_disableComparator()

int32_t SDL_LCM_disableComparator ( uint32_t lcmBase)

disables the LCM comparators.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.

This function Disables the LCM comparators which are enabled by default or by any software function.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_getStatus()

int32_t SDL_LCM_getStatus ( uint32_t lcmBase,
uint32_t * pStatus )

Fetches the status register.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.
pStatusis the buffer to store the LCM status register's contents.

This function fetches or copies the LCM status register's contents.

User program can use this data to get the status of any particular field of the status register.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_clearStatus()

int32_t SDL_LCM_clearStatus ( uint32_t lcmBase,
uint32_t clearStatus )

Clears the status of a field in the status register.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.
clearStatusis the particular bit in register.

This function clears or reset a particular bit in the status register.

User program can pass the particular bit to this API to clear the status.

It uses the LCM status clear register for it. If hardware is trying to set the flag and software is trying to clear the same flag in the same cycle, software clear is given higher priority

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_lockRegister()

int32_t SDL_LCM_lockRegister ( uint32_t lcmBase,
uint32_t lcmRegs )

Locks a particular register's configuration.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.
lcmRegsis the particular bit in register.

This function locks or set a particular register's configurations by setting the appropriate bit in the lock register.

User program can pass the particular bit to this API to lock the status or configurations of the register.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_unlockRegister()

int32_t SDL_LCM_unlockRegister ( uint32_t lcmBase,
uint32_t lcmRegs )

Unlocks a particular register's configuration.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.
lcmRegsis the particular bit in register.

This function unlocks or resets a particular register's configurations by resetting the appropriate bit in the lock register.

User program can pass the particular bit to this API to unlock the status or configurations of the register.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_commitRegister()

int32_t SDL_LCM_commitRegister ( uint32_t lcmBase,
uint32_t lcmRegs )

Commits register lock configurations in the commit register.

Parameters
lcmBaseis the particular baseaddress(CPU/DMA) of the LCM module.
lcmRegsis the particular bit in register.

This function Commits or set a particular bit for a particular Register lock configuration in the commit register.

Once configuration is committed, only reset can change the configuration.

Returns
SDL_PASS If the test passes.
SDL_EFAIL If the test fails.
SDL_EBADARGS If any of the base address contains invalid values.

◆ SDL_LCM_handleESMIntr()

void SDL_LCM_handleESMIntr ( uint32_t esmBase,
uint32_t intSrc,
void * callbackArg )

Handles ESM interrupts.

This function handles ESM interrupts triggered by LCM tests. When an interrupt occurs, the ESM triggers the ISR, which in turn calls this function to safely and appropriately handle the interrupt.