MCUSW
|
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
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... | |
Std_ReturnType | Can_EnableIntr (VAR(uint8,) Controller, VAR(uint8,) CanErrVar) |
This service will Enable the interrupts. More... | |
Std_ReturnType | Can_DisableIntr (VAR(uint8,) Controller, VAR(uint8,) CanErrVar) |
This service will Disable the Interrupts. More... | |
Can_IrqStatusType | Can_GetIntrStatus (VAR(uint8,) Controller) |
This service will provide the status of the interrupt. More... | |
Std_ReturnType | Can_ClearIntrStatus (VAR(uint8,) Controller) |
This service will clear the interrupt status. More... | |
void | Can_IntISR_Fun (Can_ControllerInstance CanInstanceID) |
This function is the ISR for CAN controller 0/INT 0. More... | |
void | Can_IntISR_Function (Can_ControllerInstance CanInstanceID, uint32 baseAddr) |
This function is the ISR for CAN controller 0/INT 0. 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 (0U) |
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 (9U) |
Driver Implementation Major Version.Used for version compatibiltiy check. More... | |
#define | CAN_SW_MINOR_VERSION (1U) |
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 Error Codes | |
#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... | |
CanIdType. | |
#define | MIXED_MODE_MB_ID (2U) |
Mixed Mode MB Id type. More... | |
Can Error Types | |
#define | MCAN_ERR_TYPE_PEA_ERROR (1U) |
ERROR:Protocol Error in Arbitration Phase. More... | |
#define | MCAN_ERR_TYPE_TOO_ERROR (2U) |
ERROR:Time out Error. More... | |
#define | MCAN_LSB_BIT_SET (1U) |
Check lsb bit Set or not. More... | |
#define CAN_SW_MAJOR_VERSION (9U) |
Driver Implementation Major Version.Used for version compatibiltiy check.
#define CAN_SW_MINOR_VERSION (1U) |
Driver Implementation Minor Version.Used for version compatibiltiy check.
#define CAN_SW_PATCH_VERSION (0U) |
Driver Implementation Patch Version.
#define CAN_AR_RELEASE_MAJOR_VERSION (4U) |
AUTOSAR Major version specification implemented by CanDriver.
#define CAN_AR_RELEASE_MINOR_VERSION (3U) |
AUTOSAR Minor version specification implemented by CanDriver.
#define CAN_AR_RELEASE_REVISION_VERSION (1U) |
AUTOSAR Patch version specification implemented by CanDriver.
#define CAN_VENDOR_ID (44U) |
Texas Instruments Vendor ID.
#define CAN_MODULE_ID (80U) |
Can Driver Module ID.
#define CAN_INSTANCE_ID (0U) |
CAN Driver Instance ID.
#define CAN_UNINIT ((uint8)0U) |
CAN Driver is NOT initialized.
#define CAN_READY ((uint8)1U) |
CAN Driver is initialized.
#define CAN_INIT_ID (0x00U) |
#define CAN_MAINFCT_WRITE_ID (0x01U) |
#define CAN_SETCTR_ID (0x03U) |
#define CAN_DIINT_ID (0x04U) |
#define CAN_ENINT_ID (0x05U) |
#define CAN_WRITE_ID (0x06U) |
#define CAN_VERSION_ID (0x07U) |
#define CAN_MAINFCT_READ_ID (0x08U) |
#define CAN_MAINFCT_BO_ID (0x09U) |
#define CAN_MAINFCT_WU_ID (0x0AU) |
#define CAN_CKWAKEUP_ID (0x0BU) |
Can_CheckWakeup()
#define CAN_MAINFCT_MODE_ID (0x0CU) |
#define CAN_SETBAUDRATE_ID (0x0FU) |
#define CAN_DEINIT_ID (0x10U) |
#define CAN_GETCTRERRST_ID (0x11U) |
#define CAN_GETCTRMODE_ID (0x12U) |
#define CAN_LOOPBACK_ID (0x20U) |
#define CAN_RXPROCESS_ID (0x21U) |
Can_RxProcess()
#define CAN_E_PARAM_POINTER (0x01U) |
#define CAN_E_PARAM_HANDLE (0x02U) |
ERROR:NULL_PTR passed as parameter.
#define CAN_E_PARAM_DLC (0x03U) |
ERROR:Invalid Controller Handle.
#define CAN_E_PARAM_CONTROLLER (0x04U) |
ERROR:Invalid length of msg.
#define CAN_E_UNINIT (0x05U) |
ERROR:Invalid controller id.
#define CAN_E_TRANSITION (0x06U) |
ERROR:Eror due to API invoked without performing Can_Init()
#define CAN_E_DATALOST (0x07U) |
ERROR:Eror during Controller state transition.
#define CAN_E_PARAM_BAUDRATE (0x08U) |
ERROR:Data lost/dropped.
#define CAN_E_ICOM_CONFIG_INVALID (0x09U) |
ERROR:Timeout occured.
#define CAN_E_INIT_FAILED (0x0AU) |
ERROR:Invalid Baudrate configuration.
#define CAN_CFG_ID_0 (0x01U) |
Config 0 (All configurations ON)
#define CAN_CFG_ID_1 (0x02U) |
Config 1 (All configurations OFF). CAN_CFG_ID_1 is used only for compile check.
#define CAN_CFG_ID_2 (0x04U) |
Config 2 (All configurations ON except DET OFF)
#define CAN_CFG_ID_3 (0x08U) |
Config 3 (Configurator auto generated file)
#define CAN_CFG_ID_4 (0x10U) |
Config 4 (Configurator auto generated file MCAN instead of DCAN2 with pre-compile variant ON)
#define CAN_CFG_ID_5 (0x20U) |
Config 5 (All configurations ON but used only for testing WakeUp by external HW event and Performance tests)
#define CAN_CFG_ID_6 (0x40U) |
Config 6 (Used for MCAN Testing)
#define MIXED_MODE_MB_ID (2U) |
Mixed Mode MB Id type.
#define MCAN_ERR_TYPE_PEA_ERROR (1U) |
ERROR:Protocol Error in Arbitration Phase.
#define MCAN_ERR_TYPE_TOO_ERROR (2U) |
ERROR:Time out Error.
#define MCAN_LSB_BIT_SET (1U) |
Check lsb bit Set or not.
\ local macro.
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 *
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. *
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. *
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. *
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 * *
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 * *
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. * *
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'. * *
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. * *
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'. * *
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. * *
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. * *
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. *
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. *
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 configuration. * 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: Register readback successful. * - E_NOT_OK: Register readback failed. * Description : This service will readback CAN registers. *
This service will Enable the interrupts.
* * Service name : Can_EnableIntr * Syntax : Std_ReturnType Can_EnableIntr( * VAR(uint8, AUTOMATIC)Controller, * VAR(uint8, AUTOMATIC)CanErrVar); * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : N/A * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : Controller * - Controller for which interrupt errors has * to be enabled. * - CanErrVar - CAN Error Type. * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * - E_OK: Enabling Interrupts is success. * - E_NOT_OK: Enabling Interrupts failed. * Description : This service will Enable the interrupts. *
This service will Disable the Interrupts.
* * Service name : Can_DisableIntr * Syntax : Std_ReturnType Can_DisableIntr( * VAR(uint8, AUTOMATIC)Controller, * VAR(uint8, AUTOMATIC)CanErrVar) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : N/A * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : Controller * - Controller for which interrupt errors has to * be Disabled. * - CanErrVar - CAN Error Type. * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * - E_OK: Disabling Interrupts is success. * - E_NOT_OK: Disabling Interrupts failed. * Description : This service will Disable the Interrupts. *
Can_IrqStatusType Can_GetIntrStatus | ( | VAR(uint8,) | Controller | ) |
This service will provide the status of the interrupt.
* * Service name : Can_GetIntrStatus * Syntax : Can_IrqStatusType Can_GetIntrStatus( * VAR(uint8, AUTOMATIC)Controller) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : N/A * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : Controller * - Controller for which it reads the interrupt error * status. * Parameters (inout): None * Parameters (out) : None * Return value : Can_IrqStatusType * - 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: ACK Error Event occured. * - CAN_IRQ_INTR_BIT1_EVENT: BIT1 Error Event occured. * - CAN_IRQ_INTR_BIT0_EVENT: BIT0` Error Event occured. * - CAN_IRQ_INTR_CRC_EVENT: CRC Error Event occured. * - CAN_IRQ_INTR_TOO_EVENT: TOO Error Event occured. * - CAN_IRQ_STATUS_READ_FAIL: Interrupt status read fail. * Description : This service will provide the status of the interrupt. *
Std_ReturnType Can_ClearIntrStatus | ( | VAR(uint8,) | Controller | ) |
This service will clear the interrupt status.
* * Service name : Can_ClearIntrStatus * Syntax : Std_ReturnType Can_ClearIntrStatus( * VAR(uint8, AUTOMATIC)Controller) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : N/A * Sync/Async : Synchronous * Reentrancy : Reentrant * Parameters (in) : Controller * - Controller for which it clears the interrupt * error status. * Parameters (inout): None * Parameters (out) : None * Return value : Std_ReturnType * - E_OK: Clearing Interrupt Status is Success. * - E_NOT_OK: Clearing Interrupt Status Failed. * Description : This service will clear the interrupt status. *
void Can_IntISR_Fun | ( | Can_ControllerInstance | CanInstanceID | ) |
This function is the ISR for CAN controller 0/INT 0.
* * Function name : Can_IntISR_Fun * Syntax : void Can_IntISR_Fun(Can_ControllerInstance CanInstanceID) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : N/A * Sync/Async : Synchronous * Reentrancy : Non-Reentrant * Parameters (in) : None * Parameters (inout): None * Parameters (out) : None * Return value : None * Description : This function is the ISR for CAN controller 0/INT 0 <br> * This function should be invoked either by OS Interrupt * frame handler <br> * CAN Interrupt frame handler for Category 1 ISR *
void Can_IntISR_Function | ( | Can_ControllerInstance | CanInstanceID, |
uint32 | baseAddr | ||
) |
This function is the ISR for CAN controller 0/INT 0.
* * Function name : Can_IntISR_Fun * Syntax : void Can_IntISR_Fun(Can_ControllerInstance CanInstanceID) * Mode : Supervisor Mode (Privileged Mode) * Service ID[hex] : N/A * Sync/Async : Synchronous * Reentrancy : Non-Reentrant * Parameters (in) : None * Parameters (inout): None * Parameters (out) : None * Return value : None * Description : This function is the ISR for CAN controller 0/INT 0 <br> * This function should be invoked either by OS Interrupt * frame handler <br> * CAN Interrupt frame handler for Category 1 ISR *
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. *
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. *
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. *