MCUSW
Can Configuration

Introduction

This files defines CAN MCAL configuration structures

Data Structures

struct  Can_MaskType
 Structure defining the filter mask to be used. More...
 
struct  Can_HwFilterType
 Structure defining the HW filter to be used. More...
 
struct  Can_FdBaudConfigType
 Structure defining the CAN FD data phase baud rate configuration. More...
 
struct  Can_BaudConfigType
 Structure defining the CAN baud rate configuration. More...
 
struct  Can_ControllerType
 Can Controller Configuration definition. More...
 
struct  Can_ControllerType_PC
 Can Controller Pre Compile Configuration definition. More...
 
struct  Can_MailboxType
 Can mailox configuration definition. More...
 
struct  Can_MailboxType_PC
 Can mailox Pre compile configuration definition. More...
 
struct  Can_DmaPrms
 Dummy structure will be used if DMA support is required. More...
 
struct  Can_ConfigType
 Can MCAL root configuration structure. More...
 
struct  Can_RegisterReadbackType
 Register Readback Structure. More...
 

Typedefs

typedef uint8 CanControllerState_Type
 Can Controller State enum type. More...
 
typedef uint32 Can_InterruptMask_Type
 Can Interrupt Mask type. More...
 

Enumerations

enum  Can_MailBoxDirectionType { CAN_MAILBOX_DIRECTION_RX = 0x0U, CAN_MAILBOX_DIRECTION_TX = 0x1U }
 Can Mailbox direction enum. More...
 
enum  Can_HandleType { CAN_FULL = 0x0U, CAN_BASIC = 0x1U }
 Can Handle Type enum. More...
 
enum  Can_TxRxProcessingType { CAN_TX_RX_PROCESSING_INTERRUPT = 0x0U, CAN_TX_RX_PROCESSING_MIXED = 0x1U, CAN_TX_RX_PROCESSING_POLLING = 0x2U }
 Can Tx/Rx processing enum. More...
 
enum  Can_IrqStatusType {
  CAN_IRQ_NO_INTR_EVENT = 0U, CAN_IRQ_INTR_STUFF_EVENT = 1U, CAN_IRQ_INTR_FORM_EVENT = 2U, CAN_IRQ_INTR_ACK_EVENT = 3U,
  CAN_IRQ_INTR_BIT1_EVENT = 4U, CAN_IRQ_INTR_BIT0_EVENT = 5U, CAN_IRQ_INTR_CRC_EVENT = 6U, CAN_IRQ_INTR_TOO_EVENT = 7U,
  CAN_IRQ_STATUS_READ_FAIL = 8U
}
 CAN IRQ status enum. More...
 

Macros

#define CAN_VARIANT_PRE_COMPILE   (STD_ON)
 CAN Build Variant. Build variants.(i.e Pre Compile,Post Build) More...
 
#define CAN_NUM_CONTROLLER   (3U)
 
#define CAN_NUM_MAILBOXES   (9U)
 
#define CAN_MAX_CONTROLLER   (16U)
 
#define CAN_MAX_MAILBOXES   (64U)
 
#define CAN_ISR_TYPE   (CAN_ISR_CAT1)
 
#define CLK_CAN_FD_FREQ   (80U)
 

Can Driver Configuration SW Version Info

Pre-compile switches for enabling/disabling CAN MCAL APIs

#define CAN_VERSION_INFO_API   (STD_ON)
 
#define CAN_DEV_ERROR_DETECT   (STD_ON)
 
#define CAN_SAFETY_DIAGNOSTIC   (STD_ON)
 
#define CAN_LOOPBACK_ENABLE   (STD_ON)
 
#define CAN_REGISTER_READBACK_API   (STD_ON)
 
#define CAN_WAKEUP_FUNCTIONALITY_API   (STD_OFF)
 
#define CAN_MULTIPLEXED_TRANSMISSION_ENABLE   (STD_ON)
 
#define CAN_INIT_CONFIG_PC   CanConfigSet
 Pre Compile config macro name. More...
 
#define CAN_TX_POLLING   (STD_OFF)
 
#define CAN_RX_POLLING   (STD_OFF)
 
#define CAN_BUSOFF_POLLING   (STD_OFF)
 
#define CAN_WAKEUP_POLLING   (STD_OFF)
 

Can Controller Id names

Defines for symbolic names for the CanControllerIds

#define CanConf_CanController_CanController_0   (0U)
 
#define CanConf_CanController_CanController_1   (1U)
 
#define CanConf_CanController_CanController_2   (2U)
 

Macro Definition Documentation

◆ CAN_VARIANT_PRE_COMPILE

#define CAN_VARIANT_PRE_COMPILE   (STD_ON)

CAN Build Variant. Build variants.(i.e Pre Compile,Post Build)

◆ CAN_VERSION_INFO_API

#define CAN_VERSION_INFO_API   (STD_ON)

Enable/Disable Can_GetVersionInfo()

