MCUSW
CAN Driver API

Introduction

The Can Driver MCAL provides low level access to onbaord MCAN peripheral present on Device.
The Can Driver implements a standardized interface specified in the AUTOSAR_SWS_CANDriver document.
The Can Driver is part of the Communication Stack in the AUTOSAR Basic Software (BSW)
The CAN Hardware Unit cntrolled by CAN Driver combines one or several CAN controllers,
which may be located on-chip or as external standalone devices of the same type, with common or separate Hardware Objects

See also
Can Configuration

Sub Modules

 Can Configuration
 

Functions

void Can_GetVersionInfo (Std_VersionInfoType *VersionInfo)
 Function returns the version information of this module. More...
 
void Can_Init (const Can_ConfigType *CfgPtr)
 This function initializes the module. More...
 
Std_ReturnType Can_SetControllerMode (uint8 Controller, Can_ControllerStateType Transition)
 This function performs software triggered state transitions of the CAN controller State machine. More...
 
Std_ReturnType Can_Write (Can_HwHandleType Hth, const Can_PduType *PduInfo)
 This function is called by CanIf to pass a CAN message to CanDrv for transmission. More...
 
void Can_DisableControllerInterrupts (uint8 Controller)
 This function disables all interrupts for this CAN controller. More...
 
void Can_EnableControllerInterrupts (uint8 Controller)
 This function enables all allowed interrupts. More...
 
void Can_MainFunction_Write (void)
 This function performs the polling of TX confirmation when CAN_TX_PROCESSING is set to POLLING. More...
 
void Can_MainFunction_BusOff (void)
 This function performs the polling of bus-off events that are configured statically as 'to be polled'. More...
 
void Can_MainFunction_Read (void)
 This function performs the polling of RX indications when CAN_RX_PROCESSING is set to POLLING. More...
 
void Can_MainFunction_Wakeup (void)
 This function performs the polling of wake-up events that are configured statically as 'to be polled'. More...
 
void Can_MainFunction_Mode (void)
 This function performs the polling of CAN controller mode transitions. More...
 
Std_ReturnType Can_SetBaudrate (uint8 Controller, uint16 BaudRateConfigID)
 This service shall set the baud rate configuration of the CAN controller. Depending on necessary baud rate modifications the controller might have to reset. More...
 
Std_ReturnType Can_TestLoopBackModeEnable (uint8 Controller, uint8 Mode)
 This service will enable CAN loopback mode. More...
 
Std_ReturnType Can_TestLoopBackModeDisable (uint8 Controller, uint8 Mode)
 This service will disable CAN loopback mode. More...
 
Std_ReturnType Can_RegisterReadback (VAR(uint8,) Controller, Can_RegisterReadbackType *RegRbPtr)
 This service will readback CAN registers. More...
 
void Can_DeInit (void)
 This function de-initializes the module. More...
 
Std_ReturnType Can_GetControllerMode (uint8 Controller, Can_ControllerStateType *ControllerModePtr)
 This service reports about the current status of the requested CAN controller. More...
 
Std_ReturnType Can_GetControllerErrorState (uint8 ControllerId, Can_ErrorStateType *ErrorStatePtr)
 This service obtains the error state of the CAN controller. More...
 

Macros

#define CAN_SW_PATCH_VERSION   (2U)
 Driver Implementation Patch Version. More...
 
#define CAN_AR_RELEASE_REVISION_VERSION   (1U)
 AUTOSAR Patch version specification implemented by CanDriver. More...
 

Can Driver Module SW Version Info

Defines for CAN Driver version used for compatibility checks

#define CAN_SW_MAJOR_VERSION   (1U)
 Driver Implementation Major Version.Used for version compatibiltiy check. More...
 
#define CAN_SW_MINOR_VERSION   (3U)
 Driver Implementation Minor Version.Used for version compatibiltiy check. More...
 

Can Driver Module AUTOSAR Version Info

Defines for CAN Driver AUTOSAR version used for compatibility checks

#define CAN_AR_RELEASE_MAJOR_VERSION   (4U)
 AUTOSAR Major version specification implemented by CanDriver. More...
 
