ADM/GW/generate/include/FlexCAN_Ip_Cfg.h
2024-08-08 10:00:15 +09:00

168 lines
7.5 KiB
C

/*==================================================================================================
* Project : RTD AUTOSAR 4.4
* Platform : CORTEXM
* Peripheral : FLEXCAN
* Dependencies :
*
* Autosar Version : 4.4.0
* Autosar Revision : ASR_REL_4_4_REV_0000
* Autosar Conf.Variant :
* SW Version : 0.9.0
* Build Version : S32K3_RTD_0_9_0__ASR_REL_4_4_REV_0000_20210326
*
* (c) Copyright 2020 - 2021 NXP Semiconductors
* All Rights Reserved.
*
* NXP Confidential. This software is owned or controlled by NXP and may only be
* used strictly in accordance with the applicable license terms. By expressly
* accepting such terms or by downloading, installing, activating and/or otherwise
* using the software, you are agreeing that you have read, and that you agree to
* comply with and are bound by, such license terms. If you do not agree to be
* bound by the applicable license terms, then you may not retain, install,
* activate or otherwise use the software.
==================================================================================================*/
/***********************************************************************************************************************
* This file was generated by the S32 Config Tools. Any manual edits made to this file
* will be overwritten if the respective S32 Config Tools is used to update this file.
**********************************************************************************************************************/
/*
* FlexCAN_Ip_Cfg.h
*
* Created on: Apr 29, 2020
* Author: nxf31634
*/
#ifndef FLEXCAN_FLEXCAN_IP_CFG_H_
#define FLEXCAN_FLEXCAN_IP_CFG_H_
#ifdef __cplusplus
extern "C"{
#endif
/*==================================================================================================
* INCLUDE FILES
* 1) system and project includes
* 2) needed interfaces from external units
* 3) internal and external interfaces from this unit
==================================================================================================*/
#include "FlexCAN_Ip_Sa_BOARD_InitPeripherals_PBcfg.h"
#include "OsIf.h"
#include "Reg_eSys.h"
/*==================================================================================================
* SOURCE FILE VERSION INFORMATION
==================================================================================================*/
#define FLEXCAN_IP_CFG_VENDOR_ID_H 43
#define FLEXCAN_IP_CFG_AR_RELEASE_MAJOR_VERSION_H 4
#define FLEXCAN_IP_CFG_AR_RELEASE_MINOR_VERSION_H 4
#define FLEXCAN_IP_CFG_AR_RELEASE_REVISION_VERSION_H 0
#define FLEXCAN_IP_CFG_SW_MAJOR_VERSION_H 0
#define FLEXCAN_IP_CFG_SW_MINOR_VERSION_H 9
#define FLEXCAN_IP_CFG_SW_PATCH_VERSION_H 0
/*==================================================================================================
* FILE VERSION CHECKS
==================================================================================================*/
/*==================================================================================================
* CONSTANTS
==================================================================================================*/
/*==================================================================================================
* DEFINES AND MACROS
==================================================================================================*/
#define FLEXCAN_STATE_EXT FLEXCAN_IP_STATE_PB_CFG
#define FLEXCAN_CONFIG_EXT FLEXCAN_IP_PB_CFG
/*! @brief Enables / Disables user mode support */
#define FLEXCAN_ENABLE_USER_MODE_SUPPORT (STD_OFF)
#if ((STD_ON == FLEXCAN_ENABLE_USER_MODE_SUPPORT) && defined(MCAL_FLEXCAN_REG_PROT_AVAILABLE))
#if (STD_ON == MCAL_FLEXCAN_REG_PROT_AVAILABLE)
#define FLEXCAN_SET_USER_ACCESS_ALLOWED_AVAILABLE (STD_ON)
#else
#define FLEXCAN_SET_USER_ACCESS_ALLOWED_AVAILABLE (STD_OFF)
#endif
#else
#define FLEXCAN_SET_USER_ACCESS_ALLOWED_AVAILABLE (STD_OFF)
#endif
#if (FLEXCAN_SET_USER_ACCESS_ALLOWED_AVAILABLE == STD_ON)
/*! @brief Use to check if the instances support UAA bit or not */
#define FLEXCAN_CTRL_REG_PROT_SUPPORT_U8 ((uint8)0U)
#endif
/* Time out value in uS */
#define CAN_TIMEOUT_DURATION (100U)
/* This this will set the timer source for osif that will be used for timeout */
#define CAN_SERVICE_TIMEOUT_TYPE (OSIF_COUNTER_DUMMY)
/* @brief Maximum number of Message Buffers supported for payload size 8 for any of the CAN instances */
#define FEATURE_CAN_MAX_MB_NUM (96U)
/* @brief Maximum number of Message Buffers supported for payload size 8 for CAN0 */
#define FEATURE_CAN0_MAX_MB_NUM (96U)
/* @brief Maximum number of Message Buffers supported for payload size 8 for CAN1 */
#define FEATURE_CAN1_MAX_MB_NUM (64U)
/* @brief Maximum number of Message Buffers supported for payload size 8 for CAN2 */
#define FEATURE_CAN2_MAX_MB_NUM (64U)
/* @brief Maximum number of Message Buffers supported for payload size 8 for CAN3 */
#define FEATURE_CAN3_MAX_MB_NUM (32U)
/* @brief Maximum number of Message Buffers supported for payload size 8 for CAN4 */
#define FEATURE_CAN4_MAX_MB_NUM (32U)
/* @brief Maximum number of Message Buffers supported for payload size 8 for CAN5 */
#define FEATURE_CAN5_MAX_MB_NUM (32U)
/* @brief Array of maximum number of Message Buffers supported for payload size 8 for all the CAN instances */
#define FEATURE_CAN_MAX_MB_NUM_ARRAY { \
FEATURE_CAN0_MAX_MB_NUM, \
FEATURE_CAN1_MAX_MB_NUM, \
FEATURE_CAN2_MAX_MB_NUM, \
FEATURE_CAN3_MAX_MB_NUM, \
FEATURE_CAN4_MAX_MB_NUM, \
FEATURE_CAN5_MAX_MB_NUM \
}
/* @brief Has DMA enable (bit field MCR[DMA]). */
#define FEATURE_CAN_HAS_DMA_ENABLE (STD_OFF)
/* @brief Has Supervisor Mode MCR[SUPV] */
#define FEATURE_CAN_HAS_SUPV (STD_ON)
/* @brief Has Flexible Data Rate */
#define FEATURE_CAN_HAS_FD (STD_ON)
/* @bried FlexCAN has Detection And Correction of Memory Errors */
#define FEATURE_CAN_HAS_MEM_ERR_DET (STD_ON)
/* @brief Has FlexCAN Enhanced Rx FIFO mode */
#define FEATURE_CAN_HAS_ENHANCED_RX_FIFO (STD_ON)
/* @brief Has FlexCAN expandable memory */
#define FEATURE_CAN_HAS_EXPANDABLE_MEMORY (STD_OFF)
/* @brief Has FlexCAN High Resolution Timer for Time stamp CAN Message */
#define FEATURE_CAN_HAS_HR_TIMER (STD_OFF)
/* @brief Has FlexCAN Enhanced Rx FIFO has interrupts available */
#define FEATURE_CAN_HAS_ENHANCED_RX_FIFO_INTERRUPT (STD_OFF)
#define FEATURE_CAN_HAS_PE_CLKSRC_SELECT (STD_OFF)
#define FEATURE_CAN_HAS_WAKE_UP_IRQ (STD_OFF)
/* @brief Has FD Iso Option Mode */
#define FEATURE_CAN_SWITCHINGISOMODE (STD_ON)
/* @brief Has Protocol exception Mode */
#define FEATURE_CAN_PROTOCOLEXCEPTION (STD_ON)
/* @brief Has Edge filter Feature */
#define FEATURE_CAN_EDGEFILTER (STD_ON)
/* Defines if interface will enable any of interrupts */
#define CAN_MB_INTERRUPT_SUPPORT (STD_ON)
/* Defines the No Of Message Buffers Partions Suppport MBDSR regions */
#define FEATURE_CAN_MBDSR_COUNT (3U)
/* Enable Development Error Detection */
/* Trebuie adagudat un field in configuratorul de FlexCAN */
#define FLEXCAN_DEV_ERROR_DETECT (STD_ON)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* FLEXCAN_FLEXCAN_IP_CFG_H_ */