2 * Configuration of module: Can (Can_Cfg.h)
\r
7 * Configured for (MCU): TMS570
\r
9 * Module vendor: ArcCore
\r
10 * Generator version: 2.0.1
\r
12 * Generated by Arctic Studio (http://arccore.com)
\r
16 #if !(((CAN_SW_MAJOR_VERSION == 1) && (CAN_SW_MINOR_VERSION == 0)) )
17 #error Can: Configuration file expected BSW module version to be 1.0.*
25 // Number of controller configs
\r
26 #define CAN_ARC_CTRL_CONFIG_CNT 1
\r
28 #define CAN_DEV_ERROR_DETECT STD_OFF
\r
29 #define CAN_VERSION_INFO_API STD_OFF
\r
30 #define CAN_MULTIPLEXED_TRANSMISSION STD_OFF // Not supported
\r
31 #define CAN_WAKEUP_SUPPORT STD_OFF // Not supported
\r
32 #define CAN_HW_TRANSMIT_CANCELLATION STD_OFF // Not supported
\r
41 CAN_CONTROLLER_CNT = 3
\r
42 }CanControllerIdType;
\r
46 CAN_ID_TYPE_EXTENDED,
\r
48 CAN_ID_TYPE_STANDARD
\r
52 CAN_OBJECT_TYPE_RECEIVE = 0x00000000,
\r
53 CAN_OBJECT_TYPE_TRANSMIT = 0x20000000
\r
54 } Can_ObjectTypeType;
\r
58 CAN_ARC_HANDLE_TYPE_BASIC,
\r
59 CAN_ARC_HANDLE_TYPE_FULL
\r
76 void (*CancelTxConfirmation)( const Can_PduType *);
\r
77 void (*RxIndication)( uint8 ,Can_IdType ,uint8 , const uint8 * );
\r
78 void (*ControllerBusOff)(uint8);
\r
79 void (*TxConfirmation)(PduIdType);
\r
80 void (*ControllerWakeup)(uint8);
\r
81 void (*Arc_Error)(uint8,Can_Arc_ErrorType);
\r
86 // Specifies the InstanceId of this module instance. If only one instance is
\r
87 // present it shall have the Id 0
\r
91 // Start mc9s12 unique
\r
93 CAN_ARC_IDAM_2_32BIT,
\r
94 CAN_ARC_IDAM_4_16BIT,
\r
95 CAN_ARC_IDAM_8_8BIT,
\r
96 CAN_ARC_IDAM_FILTER_CLOSED,
\r
99 typedef uint32 Can_FilterMaskType;
\r
101 typedef struct Can_HardwareObjectStruct {
\r
102 // Specifies the type (Full-CAN or Basic-CAN) of a hardware object.
\r
103 Can_Arc_HohType CanHandleType;
\r
105 // Specifies whether the IdValue is of type - standard identifier - extended
\r
106 // identifier - mixed mode ImplementationType: Can_IdType
\r
107 Can_IdTypeType CanIdType;
\r
109 // Specifies (together with the filter mask) the identifiers range that passes
\r
110 // the hardware filter.
\r
113 // Holds the handle ID of HRH or HTH. The value of this parameter is unique
\r
114 // in a given CAN Driver, and it should start with 0 and continue without any
\r
115 // gaps. The HRH and HTH Ids are defined under two different name-spaces.
\r
116 // Example: HRH0-0, HRH1-1, HTH0-2, HTH1-3
\r
117 uint32 CanObjectId;
\r
119 // Specifies if the HardwareObject is used as Transmit or as Receive object
\r
120 Can_ObjectTypeType CanObjectType;
\r
122 // Reference to the filter mask that is used for hardware filtering togerther
\r
123 // with the CAN_ID_VALUE
\r
124 Can_FilterMaskType *CanFilterMaskRef;
\r
126 // A "1" in this mask tells the driver that that HW Message Box should be
\r
127 // occupied by this Hoh. A "1" in bit 31(ppc) occupies Mb 0 in HW.
\r
128 uint64 Can_Arc_MbMask;
\r
130 // End Of List. Set to TRUE is this is the last object in the list.
\r
131 boolean Can_Arc_EOL;
\r
132 } Can_HardwareObjectType;
\r
135 CAN_ARC_PROCESS_TYPE_INTERRUPT = 0x00000400,
\r
136 CAN_ARC_PROCESS_TYPE_POLLING = 0x00000000
\r
137 } Can_Arc_ProcessType;
\r
141 // Enables / disables API Can_MainFunction_BusOff() for handling busoff
\r
142 // events in polling mode.
\r
143 // INTERRUPT or POLLING
\r
144 Can_Arc_ProcessType CanBusOffProcessing;
\r
146 // Defines if a CAN controller is used in the configuration.
\r
147 boolean CanControllerActivation;
\r
149 // Specifies the buadrate of the controller in kbps.
\r
150 uint32 CanControllerBaudRate;
\r
152 // This parameter provides the controller ID which is unique in a given CAN
\r
153 // Driver. The value for this parameter starts with 0 and continue without any
\r
155 CanControllerIdType CanControllerId;
\r
157 // Specifies propagation delay in time quantas.
\r
158 uint32 CanControllerPropSeg;
\r
160 // Specifies phase segment 1 in time quantas.
\r
161 uint32 CanControllerSeg1;
\r
163 // Specifies phase segment 2 in time quantas.
\r
164 uint32 CanControllerSeg2;
\r
166 // Specifies the time quanta for the controller. The calculation of the resulting
\r
167 // prescaler value depending on module clocking and time quanta shall be
\r
168 // done offline Hardware specific.
\r
169 uint32 CanControllerTimeQuanta;
\r
171 // Enables / disables API Can_MainFunction_Read() for handling PDU
\r
172 // reception events in polling mode.
\r
173 Can_Arc_ProcessType CanRxProcessing;
\r
175 // Enables / disables API Can_MainFunction_Write() for handling PDU
\r
176 // transmission events in polling mode.
\r
177 Can_Arc_ProcessType CanTxProcessing;
\r
179 // Enables / disables API Can_MainFunction_Wakeup() for handling wakeup
\r
180 // events in polling mode.
\r
181 Can_Arc_ProcessType CanWakeupProcessing;
\r
183 // Reference to the CPU clock configuration, which is set in the MCU driver
\r
185 uint32 CanCpuClockRef;
\r
187 // This parameter contains a reference to the Wakeup Source for this
\r
188 // controller as defined in the ECU State Manager. Implementation Type:
\r
189 // reference to EcuM_WakeupSourceType
\r
190 uint32 CanWakeupSourceRef;
\r
192 // List of Hoh id's that belong to this controller
\r
193 const Can_HardwareObjectType *Can_Arc_Hoh;
\r
195 boolean Can_Arc_Loopback;
\r
197 // Set this to use the fifo
\r
198 boolean Can_Arc_Fifo;
\r
199 } Can_ControllerConfigType;
\r
203 const Can_ControllerConfigType *CanController;
\r
205 // Callbacks( Extension )
\r
206 const Can_CallbackType *CanCallbacks;
\r
207 } Can_ConfigSetType;
\r
211 // This is the multiple configuration set container for CAN Driver
\r
212 // Multiplicity 1..*
\r
213 const Can_ConfigSetType *CanConfigSet;
\r
214 // This container contains the parameters related each CAN
\r
216 // Multiplicity 1..*
\r
217 const Can_GeneralType *CanGeneral;
\r
221 extern const Can_ConfigType CanConfigData;
\r
222 extern const Can_ControllerConfigType CanControllerConfigData[];
\r
223 extern const Can_ConfigSetType Can_ConfigSet;
\r
225 #endif /*CAN_CFG_H_*/
\r