#define CAN_AR_RELEASE_MINOR_VERSION   (3U)
 AUTOSAR Minor version specification implemented by CanDriver. More...
 

Can Driver ID Info

#define CAN_VENDOR_ID   (44U)
 Texas Instruments Vendor ID. More...
 
#define CAN_MODULE_ID   (80U)
 Can Driver Module ID. More...
 
#define CAN_INSTANCE_ID   (0U)
 CAN Driver Instance ID. More...
 

CAN Driver states.

#define CAN_UNINIT   ((uint8)0U)
 CAN Driver is NOT initialized. More...
 
#define CAN_READY   ((uint8)1U)
 CAN Driver is initialized. More...
 

Can Driver Service Id

The Service Id is one of the argument to Det_ReportError function and is used to identify the source of the error

#define CAN_INIT_ID   (0x00U)
 Can_Init() More...
 
#define CAN_MAINFCT_WRITE_ID   (0x01U)
 Can_MainFunction_Write() More...
 
#define CAN_SETCTR_ID   (0x03U)
 Can_SetControllerMode() More...
 
#define CAN_DIINT_ID   (0x04U)
 Can_DisableControllerInterrupts() More...
 
#define CAN_ENINT_ID   (0x05U)
 Can_EnableControllerInterrupts() More...
 
#define CAN_WRITE_ID   (0x06U)
 Can_Write() More...
 
#define CAN_VERSION_ID   (0x07U)
 Can_GetVersionInfo() More...
 
#define CAN_MAINFCT_READ_ID   (0x08U)
 Can_MainFunction_Read() More...
 
#define CAN_MAINFCT_BO_ID   (0x09U)
 Can_MainFunction_BusOff() More...
 
#define CAN_MAINFCT_WU_ID   (0x0AU)
 Can_MainFunction_Wakeup() More...
 
#define CAN_CKWAKEUP_ID   (0x0BU)
 Can_CheckWakeup() More...
 
#define CAN_MAINFCT_MODE_ID   (0x0CU)
 Can_MainFunction_Mode() More...
 
#define CAN_SETBAUDRATE_ID   (0x0FU)
 Can_SetBaudrate() More...
 
#define CAN_DEINIT_ID   (0x10U)
 Can_DeInit() More...
 
#define CAN_GETCTRERRST_ID   (0x11U)
 Can_GetControllerErrorState() More...
 
#define CAN_GETCTRMODE_ID   (0x12U)
 Can_GetControllerMode() More...
 
#define CAN_LOOPBACK_ID   (0x20U)
 Can_TestLoopBackModeEnable() More...
 
#define CAN_RXPROCESS_ID   (0x21U)
 Can_RxProcess() More...
 

Can Error Codes

Error codes returned by Can functions

#define CAN_E_PARAM_POINTER   (0x01U)
 
#define CAN_E_PARAM_HANDLE   (0x02U)
 ERROR:NULL_PTR passed as parameter. More...
 
#define CAN_E_PARAM_DLC   (0x03U)
 ERROR:Invalid Controller Handle. More...
 
#define CAN_E_PARAM_CONTROLLER   (0x04U)
 ERROR:Invalid length of msg. More...
 
#define CAN_E_UNINIT   (0x05U)
 ERROR:Invalid controller id. More...
 
#define CAN_E_TRANSITION   (0x06U)
 ERROR:Eror due to API invoked without performing Can_Init() More...
 
#define CAN_E_DATALOST   (0x07U)
 ERROR:Eror during Controller state transition. More...
 
#define CAN_E_PARAM_BAUDRATE   (0x08U)
 ERROR:Data lost/dropped. More...
 
#define CAN_E_ICOM_CONFIG_INVALID   (0x09U)
 ERROR:Timeout occured. More...
 
#define CAN_E_INIT_FAILED   (0x0AU)
 ERROR:Invalid Baudrate configuration. More...
 

CAN Config Ids

ERROR:Invalid configuration set selection

The Config Ids used for different CAN Configuration builds

#define CAN_CFG_ID_0   (0x01U)
 Config 0 (All configurations ON) More...
 
#define CAN_CFG_ID_1   (0x02U)
 Config 1 (All configurations OFF). CAN_CFG_ID_1 is used only for compile check. More...
 