◆ CAN_DEV_ERROR_DETECT

#define CAN_DEV_ERROR_DETECT   (STD_ON)

Enable/Disable DEV error detection

◆ CAN_SAFETY_DIAGNOSTIC

#define CAN_SAFETY_DIAGNOSTIC   (STD_ON)

Enable/Disable Can Safety Diagnostic

◆ CAN_LOOPBACK_ENABLE

#define CAN_LOOPBACK_ENABLE   (STD_ON)

◆ CAN_REGISTER_READBACK_API

#define CAN_REGISTER_READBACK_API   (STD_ON)

Enable/Disable Can_ConfigRegReadBack()

◆ CAN_WAKEUP_FUNCTIONALITY_API

#define CAN_WAKEUP_FUNCTIONALITY_API   (STD_OFF)

Enable/Disable Can_CheckWakeup()

◆ CAN_MULTIPLEXED_TRANSMISSION_ENABLE

#define CAN_MULTIPLEXED_TRANSMISSION_ENABLE   (STD_ON)

Enable/Disable Multiplexed Transmission

◆ CAN_INIT_CONFIG_PC

#define CAN_INIT_CONFIG_PC   CanConfigSet

Pre Compile config macro name.

◆ CAN_TX_POLLING

#define CAN_TX_POLLING   (STD_OFF)

Enable/Disable Can_MainFunction_Write

◆ CAN_RX_POLLING

#define CAN_RX_POLLING   (STD_OFF)

Enable/Disable Can_MainFunction_Read

◆ CAN_BUSOFF_POLLING

#define CAN_BUSOFF_POLLING   (STD_OFF)

Enable/Disable Can_MainFunction_BusOff

◆ CAN_WAKEUP_POLLING

#define CAN_WAKEUP_POLLING   (STD_OFF)

Enable/Disable Can_MainFunction_Wakeup

◆ CAN_NUM_CONTROLLER

#define CAN_NUM_CONTROLLER   (3U)

Number of controllers defined

◆ CAN_NUM_MAILBOXES

#define CAN_NUM_MAILBOXES   (9U)

Number of mailboxes defined

◆ CAN_MAX_CONTROLLER

#define CAN_MAX_CONTROLLER   (16U)

Max number of controller instances per SOC

◆ CAN_MAX_MAILBOXES

#define CAN_MAX_MAILBOXES   (64U)

Max number of mailboxes per controller

◆ CAN_ISR_TYPE

#define CAN_ISR_TYPE   (CAN_ISR_CAT1)

OSEK Category 1 ISR Type

◆ CLK_CAN_FD_FREQ

#define CLK_CAN_FD_FREQ   (80U)

Clock source frequency CAN FD

◆ CanConf_CanController_CanController_0

#define CanConf_CanController_CanController_0   (0U)

◆ CanConf_CanController_CanController_1

#define CanConf_CanController_CanController_1   (1U)

◆ CanConf_CanController_CanController_2

#define CanConf_CanController_CanController_2   (2U)

Typedef Documentation

◆ CanControllerState_Type

typedef uint8 CanControllerState_Type

Can Controller State enum type.

◆ Can_InterruptMask_Type

typedef uint32 Can_InterruptMask_Type

Can Interrupt Mask type.

Enumeration Type Documentation

◆ Can_MailBoxDirectionType

Can Mailbox direction enum.

Enumerator
CAN_MAILBOX_DIRECTION_RX 

Mailbox is for receive

CAN_MAILBOX_DIRECTION_TX 

Mailbox is for transmit

◆ Can_HandleType

Can Handle Type enum.

Enumerator
CAN_FULL 

For only one L-PDU (identifier) is handled by the hardware object

CAN_BASIC 

For several L-PDUs are handled by the hardware object

◆ Can_TxRxProcessingType

Can Tx/Rx processing enum.

Enumerator
CAN_TX_RX_PROCESSING_INTERRUPT 

Interrupt Mode of operation

CAN_TX_RX_PROCESSING_MIXED 

Mixed Mode of operation

CAN_TX_RX_PROCESSING_POLLING 

Polling Mode of operation

◆ Can_IrqStatusType

CAN IRQ status enum.

Enumerator
CAN_IRQ_NO_INTR_EVENT 

No Interrupt Event occured

CAN_IRQ_INTR_STUFF_EVENT 

Stuff Error Event occured

CAN_IRQ_INTR_FORM_EVENT 

Form Error Event occured

CAN_IRQ_INTR_ACK_EVENT 

Acknowldgement Error Event occured

CAN_IRQ_INTR_BIT1_EVENT 

Bit-1 Error Event occured

CAN_IRQ_INTR_BIT0_EVENT 

Bit-0 Error Event occured

CAN_IRQ_INTR_CRC_EVENT 

Cyclic Redundancy Error Event occured

CAN_IRQ_INTR_TOO_EVENT 

Time Out Error Event occured

CAN_IRQ_STATUS_READ_FAIL 

Interrupt status reading fail