![]() |
MCUSW
|
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... | |
Macros | |
#define | CAN_VARIANT_PRE_COMPILE (STD_ON) |
CAN Build Variant. Build variants.(i.e Pre Compile,Post Build) | |
Can Error Types | |
Error Types returned by Can functions | |
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... | |
typedef uint8 | CanControllerState_Type |
Can Controller State enum type. | |
typedef uint32 | Can_InterruptMask_Type |
Can Interrupt Mask type. | |
void | Can_GetVersionInfo (Std_VersionInfoType *VersionInfo) |
Function returns the version information of this module. | |
void | Can_Init (const Can_ConfigType *CfgPtr) |
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. | |
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. | |
void | Can_DisableControllerInterrupts (uint8 Controller) |
This function disables all interrupts for this CAN controller. | |
void | Can_EnableControllerInterrupts (uint8 Controller) |
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. | |
void | Can_MainFunction_BusOff (void) |
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. | |
void | Can_MainFunction_Wakeup (void) |
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. | |
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. | |
Std_ReturnType | Can_TestLoopBackModeEnable (uint8 Controller, uint8 Mode) |
This service will enable CAN loopback mode. | |
Std_ReturnType | Can_TestLoopBackModeDisable (uint8 Controller, uint8 Mode) |
This service will disable CAN loopback mode. | |
Std_ReturnType | Can_RegisterReadback (VAR(uint8,) Controller, Can_RegisterReadbackType *RegRbPtr) |
This service will readback CAN registers. | |
Std_ReturnType | Can_EnableIntr (VAR(uint8,) Controller, VAR(uint8,) CanErrVar) |
This service will Enable the interrupts. | |
Std_ReturnType | Can_DisableIntr (VAR(uint8,) Controller, VAR(uint8,) CanErrVar) |
This service will Disable the Interrupts. | |
Can_IrqStatusType | Can_GetIntrStatus (VAR(uint8,) Controller) |
This service will provide the status of the interrupt. | |
Std_ReturnType | Can_ClearIntrStatus (VAR(uint8,) Controller) |
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. | |
void | Can_DeInit (void) |
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. | |
Std_ReturnType | Can_GetControllerErrorState (uint8 ControllerId, Can_ErrorStateType *ErrorStatePtr) |
This service obtains the error state of the CAN controller. | |
CAN DEM Error codes to report | |
Pre-compile switches for enabling/disabling DEM events | |
enum | Can_ControllerInstance { CAN_CONTROLLER_INSTANCE_MCU_MCAN0 = 0U , CAN_CONTROLLER_INSTANCE_MCU_MCAN1 = 1U , CAN_CONTROLLER_INSTANCE_MCAN0 = 2U } |
Can Controller Instances enum. More... | |
const struct Can_ConfigType_s | CanConfigSet |
CAN Configuration struct declaration. | |
const struct Can_ControllerStruct_PC | CanConfigSet_PC_CanController_0 |
CAN Controller Configuration Pre Compile struct declaration. | |
const struct Can_ControllerStruct_PC | CanConfigSet_PC_CanController_1 |
CAN Controller Configuration Pre Compile struct declaration. | |
const struct Can_ControllerStruct_PC | CanConfigSet_PC_CanController_2 |
CAN Controller Configuration Pre Compile struct declaration. | |
const struct Can_ControllerStruct_PC * | CanConfigSet_CanController_List_PC [CAN_NUM_CONTROLLER] |
CAN Controller Pre Compile Configuration List. | |
const struct Can_MailboxStruct_PC * | CanConfigSet_CanHardwareObject_List_PC [CAN_NUM_MAILBOXES] |
CAN Mailbox Pre Compile Configuration List. | |
const uint32 | Can_MsgmemRAMBaseAddr [CAN_MAX_CONTROLLER] |
Base Address of the can peripherals. | |
const uint32 | Can_MCANSSBaseAddr [CAN_MAX_CONTROLLER] |
const uint32 | Can_MCANCoreRegBaseAddr [CAN_MAX_CONTROLLER] |
const uint32 | Can_MCANECCAggrRegBaseAddr [CAN_MAX_CONTROLLER] |
void | Can_0_Int0ISR (void) |
MCU_MCAN0 Controller Instance ISR. | |
void | Can_1_Int0ISR (void) |
MCU_MCAN1 Controller Instance ISR. | |
void | Can_2_Int0ISR (void) |
MCAN0 Controller Instance ISR. | |
#define | CAN_E_HARDWARE_ERROR (DemConf_DemEventParameter_CAN_E_HARDWARE_ERROR) |
Hardware failed. | |
CAN Driver ISR category level | |
Defines for CAN Driver ISR ISR category level | |
#define | CAN_ISR_VOID (0x00U) |
void ISR type | |
#define | CAN_ISR_CAT1 (0x01U) |
Category 1 ISR type. | |
#define | CAN_ISR_CAT2 (0x02U) |
Category 2 ISR type. | |
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_SET_BAUDRATE_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. | |
#define | CAN_TX_POLLING (STD_OFF) |
#define | CAN_RX_POLLING (STD_OFF) |
#define | CAN_BUSOFF_POLLING (STD_OFF) |
#define | CAN_WAKEUP_POLLING (STD_OFF) |
#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 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) |
#define | CAN_CONTROLLER_MCU_MCAN0 |
#define | CAN_CONTROLLER_MCU_MCAN1 |
#define | CAN_CONTROLLER_MCAN0 |
#define CAN_VARIANT_PRE_COMPILE (STD_ON) |
CAN Build Variant. Build variants.(i.e Pre Compile,Post Build)
#define CAN_ISR_VOID (0x00U) |
void ISR type
#define CAN_ISR_CAT1 (0x01U) |
Category 1 ISR type.
#define CAN_ISR_CAT2 (0x02U) |
Category 2 ISR type.
#define CAN_VERSION_INFO_API (STD_ON) |
Enable/Disable Can_GetVersionInfo()
#define CAN_DEV_ERROR_DETECT (STD_ON) |
Enable/Disable DEV error detection
#define CAN_SAFETY_DIAGNOSTIC (STD_ON) |
Enable/Disable Can Safety Diagnostic
#define CAN_LOOPBACK_ENABLE (STD_ON) |
Enable/Disable Can_TestLoopBackModeEnable()
#define CAN_REGISTER_READBACK_API (STD_ON) |
Enable/Disable Can_ConfigRegReadBack()
#define CAN_SET_BAUDRATE_API (STD_ON) |
Enable/Disable Can_SetBaudrate() API
#define CAN_WAKEUP_FUNCTIONALITY_API (STD_OFF) |
Enable/Disable Can_CheckWakeup()
#define CAN_MULTIPLEXED_TRANSMISSION_ENABLE (STD_ON) |
Enable/Disable Multiplexed Transmission
#define CAN_INIT_CONFIG_PC CanConfigSet |
Pre Compile config macro name.
#define CAN_TX_POLLING (STD_OFF) |
Enable/Disable Can_MainFunction_Write
#define CAN_RX_POLLING (STD_OFF) |
Enable/Disable Can_MainFunction_Read
#define CAN_BUSOFF_POLLING (STD_OFF) |
Enable/Disable Can_MainFunction_BusOff
#define CAN_WAKEUP_POLLING (STD_OFF) |
Enable/Disable Can_MainFunction_Wakeup
#define CAN_NUM_CONTROLLER (3U) |
Number of controllers defined
#define CAN_NUM_MAILBOXES (9U) |
Number of mailboxes defined
#define CAN_MAX_CONTROLLER (16U) |
Max number of controller instances per SOC
#define CAN_MAX_MAILBOXES (64U) |
Max number of mailboxes per controller
#define CAN_ISR_TYPE (CAN_ISR_CAT1) |
OSEK Category 1 ISR Type
#define CLK_CAN_FD_FREQ (80U) |
Clock source frequency CAN FD
#define CanConf_CanController_CanController_0 (0U) |
#define CanConf_CanController_CanController_1 (1U) |
#define CanConf_CanController_CanController_2 (2U) |
#define CAN_CONTROLLER_MCU_MCAN0 |
MCU_MCAN0 CONTROLLER INSTANCE
#define CAN_CONTROLLER_MCU_MCAN1 |
MCU_MCAN1 CONTROLLER INSTANCE
#define CAN_CONTROLLER_MCAN0 |
MCAN0 CONTROLLER INSTANCE
#define CanConf_CanHardwareObject_CanHardwareObject_0 (0U) |
#define CAN_HTRH_0 (CanConf_CanHardwareObject_CanHardwareObject_0) |
#define CanConf_CanHardwareObject_CanHardwareObject_1 (1U) |
#define CAN_HTRH_1 (CanConf_CanHardwareObject_CanHardwareObject_1) |
#define CanConf_CanHardwareObject_CanHardwareObject_2 (2U) |
#define CAN_HTRH_2 (CanConf_CanHardwareObject_CanHardwareObject_2) |
#define CanConf_CanHardwareObject_CanHardwareObject_3 (3U) |
#define CAN_HTRH_3 (CanConf_CanHardwareObject_CanHardwareObject_3) |
#define CanConf_CanHardwareObject_CanHardwareObject_4 (4U) |
#define CAN_HTRH_4 (CanConf_CanHardwareObject_CanHardwareObject_4) |
#define CanConf_CanHardwareObject_CanHardwareObject_5 (5U) |
#define CAN_HTRH_5 (CanConf_CanHardwareObject_CanHardwareObject_5) |
#define CanConf_CanHardwareObject_CanHardwareObject_6 (6U) |
#define CAN_HTRH_6 (CanConf_CanHardwareObject_CanHardwareObject_6) |
#define CanConf_CanHardwareObject_CanHardwareObject_7 (7U) |
#define CAN_HTRH_7 (CanConf_CanHardwareObject_CanHardwareObject_7) |
#define CanConf_CanHardwareObject_CanHardwareObject_8 (8U) |
#define CAN_HTRH_8 (CanConf_CanHardwareObject_CanHardwareObject_8) |
#define CAN_OS_COUNTER_ID ((CounterType)OsCounter_0) |
Counter ID for counter used to count wait ticks.
#define CAN_TIMEOUT_DURATION (10000U) |
CAN timeout - used in CAN IFCMD busy wait and Start/Stop busy wait. Specifies the maximum time for blocking function until a timeout is detected. Unit is milli seconds.
#define CAN_E_HARDWARE_ERROR (DemConf_DemEventParameter_CAN_E_HARDWARE_ERROR) |
Hardware failed.
typedef uint8 CanControllerState_Type |
Can Controller State enum type.
typedef uint32 Can_InterruptMask_Type |
Can Interrupt Mask type.
enum Can_HandleType |
enum Can_IrqStatusType |
CAN IRQ status enum.
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_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. *
void Can_0_Int0ISR | ( | void | ) |
MCU_MCAN0 Controller Instance ISR.
void Can_1_Int0ISR | ( | void | ) |
MCU_MCAN1 Controller Instance ISR.
void Can_2_Int0ISR | ( | void | ) |
MCAN0 Controller Instance ISR.
uint32 Can_MaskType::MaskValue |
Filter mask value.
Can_IdType Can_HwFilterType::IDValue |
ID value extended will have MSB set
uint32 Can_HwFilterType::Mask |
Mask for the RX filtering
uint16 Can_FdBaudConfigType::Baud |
In Kbps
uint8 Can_FdBaudConfigType::PropSeg |
Prop Segment value
uint8 Can_FdBaudConfigType::Pseg1 |
Phase Segment 1
uint8 Can_FdBaudConfigType::Pseg2 |
Phase Segment 2
uint8 Can_FdBaudConfigType::Sjw |
Sync jump width
uint16 Can_FdBaudConfigType::TimingValues |
Sum of all timing parameters *
uint16 Can_FdBaudConfigType::BrpValue |
Controller BRP value for Baud
uint16 Can_FdBaudConfigType::TrcvCompDelay |
Specifies the Transceiver Delay Compensation Offset in ns
boolean Can_FdBaudConfigType::BrsSwitch |
Specifies if the bit rate switching shall be used for transmissions.
uint16 Can_BaudConfigType::Baud |
In Kbps
uint8 Can_BaudConfigType::PropSeg |
Prop Segment value
uint8 Can_BaudConfigType::Pseg1 |
Phase Segment 1
uint8 Can_BaudConfigType::Pseg2 |
Phase Segment 2
uint8 Can_BaudConfigType::Sjw |
Sync jump width
uint16 Can_BaudConfigType::TimingValues |
Sum of all timing parameters
uint16 Can_BaudConfigType::BrpValue |
Controller BRP value for Baud
Can_FdBaudConfigType Can_BaudConfigType::BaudFdRateConfig |
List of available Data phase Baud rates for CAN FD
Can_BaudConfigType* Can_ControllerType::DefaultBaud |
pointer to default Baud structure
Can_BaudConfigType** Can_ControllerType::BaudRateConfigList |
List of available Baud rates
uint8 Can_ControllerType_PC::ControllerId |
Id as provided by GUI
boolean Can_ControllerType_PC::CntrActive |
Contoller is used=1 or not_used=0
uint32 Can_ControllerType_PC::CntrAddr |
Pointer to CanReg structure
Can_TxRxProcessingType Can_ControllerType_PC::RxProcessingType |
Type can be Interrupt, Polling or Mixed
Can_TxRxProcessingType Can_ControllerType_PC::TxProcessingType |
Type can be Interrupt, Polling or Mixed
boolean Can_ControllerType_PC::BusOffProcessingInterrupt |
TRUE = Interrupt FALSE = Polling
Can_ControllerInstance Can_ControllerType_PC::CanControllerInst |
Can Controller Instance
boolean Can_ControllerType_PC::CanFDModeEnabled |
Controller is in CAN FD Mode or not
uint8 Can_MailboxType::CanHandleType |
CanHandleType 0=Full, *1=Basic
uint32 Can_MailboxType::MBIdType |
CanIdType 0=standard 1=Extended 2= Mixed
Can_HwHandleType Can_MailboxType::HwHandle |
Mailbox - Hw object in the controller
uint32 Can_MailboxType::CanHwObjectCount |
Number of hardware objects used to implement one HOH
Can_MailBoxDirectionType Can_MailboxType::MBDir |
CanObjectType - Direction of Mailbox
const Can_ControllerType_PC* Can_MailboxType::Controller |
Reference to CAN Controller to which the HOH is associated to.
Can_HwFilterType** Can_MailboxType::HwFilterList |
List of HW Filter
uint32 Can_MailboxType::HwFilterCnt |
HW Filter Count
uint8 Can_MailboxType::CanFdPaddingValue |
If PduInfo->SduLength does not match possible DLC values CanDrv will use the next higher valid DLC for transmission with initialization of unused bytes to the value of the corresponding CanFdPaddingValue.
boolean Can_MailboxType::CanHardwareObjectUsesPolling |
TRUE = Polling, FALSE = Interrupt
uint16 Can_MailboxType_PC::CanObjectId |
CanObjectId - Holds handle Id
uint32 Can_DmaPrms::Reserved |
Reserved for Future use, currently unused parameter
Can_ControllerType** Can_ConfigType::CanControllerList |
List of enabled Controllers
uint8 Can_ConfigType::CanMaxControllerCount |
MaxCount of Controller in Controller List
Can_MailboxType** Can_ConfigType::MailBoxList |
MB array for all controllers
uint32 Can_ConfigType::MaxMbCnt |
MaxMbCount in MB list in all controller
uint32 Can_ConfigType::MaxBaudConfigID[CAN_MAX_CONTROLLER] |
Max Baud Config Index in BaudRateConfigList in all controller
Can_DmaPrms* Can_ConfigType::DmaPrms |
Reserved for Future use, currently unused parameter
uint32 Can_RegisterReadbackType::CanReadBackRegPID |
MCANSS PID Register
uint32 Can_RegisterReadbackType::CanReadBackRegSTAT |
MCANSS STAT Register
uint32 Can_RegisterReadbackType::CanReadBackRegCREL |
Auto Bus On Time Register
uint32 Can_RegisterReadbackType::CanReadBackRegENDN |
Endianess MCAN_TEST value Constant "0x8765 4321"
uint32 Can_RegisterReadbackType::CanReadBackRegCTRL |
MCAN CTRL Register
uint32 Can_RegisterReadbackType::CanReadBackRegDBTP |
MCAN DBTB Register
uint32 Can_RegisterReadbackType::CanReadBackRegRWD |
MCAN RWD Register
uint32 Can_RegisterReadbackType::CanReadBackRegCCCR |
MCAN CCCR Register
uint32 Can_RegisterReadbackType::CanReadBackRegNBTP |
MCAN NBTP Register
uint32 Can_RegisterReadbackType::CanReadBackRegTDCR |
MCAN TDCR Register
uint32 Can_RegisterReadbackType::CanReadBackRegGFC |
MCAN GFC Register
uint32 Can_RegisterReadbackType::CanReadBackRegSIDFC |
MCAN SIDFC Register
uint32 Can_RegisterReadbackType::CanReadBackRegXIDFC |
MCAN XIDFC Register
uint32 Can_RegisterReadbackType::CanReadBackRegRXF0C |
MCAN RXF0C Register
uint32 Can_RegisterReadbackType::CanReadBackRegRXBC |
MCAN RXBC Register
uint32 Can_RegisterReadbackType::CanReadBackRegRXF1C |
MCAN RXF1C Register
uint32 Can_RegisterReadbackType::CanReadBackRegTXBC |
MCAN TXBC Register
uint32 Can_RegisterReadbackType::CanReadBackRegTXESC |
MCAN TXESC Register
uint32 Can_RegisterReadbackType::CanReadBackRegTXEFC |
MCAN TXEFC Register
|
extern |
CAN Configuration struct declaration.
|
extern |
CAN Controller Configuration Pre Compile struct declaration.
|
extern |
CAN Controller Configuration Pre Compile struct declaration.
|
extern |
CAN Controller Configuration Pre Compile struct declaration.
|
extern |
CAN Controller Pre Compile Configuration List.
|
extern |
CAN Mailbox Pre Compile Configuration List.
|
extern |
Base Address of the can peripherals.
|
extern |
|
extern |
|
extern |