#define CAN_CFG_ID_2   (0x04U)
 Config 2 (All configurations ON except DET OFF) More...
 
#define CAN_CFG_ID_3   (0x08U)
 Config 3 (Configurator auto generated file) More...
 
#define CAN_CFG_ID_4   (0x10U)
 Config 4 (Configurator auto generated file MCAN instead of DCAN2 with pre-compile variant ON) More...
 
#define CAN_CFG_ID_5   (0x20U)
 Config 5 (All configurations ON but used only for testing WakeUp by external HW event and Performance tests) More...
 
#define CAN_CFG_ID_6   (0x40U)
 Config 6 (Used for MCAN Testing) More...
 

Macro Definition Documentation

◆ CAN_SW_MAJOR_VERSION

#define CAN_SW_MAJOR_VERSION   (1U)

Driver Implementation Major Version.Used for version compatibiltiy check.

◆ CAN_SW_MINOR_VERSION

#define CAN_SW_MINOR_VERSION   (3U)

Driver Implementation Minor Version.Used for version compatibiltiy check.

◆ CAN_SW_PATCH_VERSION

#define CAN_SW_PATCH_VERSION   (2U)

Driver Implementation Patch Version.

◆ CAN_AR_RELEASE_MAJOR_VERSION

#define CAN_AR_RELEASE_MAJOR_VERSION   (4U)

AUTOSAR Major version specification implemented by CanDriver.

◆ CAN_AR_RELEASE_MINOR_VERSION

#define CAN_AR_RELEASE_MINOR_VERSION   (3U)

AUTOSAR Minor version specification implemented by CanDriver.

◆ CAN_AR_RELEASE_REVISION_VERSION

#define CAN_AR_RELEASE_REVISION_VERSION   (1U)

AUTOSAR Patch version specification implemented by CanDriver.

◆ CAN_VENDOR_ID

#define CAN_VENDOR_ID   (44U)

Texas Instruments Vendor ID.

◆ CAN_MODULE_ID

#define CAN_MODULE_ID   (80U)

Can Driver Module ID.

◆ CAN_INSTANCE_ID

#define CAN_INSTANCE_ID   (0U)

CAN Driver Instance ID.

◆ CAN_UNINIT

#define CAN_UNINIT   ((uint8)0U)

CAN Driver is NOT initialized.

◆ CAN_READY

#define CAN_READY   ((uint8)1U)

CAN Driver is initialized.

◆ CAN_INIT_ID

#define CAN_INIT_ID   (0x00U)

◆ CAN_MAINFCT_WRITE_ID

#define CAN_MAINFCT_WRITE_ID   (0x01U)

◆ CAN_SETCTR_ID

#define CAN_SETCTR_ID   (0x03U)

◆ CAN_DIINT_ID

#define CAN_DIINT_ID   (0x04U)

◆ CAN_ENINT_ID

#define CAN_ENINT_ID   (0x05U)

◆ CAN_WRITE_ID

#define CAN_WRITE_ID   (0x06U)

◆ CAN_VERSION_ID

#define CAN_VERSION_ID   (0x07U)

◆ CAN_MAINFCT_READ_ID

#define CAN_MAINFCT_READ_ID   (0x08U)

◆ CAN_MAINFCT_BO_ID

#define CAN_MAINFCT_BO_ID   (0x09U)

◆ CAN_MAINFCT_WU_ID

#define CAN_MAINFCT_WU_ID   (0x0AU)

◆ CAN_CKWAKEUP_ID

#define CAN_CKWAKEUP_ID   (0x0BU)

Can_CheckWakeup()

◆ CAN_MAINFCT_MODE_ID

#define CAN_MAINFCT_MODE_ID   (0x0CU)

◆ CAN_SETBAUDRATE_ID

#define CAN_SETBAUDRATE_ID   (0x0FU)

◆ CAN_DEINIT_ID

#define CAN_DEINIT_ID   (0x10U)

◆ CAN_GETCTRERRST_ID

#define CAN_GETCTRERRST_ID   (0x11U)

◆ CAN_GETCTRMODE_ID

