lib/sw_services/xilplmi/src/xplmi_err.c
int XPlmi_ClearNpiErrors(void)
{
	int Status = XST_FAILURE;

	/* Unlock NPI address space */
	XPlmi_Out32(NPI_NIR_REG_PCSR_LOCK, NPI_NIR_REG_PCSR_UNLOCK_VAL);
	/* Clear ISR */
	XPlmi_UtilRMW(NPI_NIR_REG_ISR, NPI_NIR_REG_ISR_ERR_MASK,
		NPI_NIR_REG_ISR_ERR_MASK);
	/* Clear error type registers */
	XPlmi_UtilRMW(NPI_NIR_ERR_TYPE, NPI_NIR_ERR_TYPE_ERR_MASK,
		~(NPI_NIR_ERR_TYPE_ERR_MASK));
	XPlmi_Out32(NPI_NIR_ERR_LOG_P0_INFO_0, 0U);
	XPlmi_Out32(NPI_NIR_ERR_LOG_P0_INFO_1, 0U);
	/* Lock NPI address space */
	Status = Xil_SecureOut32(NPI_NIR_REG_PCSR_LOCK, 1U);
	if (Status != XST_SUCCESS) {
		Status = XPlmi_UpdateStatus(XPLMI_ERR_NPI_LOCK, Status);
	}

	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function clears NPI errors.
 *
 * @return	XST_SUCCESS on success and error code on failure
 *
******************************************************************************/
@brief       This function clears NPI errors.
@return      XST_SUCCESS on success and error code on failure
@brief This function clears NPI errors . @return XST_SUCCESS on success and error code on failure
int XPlmi_ClearNpiErrors(void)
{
	int Status = XST_FAILURE;
	XPlmi_Out32(NPI_NIR_REG_PCSR_LOCK, NPI_NIR_REG_PCSR_UNLOCK_VAL);
	XPlmi_UtilRMW(NPI_NIR_REG_ISR, NPI_NIR_REG_ISR_ERR_MASK,
		NPI_NIR_REG_ISR_ERR_MASK);
	XPlmi_UtilRMW(NPI_NIR_ERR_TYPE, NPI_NIR_ERR_TYPE_ERR_MASK,
		~(NPI_NIR_ERR_TYPE_ERR_MASK));
	XPlmi_Out32(NPI_NIR_ERR_LOG_P0_INFO_0, 0U);
	XPlmi_Out32(NPI_NIR_ERR_LOG_P0_INFO_1, 0U);
	Status = Xil_SecureOut32(NPI_NIR_REG_PCSR_LOCK, 1U);
	if (Status != XST_SUCCESS) {
		Status = XPlmi_UpdateStatus(XPLMI_ERR_NPI_LOCK, Status);
	}
	return Status;
}
int XPlmi_ClearNpiErrors ( void ) { int Status = XST_FAILURE ; XPlmi_Out32 ( NPI_NIR_REG_PCSR_LOCK , NPI_NIR_REG_PCSR_UNLOCK_VAL ) ; XPlmi_UtilRMW ( NPI_NIR_REG_ISR , NPI_NIR_REG_ISR_ERR_MASK , NPI_NIR_REG_ISR_ERR_MASK ) ; XPlmi_UtilRMW ( NPI_NIR_ERR_TYPE , NPI_NIR_ERR_TYPE_ERR_MASK , ~ ( NPI_NIR_ERR_TYPE_ERR_MASK ) ) ; XPlmi_Out32 ( NPI_NIR_ERR_LOG_P0_INFO_0 , 0U ) ; XPlmi_Out32 ( NPI_NIR_ERR_LOG_P0_INFO_1 , 0U ) ; Status = Xil_SecureOut32 ( NPI_NIR_REG_PCSR_LOCK , 1U ) ; if ( Status != XST_SUCCESS ) { Status = XPlmi_UpdateStatus ( XPLMI_ERR_NPI_LOCK , Status ) ; } return Status ; }
@brief       This function clears NPI errors.
@brief This function clears NPI errors .
/* Unlock NPI address space */ /* Clear ISR */ /* Clear error type registers */ /* Lock NPI address space */