#define CAN_GETCTRMODE_ID   (0x12U)

◆ CAN_LOOPBACK_ID

#define CAN_LOOPBACK_ID   (0x20U)

◆ CAN_RXPROCESS_ID

#define CAN_RXPROCESS_ID   (0x21U)

Can_RxProcess()

◆ CAN_E_PARAM_POINTER

#define CAN_E_PARAM_POINTER   (0x01U)

◆ CAN_E_PARAM_HANDLE

#define CAN_E_PARAM_HANDLE   (0x02U)

ERROR:NULL_PTR passed as parameter.

◆ CAN_E_PARAM_DLC

#define CAN_E_PARAM_DLC   (0x03U)

ERROR:Invalid Controller Handle.

◆ CAN_E_PARAM_CONTROLLER

#define CAN_E_PARAM_CONTROLLER   (0x04U)

ERROR:Invalid length of msg.

◆ CAN_E_UNINIT

#define CAN_E_UNINIT   (0x05U)

ERROR:Invalid controller id.

◆ CAN_E_TRANSITION

#define CAN_E_TRANSITION   (0x06U)

ERROR:Eror due to API invoked without performing Can_Init()

◆ CAN_E_DATALOST

#define CAN_E_DATALOST   (0x07U)

ERROR:Eror during Controller state transition.

◆ CAN_E_PARAM_BAUDRATE

#define CAN_E_PARAM_BAUDRATE   (0x08U)

ERROR:Data lost/dropped.

◆ CAN_E_ICOM_CONFIG_INVALID

#define CAN_E_ICOM_CONFIG_INVALID   (0x09U)

ERROR:Timeout occured.

◆ CAN_E_INIT_FAILED

#define CAN_E_INIT_FAILED   (0x0AU)

ERROR:Invalid Baudrate configuration.

◆ CAN_CFG_ID_0

#define CAN_CFG_ID_0   (0x01U)

Config 0 (All configurations ON)

◆ CAN_CFG_ID_1

#define CAN_CFG_ID_1   (0x02U)

Config 1 (All configurations OFF). CAN_CFG_ID_1 is used only for compile check.

◆ CAN_CFG_ID_2

#define CAN_CFG_ID_2   (0x04U)

Config 2 (All configurations ON except DET OFF)

◆ CAN_CFG_ID_3

#define CAN_CFG_ID_3   (0x08U)

Config 3 (Configurator auto generated file)

◆ CAN_CFG_ID_4

#define CAN_CFG_ID_4   (0x10U)

Config 4 (Configurator auto generated file MCAN instead of DCAN2 with pre-compile variant ON)

◆ CAN_CFG_ID_5

#define CAN_CFG_ID_5   (0x20U)

Config 5 (All configurations ON but used only for testing WakeUp by external HW event and Performance tests)

◆ CAN_CFG_ID_6

#define CAN_CFG_ID_6   (0x40U)

Config 6 (Used for MCAN Testing)

Function Documentation

◆ Can_GetVersionInfo()

void Can_GetVersionInfo ( Std_VersionInfoType *  VersionInfo)

Function returns the version information of this module.

* Service name    : Can_GetVersionInfo
* Syntax          : void Can_GetVersionInfo(Std_VersionInfoType* versioninfo)
* Mode            : User Mode (Non-Privileged Mode)
* Service ID[hex] : 0x07
* Sync/Async      : Synchronous
* Reentrancy      : Reentrant
* Parameters (in) : None
* Parameters (inout): None
* Parameters (out)  : versioninfo
*                     Pointer to where to store the version information of this
*                     module.
* Return value      : None
* Description       : This function returns the version information of this
*                     module
* 

◆ Can_Init()

void Can_Init ( const Can_ConfigType CfgPtr)

This function initializes the module.

* Service name      : Can_Init
* Syntax            : void Can_Init(const Can_ConfigType* CfgPtr)
* Mode              : Supervisor Mode (Privileged Mode)
* Service ID[hex]   : 0x00
* Sync/Async        : Synchronous
* Reentrancy        : Non Reentrant
* Parameters (in)   : CfgPtr
*                     Pointer to driver configuration.
* Parameters (inout): None
* Parameters (out)  : None
* Return value      : None
* Description       : This function initializes the module.
* 

◆ Can_SetControllerMode()

Std_ReturnType Can_SetControllerMode ( uint8  Controller,
Can_ControllerStateType  Transition 
)

This function performs software triggered state transitions of the CAN controller State machine.

* Service name: Can_SetControllerMode
* Syntax: Std_ReturnType Can_SetControllerMode(uint8 Controller,
*                     Can_ControllerStateType Transition)
* Mode              : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x03
* Sync/Async: Asynchronous
* Reentrancy: Non Reentrant
* Parameters (in): Controller
*                  - CAN controller for which the status shall be changed
*                   Transition
*                  - Transition value to request new CAN controller state
* Parameters (inout): None
* Parameters (out):   None
* Return value: Std_ReturnType
*               - E_OK: request accepted
*               - E_NOT_OK: request not accepted, a development error
*                     occurred
* Description:  This function performs software triggered state transitions of
*                     the CAN controller State machine.
* 

◆ Can_Write()

Std_ReturnType Can_Write ( Can_HwHandleType  Hth,
const Can_PduType *  PduInfo 
)

This function is called by CanIf to pass a CAN message to CanDrv for transmission.

* Service name: Can_Write
* Syntax      : Std_ReturnType Can_Write(Can_HwHandleType Hth, const
*                     Can_PduType* PduInfo)
* Mode              : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x06
* Sync/Async     : Synchronous
* Reentrancy     : Reentrant (thread-safe)
* Parameters (in): Hth
*                  - Information which HW-transmit handle shall be used for
*                    transmit. Implicitly this is also the information about
*                    the controller to use because the Hth numbers are unique
*                    inside one hardware unit.
*                  PduInfo
*                  - Pointer to SDU user memory, DLC and Identifier.
* Parameters (inout): None
* Parameters (out)  : None
* Return value: Std_ReturnType
*               - E_OK: Write command has been accepted
*               - E_NOT_OK: development error occurred
*               - CAN_BUSY: No TX hardware buffer available or pre-emptive call
*                      of Can_Write that can't be implemented re-entrant
* Description: This function is called by CanIf to pass a CAN message to CanDrv
*                     for transmission.
* 

◆ Can_DisableControllerInterrupts()

void Can_DisableControllerInterrupts ( uint8  Controller)

This function disables all interrupts for this CAN controller.

* Service name      : Can_DisableControllerInterrupts
* Syntax            : void Can_DisableControllerInterrupts(uint8 Controller)
* Mode              : Supervisor Mode (Privileged Mode)
* Service ID[hex]   : 0x04
* Sync/Async        : Synchronous
* Reentrancy        : Reentrant
* Parameters (in)   : Controller
*                     - CAN controller for which interrupts shall be disabled.
* Parameters (inout): None
* Parameters (out)  : None
* Return value      : None
* Description       : This function disables all interrupts for this CAN
*                     controller
*
* 

◆ Can_EnableControllerInterrupts()

void Can_EnableControllerInterrupts ( uint8  Controller)

This function enables all allowed interrupts.

* Service name      : Can_EnableControllerInterrupts
* Syntax            : void Can_EnableControllerInterrupts(uint8 Controller)
* Mode              : Supervisor Mode (Privileged Mode)
* Service ID[hex]   : 0x05
* Sync/Async        : Synchronous
* Reentrancy        : Reentrant
* Parameters (in)   : Controller
*                     - CAN controller for which interrupts shall be re-enabled.
* Parameters (inout): None
* Parameters (out)  : None
* Return value      : None
* Description       : This function enables all allowed interrupts
*
* 

◆ Can_MainFunction_Write()

void Can_MainFunction_Write ( void  )

This function performs the polling of TX confirmation when CAN_TX_PROCESSING is set to POLLING.

* Service name   : Can_MainFunction_Write
* Syntax         : void Can_MainFunction_Write(void)
* Mode           : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x01
* Description    : This function performs the polling of TX confirmation when
*                     CAN_TX_PROCESSING is set to POLLING.
*
* 

◆ Can_MainFunction_BusOff()

void Can_MainFunction_BusOff ( void  )

This function performs the polling of bus-off events that are configured statically as 'to be polled'.

* Service name   : Can_MainFunction_BusOff
* Syntax         : void Can_MainFunction_BusOff(void)
* Mode           : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x09
* Description    : This function performs the polling of bus-off events that are
*                     configured statically as 'to be polled'.
*
* 

◆ Can_MainFunction_Read()

void Can_MainFunction_Read ( void  )

This function performs the polling of RX indications when CAN_RX_PROCESSING is set to POLLING.

* Service name   : Can_MainFunction_Read
* Syntax         : void Can_MainFunction_Read(void)
* Mode           : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x08
* Description    : This function performs the polling of RX indications when
*                     CAN_RX_PROCESSING is set to POLLING.
*
* 

◆ Can_MainFunction_Wakeup()

void Can_MainFunction_Wakeup ( void  )

This function performs the polling of wake-up events that are configured statically as 'to be polled'.

* Service name   : Can_MainFunction_Wakeup
* Syntax         : void Can_MainFunction_Wakeup(void)
* Mode           : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x0A
* Description    : This function performs the polling of wake-up events that are
*                     configured statically as 'to be polled'.
*
* 

◆ Can_MainFunction_Mode()

void Can_MainFunction_Mode ( void  )

This function performs the polling of CAN controller mode transitions.

* Service name   : Can_MainFunction_Mode
* Syntax         : void Can_MainFunction_Mode(void)
* Mode           : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x0C
* Description    : This function performs the polling of CAN controller mode
*                     transitions.
*
* 

◆ Can_SetBaudrate()

Std_ReturnType Can_SetBaudrate ( uint8  Controller,
uint16  BaudRateConfigID 
)

This service shall set the baud rate configuration of the CAN controller. Depending on necessary baud rate modifications the controller might have to reset.

*
*  Function name     : Can_SetBaudrate
*  Syntax            : FUNC(Std_ReturnType, CAN_CODE) Can_SetBaudrate(uint8
*                           Controller, uint16 BaudRateConfigID)
*  Mode              : Supervisor Mode (Privileged Mode)
*  Service ID[hex]   : 0x0f
*  Sync/Async        : Synchronous
*  Reentrancy        : Reentrant for different Controllers.
*                      Non reentrant for the same Controller.
*  Parameters (in)   : None
*  Parameters (inout): None
*  Parameters (out)  : None
*  Return value      : None
*  Description       : This service shall set the baud rate configuration
*                      of the CAN controller. Depending on necessary baud rate
*                      modifications the controller might have to reset.
*
* 

◆ Can_TestLoopBackModeEnable()

Std_ReturnType Can_TestLoopBackModeEnable ( uint8  Controller,
uint8  Mode 
)

This service will enable CAN loopback mode.

*
*  Service name      : Can_TestLoopBackModeEnable
*  Syntax            : Std_ReturnType Can_TestLoopBackModeEnable(uint8
*                      Controller, uint8 mode)
*  Mode              : Supervisor Mode (Privileged Mode)
*  Service ID[hex]   : N/A
*  Sync/Async        : Synchronous
*  Reentrancy        : Reentrant
*  Parameters (in)   : Controller
*                      - CAN Controller to enable loopback mode
*                      mode
*                      - Loopback mode
*                      -# 0 - Digital Loopback
*                      -# 1 - Analog  Loopback
*  Parameters (inout): None
*  Parameters (out)  : None
*  Return value      : Std_ReturnType
*                      - E_OK: Baudrate supported by the CAN Controller
*                      - E_NOT_OK: Baudrate not supported / invalid CAN
*  Description       : This service will enable CAN loopback mode.
* 

◆ Can_TestLoopBackModeDisable()

Std_ReturnType Can_TestLoopBackModeDisable ( uint8  Controller,
uint8  Mode 
)

This service will disable CAN loopback mode.

*
*  Service name      : Can_TestLoopBackModeDisable
*  Syntax            : Std_ReturnType Can_TestLoopBackModeDisable(uint8
*                      Controller, uint8 Mode)
*  Mode              : Supervisor Mode (Privileged Mode)
*  Service ID[hex]   : N/A
*  Sync/Async        : Synchronous
*  Reentrancy        : Reentrant
*  Parameters (in)   : Controller
*                      - CAN Controller to enable loopback mode
*                      mode
*                      Loopback mode
*                      -# 0 - Digital Loopback
*                      -# 1 - Analog  Loopback
*  Parameters (inout): None
*  Parameters (out)  : None
*  Return value      : Std_ReturnType
*                      - E_OK: Loopback mode enabled in the CAN Controller
*                      - E_NOT_OK: Loopback mode enable failed
*  Description       : This service will disable CAN loopback mode.
* 

◆ Can_RegisterReadback()

Std_ReturnType Can_RegisterReadback ( VAR(uint8,)  Controller,
Can_RegisterReadbackType RegRbPtr 
)

This service will readback CAN registers.

*
*  Service name      : Can_RegisterReadback
*  Syntax            : Std_ReturnType Can_RegisterReadback(uint8 Controller)
*  Mode              : Supervisor Mode (Privileged Mode)
*  Service ID[hex]   : N/A
*  Sync/Async        : Synchronous
*  Reentrancy        : Reentrant
*  Parameters (in)   : Controller
*                      - CAN Controller to readback registers from
*  Parameters (inout): RegRbPtr - Pointer to where to store the readback
*                      values. If this pointer is NULL_PTR, then the API
*                      will return E_NOT_OK.
*  Parameters (out)  : None
*  Return value      : Std_ReturnType
*                      - E_OK: Loopback mode disabled in the CAN Controller
*                      - E_NOT_OK: Loopback mode disable failed
*  Description       : This service will disable CAN loopback mode.
* 

◆ Can_DeInit()

void Can_DeInit ( void  )

This function de-initializes the module.

*  Service name      : Can_DeInit
*  Syntax            : void Can_DeInit(void)
*  Mode              : Supervisor Mode (Privileged Mode)
*  Sync/Async        : Synchronous
*  Reentrancy        : Non-Reentrant
*  Parameters (in)   : None
*  Parameters (inout): None
*  Parameters (out)  : None
*  Return value      : None
*  Description       : This function de-initializes the module.
*  

◆ Can_GetControllerMode()

Std_ReturnType Can_GetControllerMode ( uint8  Controller,
Can_ControllerStateType *  ControllerModePtr 
)

This service reports about the current status of the requested CAN controller.

* Service name: Can_GetControllerMode
* Syntax: Std_ReturnType Can_GetControllerMode(uint8 Controller,
*                     Can_ControllerStateType* ControllerModePtr)
* Mode            : User Mode (Non-Privileged Mode)
* Service ID[hex]: 0x12
* Sync/Async: Synchronous
* Reentrancy: Non Reentrant
* Parameters (in): Controller
*                  - CAN controller for which the status shall be changed
* Parameters (out): ControllerModePtr
*                  - Pointer to a memory location,
*                    where the current mode of the CAN controller will be stored.
* Parameters (inout):  None
* Return value: Std_ReturnType
*               - E_OK: request accepted
*               - E_NOT_OK: request not accepted.
* Description:  This service reports about the current status of the requested
*               CAN controller.
* 

◆ Can_GetControllerErrorState()

Std_ReturnType Can_GetControllerErrorState ( uint8  ControllerId,
Can_ErrorStateType *  ErrorStatePtr 
)

This service obtains the error state of the CAN controller.

* Service name: Can_GetControllerErrorState
* Syntax: Std_ReturnType Can_GetControllerErrorState(uint8 Controller,
*                     Can_ErrorStateType* ErrorStatePtr)
* Mode           : Supervisor Mode (Privileged Mode)
* Service ID[hex]: 0x11
* Sync/Async: Synchronous
* Reentrancy: Non Reentrant
* Parameters (in): Controller
*                  - CAN controller for which the status shall be changed
* Parameters (out): ErrorStatePtr
*                  - Pointer to a memory location,
*                    where the error state of the CAN controller will be stored.
* Parameters (inout):  None
* Return value: Std_ReturnType
*               - E_OK: request accepted
*               - E_NOT_OK: request not accepted
* Description:  This service obtains the error state of the CAN controller.
*