iLLD_TC29x  1.0
IfxMultican.h
Go to the documentation of this file.
1 /**
2  * \file IfxMultican.h
3  * \brief MULTICAN basic functionality
4  * \ingroup IfxLld_Multican
5  *
6  * \version iLLD_1_0_0_11_0
7  * \copyright Copyright (c) 2013 Infineon Technologies AG. All rights reserved.
8  *
9  *
10  * IMPORTANT NOTICE
11  *
12  *
13  * Infineon Technologies AG (Infineon) is supplying this file for use
14  * exclusively with Infineon's microcontroller products. This file can be freely
15  * distributed within development tools that are supporting such microcontroller
16  * products.
17  *
18  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
19  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
20  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
21  * INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
22  * OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
23  *
24  * \defgroup IfxLld_Multican_Std_Enum Enumerations
25  * \ingroup IfxLld_Multican_Std
26  * \defgroup IfxLld_Multican_Std_General General functions
27  * \ingroup IfxLld_Multican_Std
28  * \defgroup IfxLld_Multican_Std_Node CAN Nodes
29  * \ingroup IfxLld_Multican_Std
30  * \defgroup IfxLld_Multican_Std_Message Message
31  * \ingroup IfxLld_Multican_Std
32  * \defgroup IfxLld_Multican_Std_Message_Objects Message Objects
33  * \ingroup IfxLld_Multican_Std
34  * \defgroup IfxLld_Multican_Std_Interrupts Interrupts
35  * \ingroup IfxLld_Multican_Std
36  */
37 
38 #ifndef IFXMULTICAN_H
39 #define IFXMULTICAN_H 1
40 
41 /******************************************************************************/
42 /*----------------------------------Includes----------------------------------*/
43 /******************************************************************************/
44 
45 #include "_Impl/IfxMultican_cfg.h"
46 #include "Src/Std/IfxSrc.h"
49 #include "IfxCan_reg.h"
50 #include "IfxCan_bf.h"
51 #include "Scu/Std/IfxScuWdt.h"
52 
53 /******************************************************************************/
54 /*------------------------------Type Definitions------------------------------*/
55 /******************************************************************************/
56 
57 /** \brief Message object ID, 0 .. \ref IFXMULTICAN_NUM_MESSAGE_OBJECTS
58  */
60 
61 /******************************************************************************/
62 /*--------------------------------Enumerations--------------------------------*/
63 /******************************************************************************/
64 
65 /** \addtogroup IfxLld_Multican_Std_Enum
66  * \{ */
67 /** \brief CAN input clock selection
68  */
69 typedef enum
70 {
71  IfxMultican_ClockSelect_noClock = 0, /**< \brief No clock supplied */
72  IfxMultican_ClockSelect_fclc = 1, /**< \brief fMULTICAN */
73  IfxMultican_ClockSelect_fosc0 = 2, /**< \brief Oscillator Clock */
74  IfxMultican_ClockSelect_fErayPll = 4 /**< \brief E-Ray clock */
76 
77 /** \brief CAN frame data length code
78  * Definition in Ifx_CAN.MOFCRx.DLC
79  */
80 typedef enum
81 {
82  IfxMultican_DataLengthCode_0 = 0, /**< \brief 0 data bytes */
83  IfxMultican_DataLengthCode_1, /**< \brief 1 data bytes */
84  IfxMultican_DataLengthCode_2, /**< \brief 2 data bytes */
85  IfxMultican_DataLengthCode_3, /**< \brief 3 data bytes */
86  IfxMultican_DataLengthCode_4, /**< \brief 4 data bytes */
87  IfxMultican_DataLengthCode_5, /**< \brief 5 data bytes */
88  IfxMultican_DataLengthCode_6, /**< \brief 6 data bytes */
89  IfxMultican_DataLengthCode_7, /**< \brief 7 data bytes */
90  IfxMultican_DataLengthCode_8 /**< \brief 8 data bytes */
92 
93 /** \brief CAN frame type
94  */
95 typedef enum
96 {
97  IfxMultican_Frame_receive, /**< \brief Data frame is received */
98  IfxMultican_Frame_transmit, /**< \brief Data frame is generated */
99  IfxMultican_Frame_remoteRequest, /**< \brief Remote request frame is generated */
100  IfxMultican_Frame_remoteAnswer /**< \brief Answer frame is generated on reception of the corresponding remote request */
102 
103 /** \brief Determines the operation mode of the frame counter\n
104  * Definition in Ifx_CAN.NFCRx.B.CFMOD, (x= node Id)
105  */
106 typedef enum
107 {
108  IfxMultican_FrameCounterMode_frameCountMode = 0, /**< \brief The frame counter is incremented
109  * upon the reception and transmission of frames */
110  IfxMultican_FrameCounterMode_timeStampMode = 1, /**< \brief The frame counter is used to count
111  * bit times. */
112  IfxMultican_FrameCounterMode_bitTimingMode = 2, /**< \brief The frame counter is used for
113  * analysis of the bit timing. */
114  IfxMultican_FrameCounterMode_errorCountMode = 3 /**< \brief The frame counter is used for
115  * counting when an error frame is received or an error is
116  * detected by the node. */
118 
119 /** \brief CAN message object group\n
120  * Each group consists of 32 consecutive message objects
121  */
122 typedef enum
123 {
133 
134 /** \brief CAN Message Object Mode
135  */
136 typedef enum
137 {
138  IfxMultican_MsgObjMode_standard = 0, /**< \brief Standard Message Object */
139  IfxMultican_MsgObjMode_receiveFifoBase = 1, /**< \brief Receive FIFO Base Object */
140  IfxMultican_MsgObjMode_transmitFifoBase = 2, /**< \brief Transmit FIFO Base Object */
141  IfxMultican_MsgObjMode_transmitFifoSlave = 3, /**< \brief Transmit FIFO Slave Object */
142  IfxMultican_MsgObjMode_gatewaySource = 4 /**< \brief Gateway Source Object */
144 
145 /** \brief CAN Message Object status flag
146  * Definition in Ifx_CAN.MOSTATx (x: 0 to max number of msg objs)
147  */
148 typedef enum
149 {
150  IfxMultican_MsgObjStatusFlag_receivePending = IFX_CAN_MO_STAT_RXPND_OFF, /**< \brief Receive pending status flag */
151  IfxMultican_MsgObjStatusFlag_transmitPending = IFX_CAN_MO_STAT_TXPND_OFF, /**< \brief Transmit pending status flag */
152  IfxMultican_MsgObjStatusFlag_receiveUpdating = IFX_CAN_MO_STAT_RXUPD_OFF, /**< \brief Receive updating status flag */
153  IfxMultican_MsgObjStatusFlag_newData = IFX_CAN_MO_STAT_NEWDAT_OFF, /**< \brief New data status flag */
154  IfxMultican_MsgObjStatusFlag_messageLost = IFX_CAN_MO_STAT_MSGLST_OFF, /**< \brief Message lost status flag */
155  IfxMultican_MsgObjStatusFlag_messageValid = IFX_CAN_MO_STAT_MSGVAL_OFF, /**< \brief Message valid status flag */
156  IfxMultican_MsgObjStatusFlag_receiveTransmitSelected = IFX_CAN_MO_STAT_RTSEL_OFF, /**< \brief Receive transmit selected status flag */
157  IfxMultican_MsgObjStatusFlag_receiveEnable = IFX_CAN_MO_STAT_RXEN_OFF, /**< \brief Receive enable status flag */
158  IfxMultican_MsgObjStatusFlag_transmitRequest = IFX_CAN_MO_STAT_TXRQ_OFF, /**< \brief Transmit request status flag */
159  IfxMultican_MsgObjStatusFlag_transmitEnable0 = IFX_CAN_MO_STAT_TXEN0_OFF, /**< \brief Transmit enable 0 status flag */
160  IfxMultican_MsgObjStatusFlag_transmitEnable1 = IFX_CAN_MO_STAT_TXEN1_OFF, /**< \brief Transmit enable 1 status flag */
161  IfxMultican_MsgObjStatusFlag_messageDirection = IFX_CAN_MO_STAT_DIR_OFF /**< \brief Message direction status flag */
163 
164 /** \brief CAN priorities
165  */
166 typedef enum
167 {
168  IfxMultican_Priority_ListOrder = 1, /**< \brief List order */
169  IfxMultican_Priority_CAN_ID = 2 /**< \brief CAN ID */
171 
172 /** \brief Enable/disable the sensitivity of the module to sleep signal\n
173  * Definition in Ifx_CAN.CLC.B.EDIS
174  */
175 typedef enum
176 {
177  IfxMultican_SleepMode_enable = 0, /**< \brief enables sleep mode */
178  IfxMultican_SleepMode_disable = 1 /**< \brief disables sleep mode */
180 
181 /** \brief CAN API status definition
182  */
183 typedef enum
184 {
185  IfxMultican_Status_ok = 0x00000000,
197 
198 /** \} */
199 
200 /******************************************************************************/
201 /*-----------------------------Data Structures--------------------------------*/
202 /******************************************************************************/
203 
204 /** \brief CAN message definition
205  */
206 typedef struct
207 {
208  uint32 id; /**< \brief CAN message ID */
209  IfxMultican_DataLengthCode lengthCode; /**< \brief CAN message data length code */
210  uint32 data[2]; /**< \brief CAN message data */
211  boolean fastBitRate; /**< \brief CAN FD fast bit rate enable/disable */
213 
214 /** \brief Message object status bit-fields
215  */
216 typedef union
217 {
218  Ifx_CAN_MO_STAT_Bits B;
219  unsigned int U;
221 
222 /** \addtogroup IfxLld_Multican_Std_General
223  * \{ */
224 
225 /******************************************************************************/
226 /*-------------------------Inline Function Prototypes-------------------------*/
227 /******************************************************************************/
228 
229 /** \brief clears the message pending interrupt notification of a given list
230  * \param mcan mcan Specifies the CAN module
231  * \return None
232  */
234 
235 /** \brief clears the message pending interrupt notification of a given list
236  * \param mcan mcan Specifies the CAN module
237  * \param list List number
238  * \return None
239  */
241 
242 /** \brief Disables the module (sets the disable request)
243  * \param mcan mcan Specifies the CAN module
244  * \return None
245  */
246 IFX_INLINE void IfxMultican_disableModule(Ifx_CAN *mcan);
247 
248 /** \brief Disregards the sleep mode of the module
249  * \param mcan mcan Specifies the CAN module
250  * \return None
251  */
252 IFX_INLINE void IfxMultican_disableSleepMode(Ifx_CAN *mcan);
253 
254 /** \brief Enables the module (clears the disable request)
255  * \param mcan mcan Specifies the CAN module
256  * \return None
257  */
258 IFX_INLINE void IfxMultican_enableModule(Ifx_CAN *mcan);
259 
260 /** \brief Enables the sleep mode of the module
261  * \param mcan mcan Specifies the CAN module
262  * \return None
263  */
264 IFX_INLINE void IfxMultican_enableSleepMode(Ifx_CAN *mcan);
265 
266 /** \brief Returns the selected fractional divider mode
267  * \param mcan mcan Specifies the CAN module
268  * \return Divider mode
269  */
271 
272 /** \brief Returns the reload or addition value for the result.
273  * \param mcan mcan Specifies the CAN module
274  * \return Step Value
275  */
277 
278 /** \brief Returns the selected input clock source
279  * \param mcan mcan Specifies the CAN module
280  * \return Clock selection
281  */
283 
284 /** \brief Returns the status of module enabled or disabled
285  * \param mcan mcan Specifies the CAN module
286  * \return Status (TRUE / FALSE)
287  */
288 IFX_INLINE boolean IfxMultican_isModuleEnabled(Ifx_CAN *mcan);
289 
290 /** \brief sets the fractional divider mode
291  * \param mcan mcan Specifies the CAN module
292  * \param mode Divider mode
293  * \return None
294  */
295 IFX_INLINE void IfxMultican_setFractionalDividerMode(Ifx_CAN *mcan, uint16 mode);
296 
297 /** \brief sets reload or addition value for the result.
298  * \param mcan mcan Specifies the CAN module
299  * \param stepValue Step Value
300  * \return None
301  */
302 IFX_INLINE void IfxMultican_setFractionalDividerStepValue(Ifx_CAN *mcan, uint16 stepValue);
303 
304 /** \brief Sets the input clock source
305  * \param mcan mcan Specifies the CAN module
306  * \param clockSelect Clock selection
307  * \return None
308  */
309 IFX_INLINE void IfxMultican_setInputClock(Ifx_CAN *mcan, IfxMultican_ClockSelect clockSelect);
310 
311 /** \brief clears the message pending interrupt notification of a given list
312  * \param mcan mcan Specifies the CAN module
313  * \param mask Message Index mask
314  * \return None
315  */
316 IFX_INLINE void IfxMultican_setMessageIndexMask(Ifx_CAN *mcan, uint32 mask);
317 
318 /** \brief Sets the sensitivity of the module to sleep signal
319  * \param can pointer to CAN registers
320  * \param mode mode selection (enable / disable)
321  * \return None
322  */
324 
325 /** \brief Wait until the list panel is ready
326  * \param mcan mcan Specifies the CAN module
327  * \return None
328  */
329 IFX_INLINE void IfxMultican_waitListReady(Ifx_CAN *mcan);
330 
331 /******************************************************************************/
332 /*-------------------------Global Function Prototypes-------------------------*/
333 /******************************************************************************/
334 
335 /** \brief Reset the CAN module\n
336  * Reset and disable the CAN module, inclusive message object and node registers.
337  * \param mcan Specifies the CAN module
338  * \return None
339  */
340 IFX_EXTERN void IfxMultican_deinit(Ifx_CAN *mcan);
341 
342 /** \brief resets Multican kernel
343  * \param can pointer to CAN registers
344  * \return None
345  */
346 IFX_EXTERN void IfxMultican_resetModule(Ifx_CAN *can);
347 
348 /** \brief Execute a command from the command panel
349  * \param mcan Specifies the CAN module
350  * \param cmd Specifies the command
351  * \param arg2 Specifies the second argument
352  * \param arg1 Specifies the first argument
353  * \return None
354  */
355 IFX_EXTERN void IfxMultican_setListCommand(Ifx_CAN *mcan, uint32 cmd, uint32 arg2, uint32 arg1);
356 
357 /** \} */
358 
359 /** \addtogroup IfxLld_Multican_Std_Node
360  * \{ */
361 
362 /******************************************************************************/
363 /*-------------------------Inline Function Prototypes-------------------------*/
364 /******************************************************************************/
365 
366 /** \brief Activate the CAN Node. Participate in the CAN bus activities
367  * \param hwNode Pointer to CAN Node registers
368  * \return None
369  */
370 IFX_INLINE void IfxMultican_Node_activate(Ifx_CAN_N *hwNode);
371 
372 /** \brief Deactivate the CAN Node. Take out from participation in the CAN bus activities
373  * \param hwNode Pointer to CAN Node registers
374  * \return None
375  */
376 IFX_INLINE void IfxMultican_Node_deactivate(Ifx_CAN_N *hwNode);
377 
378 /** \brief Disables the configuration changes for the Bit Timing Register, the Port Control Register, and the Error Counter Register of a CAN Node.
379  * \param hwNode Pointer to CAN Node registers
380  * \return None
381  */
383 
384 /** \brief Enables the configuration changes for the Bit Timing Register, the Port Control Register, and the Error Counter Register of a CAN Node.
385  * \param hwNode Pointer to CAN Node registers
386  * \return None
387  */
389 
390 /** \brief Returns the base address to a given CAN node number
391  * \param mcan Specifies the CAN module
392  * \param node Specifies the CAN node
393  * \return base pointer to CAN node
394  */
395 IFX_INLINE Ifx_CAN_N *IfxMultican_Node_getPointer(Ifx_CAN *mcan, IfxMultican_NodeId node);
396 
397 /** \brief Resets the control register of CAN Node x.
398  * \param hwNode Pointer to CAN Node registers
399  * \return None
400  */
401 IFX_INLINE void IfxMultican_Node_resetControlRegister(Ifx_CAN_N *hwNode);
402 
403 /** \brief Resets the error counters of CAN Node x.
404  * \param hwNode Pointer to CAN Node registers
405  * \return None
406  */
407 IFX_INLINE void IfxMultican_Node_resetErrorCounters(Ifx_CAN_N *hwNode);
408 
409 /** \brief Resets the interrupt pointers of CAN Node x.
410  * \param hwNode Pointer to CAN Node registers
411  * \return None
412  */
414 
415 /** \brief Enables / Disables the alert interrupt of CAN node x.
416  * \param hwNode Pointer to CAN Node registers
417  * \param enabled Enable / disable choice
418  * \return None
419  */
420 IFX_INLINE void IfxMultican_Node_setAlertInterrupt(Ifx_CAN_N *hwNode, boolean enabled);
421 
422 /** \brief Selects the interrupt output line INT_Om
423  * (m = 0-15) for an alert interrupt of CAN Node x.
424  * \param hwNode Pointer to CAN Node registers
425  * \param srcId Service request ID
426  * \return None
427  */
429 
430 /** \brief Enables / Disables the analyzer mode of CAN node x.
431  * \param hwNode Pointer to CAN Node registers
432  * \param mode Enable / disable choice
433  * \return None
434  */
435 IFX_INLINE void IfxMultican_Node_setAnalyzerMode(Ifx_CAN_N *hwNode, boolean mode);
436 
437 /** \brief Determines the threshold value (warning level, default 96) to be reached\n
438  * in order to set the corresponding error warning bit EWRN.
439  * \param hwNode Pointer to CAN Node registers
440  * \param level Error warning level
441  * \return None
442  */
443 IFX_INLINE void IfxMultican_Node_setErrorWarningLevel(Ifx_CAN_N *hwNode, uint8 level);
444 
445 /** \brief Enables / Disables the CAN frame counter overflow interrupt of CAN node x.
446  * \param hwNode Pointer to CAN Node registers
447  * \param enabled Enable / disable choice
448  * \return None
449  */
450 IFX_INLINE void IfxMultican_Node_setFrameCounterInterrupt(Ifx_CAN_N *hwNode, boolean enabled);
451 
452 /** \brief Selects the interrupt output line INT_Om
453  * (m = 0-15) for a frame counter overflow interrupt of CAN Node x.
454  * \param hwNode Pointer to CAN Node registers
455  * \param srcId Service request ID
456  * \return None
457  */
459 
460 /** \brief Sets the operation mode of the frame counter of the CAN Node x
461  * \param hwNode Pointer to CAN Node registers
462  * \param mode Determines the operation mode of the frame counter
463  * \return None
464  */
466 
467 /** \brief Enables / Disables the last error code interrupt of CAN node x. \n
468  * This interrupt is generated with each hardware update of bit field NSRx.LEC with LEC > 0 (CAN protocol error).
469  * \param hwNode Pointer to CAN Node registers
470  * \param enabled Enable / disable choice
471  * \return None
472  */
473 IFX_INLINE void IfxMultican_Node_setLastErrorCodeInterrupt(Ifx_CAN_N *hwNode, boolean enabled);
474 
475 /** \brief Selects the interrupt output line INT_Om
476  * (m = 0-15) for an LEC interrupt of CAN Node x.
477  * \param hwNode Pointer to CAN Node registers
478  * \param srcId Service request ID
479  * \return None
480  */
482 
483 /** \brief Enables / Disables the loopback mode of CAN node x.
484  * \param hwNode Pointer to CAN Node registers
485  * \param mode Enable / disable choice
486  * \return None
487  */
488 IFX_INLINE void IfxMultican_Node_setLoopBackMode(Ifx_CAN_N *hwNode, boolean mode);
489 
490 /** \brief Sets the value of the receive error counter of CAN node x.
491  * \param hwNode Pointer to CAN Node registers
492  * \param value Receive error counter value
493  * \return None
494  */
495 IFX_INLINE void IfxMultican_Node_setReceiveErrorCounter(Ifx_CAN_N *hwNode, uint8 value);
496 
497 /** \brief Selects the interrupt output line INT_Om
498  * (m = 0-15) for a timer event interrupt of CAN Node x.
499  * \param hwNode Pointer to CAN Node registers
500  * \param srcId Service request ID
501  * \return None
502  */
504 
505 /** \brief Enables / Disables the transfer interrupt of CAN node x. \n
506  * This interrupt is generated after the successful reception or transmission of a CAN frame in node x
507  * \param hwNode Pointer to CAN Node registers
508  * \param enabled Enable / disable choice
509  * \return None
510  */
511 IFX_INLINE void IfxMultican_Node_setTransferInterrupt(Ifx_CAN_N *hwNode, boolean enabled);
512 
513 /** \brief Selects the interrupt output line INT_Om
514  * (m = 0-15) for a transfer OK interrupt of CAN Node x.
515  * \param hwNode Pointer to CAN Node registers
516  * \param srcId Service request ID
517  * \return None
518  */
520 
521 /** \brief Sets the value of the transmit error counter of CAN node x.
522  * \param hwNode Pointer to CAN Node registers
523  * \param value Transmit error counter value
524  * \return None
525  */
526 IFX_INLINE void IfxMultican_Node_setTransmitErrorCounter(Ifx_CAN_N *hwNode, uint8 value);
527 
528 /******************************************************************************/
529 /*-------------------------Global Function Prototypes-------------------------*/
530 /******************************************************************************/
531 
532 /** \brief Reset the CAN node
533  * \param hwNode Pointer to CAN Node registers
534  * \return None
535  */
536 IFX_EXTERN void IfxMultican_Node_deinit(Ifx_CAN_N *hwNode);
537 
538 /** \brief Select and initialise the CAN node receive pin
539  * \param hwNode Pointer to CAN Node registers
540  * \param rxd Rx pin
541  * \param mode Input mode
542  * \return TRUE: Returns TRUE if the operation was successful\n
543  * FALSE: Returns FALSE if the operation was errorneous
544  */
545 IFX_EXTERN boolean IfxMultican_Node_initRxPin(Ifx_CAN_N *hwNode, IfxMultican_Rxd_In *rxd, IfxPort_InputMode mode);
546 
547 /** \brief Select and initialise the CAN node transmit pin
548  * \param hwNode Pointer to CAN Node registers
549  * \param txd Tx pin
550  * \param mode Output mode
551  * \return TRUE: Returns TRUE if the operation was successful\n
552  * FALSE: Returns FALSE if the operation was errorneous
553  */
554 IFX_EXTERN boolean IfxMultican_Node_initTxPin(Ifx_CAN_N *hwNode, IfxMultican_Txd_Out *txd, IfxPort_OutputMode mode);
555 
556 /** \brief Recovers the CAN node from bus off
557  * \param hwNode Pointer to CAN Node registers
558  * \return Status
559  */
561 
562 /** \brief Calculates the best posible values and configures BTR register
563  * \param hwNode Pointer to CAN Node registers
564  * \param moduleFreq Specifies the CAN module frequency
565  * \param baudrate Specifies the node baud rate. Unit: baud
566  * \param samplePoint Specifies the sample point. Range = [0, 10000] resp. [0%, 100%] of the total bit time.
567  * \param synchJumpWidth synchJumpWidth Specifies the re-synchronization jump width.\n
568  * Range = [0, 10000] resp. [0%, 100%] of the total bit time.
569  * \return None
570  */
571 IFX_EXTERN void IfxMultican_Node_setBitTiming(Ifx_CAN_N *hwNode, float32 moduleFreq, uint32 baudrate, uint16 samplePoint, uint16 synchJumpWidth);
572 
573 /** \brief Returns the CAN node timing
574  * \param moduleFreq Specifies the CAN module frequency
575  * \param btr BTR
576  * \param baudrate Baudrate
577  * \param samplePoint Sample point
578  * \param synchJumpWidth Sync Jump Width
579  * \return None
580  */
581 IFX_EXTERN void IfxMultican_calcTimingFromBTR(float32 moduleFreq, uint32 btr, uint32 *baudrate, uint16 *samplePoint, uint16 *synchJumpWidth);
582 
583 /** \} */
584 
585 /** \addtogroup IfxLld_Multican_Std_Message
586  * \{ */
587 
588 /******************************************************************************/
589 /*-------------------------Inline Function Prototypes-------------------------*/
590 /******************************************************************************/
591 
592 /** \brief Initializes a CAN message
593  * \param msg The message which should be initialized
594  * \param id The message ID
595  * \param dataLow The lower part of the 64bit data value
596  * \param dataHigh The upper part of the 64bit data value
597  * \param lengthCode number of bytes (data length code) which should be transmitted (0..8)
598  * \return None
599  */
601 
602 /** \} */
603 
604 /** \addtogroup IfxLld_Multican_Std_Message_Objects
605  * \{ */
606 
607 /******************************************************************************/
608 /*-------------------------Inline Function Prototypes-------------------------*/
609 /******************************************************************************/
610 
611 /** \brief Sets priority class of message object
612  * \param hwObj Pointer to CAN message object registers
613  * \return None
614  */
615 IFX_INLINE void IfxMultican_MsgObj_clearDataRegisters(Ifx_CAN_MO *hwObj);
616 
617 /** \brief Clears the FIFO/GateWay pointers of a message object
618  * \param hwObj Pointer to CAN message object registers
619  * \return None
620  */
622 
623 /** \brief Clear the RX pending flag of a message object
624  * \param hwObj Pointer to CAN message object registers
625  * \return None
626  */
627 IFX_INLINE void IfxMultican_MsgObj_clearRxPending(Ifx_CAN_MO *hwObj);
628 
629 /** \brief Clear the TX pending flag of a message object
630  * \param hwObj Pointer to CAN message object registers
631  * \return None
632  */
633 IFX_INLINE void IfxMultican_MsgObj_clearTxPending(Ifx_CAN_MO *hwObj);
634 
635 /** \brief Gets bottom object pointer of the base message object
636  * \param hwObj Pointer to CAN message object registers
637  * \return Bottom message object number
638  */
640 
641 /** \brief Gets data length code of a message object
642  * \param hwObj Pointer to CAN message object registers
643  * \return CAN frame data length code
644  */
646 
647 /** \brief Gets message identifier of message object
648  * \param hwObj Pointer to CAN message object registers
649  * \return messageId
650  */
652 
653 /** \brief Returns next object pointer (PNEXT) of the current message object
654  * \param hwObj Pointer to CAN message object registers
655  * \return Next message object number
656  */
658 
659 /** \brief Get base address of a message object register
660  * \param mcan Specifies the CAN module
661  * \param msgObjId Specifies the message object index. Range = [0, \ref IFXMULTICAN_NUM_MESSAGE_OBJECTS - 1]
662  * \return Pointer to Message Object registers
663  */
664 IFX_INLINE Ifx_CAN_MO *IfxMultican_MsgObj_getPointer(Ifx_CAN *mcan, IfxMultican_MsgObjId msgObjId);
665 
666 /** \brief Get the message object status
667  * \param hwObj Pointer to CAN message object registers
668  * \return Extended frame: True
669  * Standard frame: False
670  */
671 IFX_INLINE boolean IfxMultican_MsgObj_isExtendedFrame(Ifx_CAN_MO *hwObj);
672 
673 /** \brief Returns the RX pending flag of a message object.
674  * \param hwObj Pointer to CAN message object registers
675  * \return TRUE of the RX pending flag of a message object is set
676  */
677 IFX_INLINE boolean IfxMultican_MsgObj_isRxPending(Ifx_CAN_MO *hwObj);
678 
679 /** \brief Returns the TX Request flag of a message object.
680  * \param hwObj Pointer to CAN message object registers
681  * \return TRUE of the TX Request flag of a message object is set
682  */
683 IFX_INLINE boolean IfxMultican_MsgObj_isTransmitRequested(Ifx_CAN_MO *hwObj);
684 
685 /** \brief Returns the TX pending flag of a message object.
686  * \param hwObj Pointer to CAN message object registers
687  * \return TRUE of the TX pending flag of a message object is set
688  */
689 IFX_INLINE boolean IfxMultican_MsgObj_isTxPending(Ifx_CAN_MO *hwObj);
690 
691 /** \brief Sets acceptance mask for the message identifier
692  * \param hwObj Pointer to CAN message object registers
693  * \param mask Acceptance Mask for the message identifier
694  * \param extendedFrame Extended frame enabled / disabled
695  * \return None
696  */
697 IFX_INLINE void IfxMultican_MsgObj_setAcceptanceMask(Ifx_CAN_MO *hwObj, uint32 mask, boolean extendedFrame);
698 
699 /** \brief Sets bottom object pointer of the base message object
700  * \param hwObj Pointer to CAN message object registers
701  * \param objNumber Bottom message object number
702  * \return None
703  */
704 IFX_INLINE void IfxMultican_MsgObj_setBottomObjectPointer(Ifx_CAN_MO *hwObj, sint32 objNumber);
705 
706 /** \brief Sets bottom current pointer of the base message object
707  * \param hwObj Pointer to CAN message object registers
708  * \param objNumber Current message object number
709  * \return None
710  */
711 IFX_INLINE void IfxMultican_MsgObj_setCurrentObjectPointer(Ifx_CAN_MO *hwObj, sint32 objNumber);
712 
713 /** \brief Enable / Disable data copy of a gateway source message object
714  * \param hwObj Pointer to CAN message object registers
715  * \param enabled Enable / disable choice
716  * \return None
717  */
718 IFX_INLINE void IfxMultican_MsgObj_setDataCopy(Ifx_CAN_MO *hwObj, boolean enabled);
719 
720 /** \brief Sets data length code of a message object
721  * \param hwObj Pointer to CAN message object registers
722  * \param code CAN frame data length code
723  * \return None
724  */
726 
727 /** \brief Enable / Disable data length code copy of a gateway source message object
728  * \param hwObj Pointer to CAN message object registers
729  * \param enabled Enable / disable choice
730  * \return None
731  */
732 IFX_INLINE void IfxMultican_MsgObj_setDataLengthCodeCopy(Ifx_CAN_MO *hwObj, boolean enabled);
733 
734 /** \brief Enable / Disable gateway data frame send of a gateway source message object
735  * which in turn sets the TXRQ of the gateway deatination object
736  * \param hwObj Pointer to CAN message object registers
737  * \param enabled Enable / disable choice
738  * \return None
739  */
740 IFX_INLINE void IfxMultican_MsgObj_setGatewayDataFrameSend(Ifx_CAN_MO *hwObj, boolean enabled);
741 
742 /** \brief Enable / Disable identifier copy of a gateway source message object
743  * \param hwObj Pointer to CAN message object registers
744  * \param enabled Enable / disable choice
745  * \return None
746  */
747 IFX_INLINE void IfxMultican_MsgObj_setIdentifierCopy(Ifx_CAN_MO *hwObj, boolean enabled);
748 
749 /** \brief Sets identifier extension of message object
750  * \param hwObj Pointer to CAN message object registers
751  * \param extension Acceptance Mask for the message IDE bit
752  * \return None
753  */
754 IFX_INLINE void IfxMultican_MsgObj_setIdentifierExtension(Ifx_CAN_MO *hwObj, boolean extension);
755 
756 /** \brief Sets acceptance mask for the message IDE bit
757  * \param hwObj Pointer to CAN message object registers
758  * \param matchingId Acceptance Mask for the message IDE bit
759  * \return None
760  */
761 IFX_INLINE void IfxMultican_MsgObj_setMatchingId(Ifx_CAN_MO *hwObj, boolean matchingId);
762 
763 /** \brief Sets message identifier of message object
764  * \param hwObj Pointer to CAN message object registers
765  * \param messageId CAN Identifier of message object
766  * \param extendedFrame Extended frame enabled / disabled
767  * \return None
768  */
769 IFX_INLINE void IfxMultican_MsgObj_setMessageId(Ifx_CAN_MO *hwObj, uint32 messageId, boolean extendedFrame);
770 
771 /** \brief Sets the message mode of a message object
772  * \param hwObj Pointer to CAN message object registers
773  * \param mode CAN Message Object Mode
774  * \return None
775  */
777 
778 /** \brief Sets message pending number that selects the bit position of the bit in the Message Pending Register\n
779  * that is set upon a message object n receive/transmit interrupt
780  * \param hwObj Pointer to CAN message object registers
781  * \param messageNumber Message pending number
782  * \return None
783  */
784 IFX_INLINE void IfxMultican_MsgObj_setMessagePendingNumber(Ifx_CAN_MO *hwObj, IfxMultican_MsgObjId messageNumber);
785 
786 /** \brief Enable / Disable overflow interrupt of a message object
787  * \param hwObj Pointer to CAN message object registers
788  * \param enabled Enable / disable choice
789  * \return None
790  */
791 IFX_INLINE void IfxMultican_MsgObj_setOverflowInterrupt(Ifx_CAN_MO *hwObj, boolean enabled);
792 
793 /** \brief Sets priority class of message object
794  * \param hwObj Pointer to CAN message object registers
795  * \param priority One of the priority classes 0, 1, 2, 3 to message object n
796  * \return None
797  */
799 
800 /** \brief Enable / Disable receive interrupt of a message object
801  * \param hwObj Pointer to CAN message object registers
802  * \param enabled Enable / disable choice
803  * \return None
804  */
805 IFX_INLINE void IfxMultican_MsgObj_setReceiveInterrupt(Ifx_CAN_MO *hwObj, boolean enabled);
806 
807 /** \brief Sets receive interrupt node pointer of message object
808  * \param hwObj Pointer to CAN message object registers
809  * \param srcId Service request ID
810  * \return None
811  */
813 
814 /** \brief Enable / Disable transmit object remote monitoring of a message object
815  * \param hwObj Pointer to CAN message object registers
816  * \param enabled Enable / disable choice
817  * \return None
818  */
819 IFX_INLINE void IfxMultican_MsgObj_setRemoteMonitoring(Ifx_CAN_MO *hwObj, boolean enabled);
820 
821 /** \brief Sets bottom object select pointer of the base message object
822  * \param hwObj Pointer to CAN message object registers
823  * \param objNumber Select message object number
824  * \return None
825  */
826 IFX_INLINE void IfxMultican_MsgObj_setSelectObjectPointer(Ifx_CAN_MO *hwObj, sint32 objNumber);
827 
828 /** \brief Enable / Disable single data transfer of a message object
829  * \param hwObj Pointer to CAN message object registers
830  * \param enabled Enable / disable choice
831  * \return None
832  */
833 IFX_INLINE void IfxMultican_MsgObj_setSingleDataTransfer(Ifx_CAN_MO *hwObj, boolean enabled);
834 
835 /** \brief Enable / Disable single transmit trial of a message object
836  * \param hwObj Pointer to CAN message object registers
837  * \param enabled Enable / disable choice
838  * \return None
839  */
840 IFX_INLINE void IfxMultican_MsgObj_setSingleTransmitTrial(Ifx_CAN_MO *hwObj, boolean enabled);
841 
842 /** \brief Sets top object pointer of the base message object
843  * \param hwObj Pointer to CAN message object registers
844  * \param objNumber Top message object number
845  * \return None
846  */
847 IFX_INLINE void IfxMultican_MsgObj_setTopObjectPointer(Ifx_CAN_MO *hwObj, sint32 objNumber);
848 
849 /** \brief Enable / Disable transmit interrupt of a message object
850  * \param hwObj Pointer to CAN message object registers
851  * \param enabled Enable / disable choice
852  * \return None
853  */
854 IFX_INLINE void IfxMultican_MsgObj_setTransmitInterrupt(Ifx_CAN_MO *hwObj, boolean enabled);
855 
856 /** \brief Sets transmit interrupt node pointer of message object
857  * \param hwObj Pointer to CAN message object registers
858  * \param srcId Service request ID
859  * \return None
860  */
862 
863 /******************************************************************************/
864 /*-------------------------Global Function Prototypes-------------------------*/
865 /******************************************************************************/
866 
867 /** \brief Cancel pending TX request by invalidating the request, only when frame transmission has not been started.
868  * \param hwObj Pointer to CAN message object registers
869  * \return TRUE if cancellation was successfully executed
870  */
871 IFX_EXTERN boolean IfxMultican_MsgObj_cancelSend(Ifx_CAN_MO *hwObj);
872 
873 /** \brief Clears the selected status flag of a message object
874  * \param hwObj Pointer to CAN message object registers
875  * \param flag Message Object status flag
876  * \return None
877  */
879 
880 /** \brief Reset the message object\n
881  * Append the message object to the end of idle list and reset message object registers
882  * \param mcan Specifies the CAN module
883  * \param msgObjId Specifies the message object index. Range = [0, \ref IFXMULTICAN_NUM_MESSAGE_OBJECTS - 1]
884  * \return None
885  */
886 IFX_EXTERN void IfxMultican_MsgObj_deinit(Ifx_CAN *mcan, IfxMultican_MsgObjId msgObjId);
887 
888 /** \brief Get message object ID which has TX/RX pending flag from a message object group
889  * \param mcan Specifies the CAN module
890  * \param msgObjGroup Message object group
891  * \return Message object index
892  */
894 
895 /** \brief Get the message object status
896  * \param hwObj Pointer to CAN message object registers
897  * \return \ref IfxMultican_MsgObjStat bitfield
898  */
900 
901 /** \brief Gets the status of the selected status flag of a message object
902  * \param hwObj Pointer to CAN message object registers
903  * \param flag Message Object status flag
904  * \return Status (TRUE / FALSE)
905  */
907 
908 /** \brief Read a received CAN message
909  * \param hwObj Pointer to CAN message object registers
910  * \param msg This parameter is filled in by the function with the received message. Also when reading is not successful.
911  * \return IfxMultican_Status_newData: if the operation was successful\n
912  * IfxMultican_Status_newDataButMessageLost: if the one message lost and last new data is retrieved successfully\n
913  * IfxMultican_Status_messageLost: if the message lost and new data is not yet ready\n
914  * IfxMultican_Status_receiveEmpty: if no message is been received
915  */
917 
918 /** \brief Send a CAN message
919  * \param hwObj Pointer to CAN message object registers
920  * \param msg Specifies the message to be send
921  * \return IfxMultican_Status_ok: if the operation was successful
922  * IfxMultican_Status_notSentBusy: if the operation was unsuccessful due to hardware is busy
923  */
925 
926 /** \brief Set message object filter
927  * \param hwObj Pointer to CAN message object registers
928  * \param extend TRUE/FALSE : extended ID
929  * \param id ID
930  * \param accMask acceptance mask
931  * \return None
932  */
933 IFX_EXTERN void IfxMultican_MsgObj_setFilter(Ifx_CAN_MO *hwObj, boolean extend, uint32 id, uint32 accMask);
934 
935 /** \brief Sets the selected status flag of a message object
936  * \param hwObj Pointer to CAN message object registers
937  * \param flag Message Object status flag
938  * \return None
939  */
941 
942 /** \} */
943 
944 /** \addtogroup IfxLld_Multican_Std_Interrupts
945  * \{ */
946 
947 /******************************************************************************/
948 /*-------------------------Global Function Prototypes-------------------------*/
949 /******************************************************************************/
950 
951 /** \brief Get the interrupt source register
952  * \param mcan Specifies the CAN module
953  * \param srcId Specifies the service request ID
954  * \return Address of the interrupt source register\n
955  */
956 IFX_EXTERN volatile Ifx_SRC_SRCR *IfxMultican_getSrcPointer(Ifx_CAN *mcan, IfxMultican_SrcId srcId);
957 
958 /** \} */
959 
960 /******************************************************************************/
961 /*---------------------Inline Function Implementations------------------------*/
962 /******************************************************************************/
963 
965 {
966  msg->id = id;
967  msg->data[0] = dataLow;
968  msg->data[1] = dataHigh;
969  msg->lengthCode = lengthCode;
970 }
971 
972 
974 {
975  hwObj->DATAL.U = 0;
976  hwObj->DATAH.U = 0;
977 }
978 
979 
981 {
982  hwObj->FGPR.U = 0x0000000U;
983 }
984 
985 
987 {
989 }
990 
991 
993 {
995 }
996 
997 
999 {
1000  return (IfxMultican_MsgObjId)(hwObj->FGPR.B.BOT);
1001 }
1002 
1003 
1005 {
1006  return (IfxMultican_DataLengthCode)(hwObj->FCR.B.DLC);
1007 }
1008 
1009 
1011 {
1012  Ifx_CAN_MO_AR ar;
1013  ar.U = hwObj->AR.U;
1014  return ar.B.ID >> ((ar.B.IDE != 0) ? 0 : 18);
1015 }
1016 
1017 
1019 {
1020  return (IfxMultican_MsgObjId)(hwObj->STAT.B.PNEXT);
1021 }
1022 
1023 
1025 {
1026  return &(mcan->MO[msgObjId]);
1027 }
1028 
1029 
1031 {
1032  return hwObj->AR.B.IDE != 0;
1033 }
1034 
1035 
1036 IFX_INLINE boolean IfxMultican_MsgObj_isRxPending(Ifx_CAN_MO *hwObj)
1037 {
1039  return msgStatus.B.RXPND ? TRUE : FALSE;
1040 }
1041 
1042 
1044 {
1046  return msgStatus.B.TXRQ ? TRUE : FALSE;
1047 }
1048 
1049 
1050 IFX_INLINE boolean IfxMultican_MsgObj_isTxPending(Ifx_CAN_MO *hwObj)
1051 {
1053  return msgStatus.B.TXPND ? TRUE : FALSE;
1054 }
1055 
1056 
1057 IFX_INLINE void IfxMultican_MsgObj_setAcceptanceMask(Ifx_CAN_MO *hwObj, uint32 mask, boolean extendedFrame)
1058 {
1059  hwObj->AMR.B.AM = mask << ((extendedFrame != 0) ? 0 : 18);
1060 }
1061 
1062 
1064 {
1065  hwObj->FGPR.B.BOT = objNumber;
1066 }
1067 
1068 
1070 {
1071  hwObj->FGPR.B.CUR = objNumber;
1072 }
1073 
1074 
1075 IFX_INLINE void IfxMultican_MsgObj_setDataCopy(Ifx_CAN_MO *hwObj, boolean enabled)
1076 {
1077  hwObj->FCR.B.DATC = enabled ? 1 : 0;
1078 }
1079 
1080 
1082 {
1083  hwObj->FCR.B.DLC = code;
1084 }
1085 
1086 
1087 IFX_INLINE void IfxMultican_MsgObj_setDataLengthCodeCopy(Ifx_CAN_MO *hwObj, boolean enabled)
1088 {
1089  hwObj->FCR.B.DLCC = enabled ? 1 : 0;
1090 }
1091 
1092 
1093 IFX_INLINE void IfxMultican_MsgObj_setGatewayDataFrameSend(Ifx_CAN_MO *hwObj, boolean enabled)
1094 {
1095  hwObj->FCR.B.GDFS = enabled ? 1 : 0;
1096 }
1097 
1098 
1099 IFX_INLINE void IfxMultican_MsgObj_setIdentifierCopy(Ifx_CAN_MO *hwObj, boolean enabled)
1100 {
1101  hwObj->FCR.B.IDC = enabled ? 1 : 0;
1102 }
1103 
1104 
1105 IFX_INLINE void IfxMultican_MsgObj_setIdentifierExtension(Ifx_CAN_MO *hwObj, boolean extension)
1106 {
1107  hwObj->AR.B.IDE = extension;
1108 }
1109 
1110 
1111 IFX_INLINE void IfxMultican_MsgObj_setMatchingId(Ifx_CAN_MO *hwObj, boolean matchingId)
1112 {
1113  hwObj->AMR.B.MIDE = matchingId;
1114 }
1115 
1116 
1117 IFX_INLINE void IfxMultican_MsgObj_setMessageId(Ifx_CAN_MO *hwObj, uint32 messageId, boolean extendedFrame)
1118 {
1119  hwObj->AR.B.ID = messageId << ((extendedFrame != 0) ? 0 : 18);
1120 }
1121 
1122 
1124 {
1125  hwObj->FCR.B.MMC = mode;
1126 }
1127 
1128 
1130 {
1131  hwObj->IPR.B.MPN = messageNumber;
1132 }
1133 
1134 
1135 IFX_INLINE void IfxMultican_MsgObj_setOverflowInterrupt(Ifx_CAN_MO *hwObj, boolean enabled)
1136 {
1137  hwObj->FCR.B.OVIE = enabled ? 1 : 0;
1138 }
1139 
1140 
1142 {
1143  hwObj->AR.B.PRI = priority;
1144 }
1145 
1146 
1147 IFX_INLINE void IfxMultican_MsgObj_setReceiveInterrupt(Ifx_CAN_MO *hwObj, boolean enabled)
1148 {
1149  hwObj->FCR.B.RXIE = enabled ? 1 : 0;
1150 }
1151 
1152 
1154 {
1155  hwObj->IPR.B.RXINP = srcId;
1156 }
1157 
1158 
1159 IFX_INLINE void IfxMultican_MsgObj_setRemoteMonitoring(Ifx_CAN_MO *hwObj, boolean enabled)
1160 {
1161  hwObj->FCR.B.RMM = enabled ? 1 : 0;
1162 }
1163 
1164 
1166 {
1167  hwObj->FGPR.B.SEL = objNumber;
1168 }
1169 
1170 
1171 IFX_INLINE void IfxMultican_MsgObj_setSingleDataTransfer(Ifx_CAN_MO *hwObj, boolean enabled)
1172 {
1173  hwObj->FCR.B.SDT = enabled ? 1 : 0;
1174 }
1175 
1176 
1177 IFX_INLINE void IfxMultican_MsgObj_setSingleTransmitTrial(Ifx_CAN_MO *hwObj, boolean enabled)
1178 {
1179  hwObj->FCR.B.STT = enabled ? 1 : 0;
1180 }
1181 
1182 
1184 {
1185  hwObj->FGPR.B.TOP = objNumber;
1186 }
1187 
1188 
1189 IFX_INLINE void IfxMultican_MsgObj_setTransmitInterrupt(Ifx_CAN_MO *hwObj, boolean enabled)
1190 {
1191  hwObj->FCR.B.TXIE = enabled ? 1 : 0;
1192 }
1193 
1194 
1196 {
1197  hwObj->IPR.B.TXINP = srcId;
1198 }
1199 
1200 
1201 IFX_INLINE void IfxMultican_Node_activate(Ifx_CAN_N *hwNode)
1202 {
1203  hwNode->CR.B.INIT = 0;
1204 }
1205 
1206 
1208 {
1209  hwNode->CR.B.INIT = 1;
1210 }
1211 
1212 
1214 {
1215  hwNode->CR.B.CCE = 0U;
1216 }
1217 
1218 
1220 {
1221  hwNode->CR.B.CCE = 1U;
1222 }
1223 
1224 
1226 {
1227  return &(mcan->N[node]);
1228 }
1229 
1230 
1232 {
1233  hwNode->CR.U = 0x00000041U;
1234 }
1235 
1236 
1238 {
1239  hwNode->ECNT.U = 0x00600000U;
1240 }
1241 
1242 
1244 {
1245  hwNode->IPR.U = 0x00000000U;
1246 }
1247 
1248 
1249 IFX_INLINE void IfxMultican_Node_setAlertInterrupt(Ifx_CAN_N *hwNode, boolean enabled)
1250 {
1251  hwNode->CR.B.ALIE = enabled ? 1 : 0;
1252 }
1253 
1254 
1256 {
1257  hwNode->IPR.B.ALINP = srcId;
1258 }
1259 
1260 
1261 IFX_INLINE void IfxMultican_Node_setAnalyzerMode(Ifx_CAN_N *hwNode, boolean mode)
1262 {
1263  hwNode->CR.B.CALM = mode != FALSE;
1264 }
1265 
1266 
1268 {
1269  hwNode->ECNT.B.EWRNLVL = level;
1270 }
1271 
1272 
1273 IFX_INLINE void IfxMultican_Node_setFrameCounterInterrupt(Ifx_CAN_N *hwNode, boolean enabled)
1274 {
1275  hwNode->FCR.B.CFCIE = enabled ? 1 : 0;
1276 }
1277 
1278 
1280 {
1281  hwNode->IPR.B.CFCINP = srcId;
1282 }
1283 
1284 
1286 {
1287  hwNode->FCR.B.CFMOD = mode;
1288 }
1289 
1290 
1291 IFX_INLINE void IfxMultican_Node_setLastErrorCodeInterrupt(Ifx_CAN_N *hwNode, boolean enabled)
1292 {
1293  hwNode->CR.B.LECIE = enabled ? 1 : 0;
1294 }
1295 
1296 
1298 {
1299  hwNode->IPR.B.LECINP = srcId;
1300 }
1301 
1302 
1303 IFX_INLINE void IfxMultican_Node_setLoopBackMode(Ifx_CAN_N *hwNode, boolean mode)
1304 {
1305  hwNode->PCR.B.LBM = mode != FALSE;
1306 }
1307 
1308 
1310 {
1311  hwNode->ECNT.B.REC = value;
1312 }
1313 
1314 
1316 {
1317  hwNode->IPR.B.TEINP = srcId;
1318 }
1319 
1320 
1321 IFX_INLINE void IfxMultican_Node_setTransferInterrupt(Ifx_CAN_N *hwNode, boolean enabled)
1322 {
1323  hwNode->CR.B.TRIE = enabled ? 1 : 0;
1324 }
1325 
1326 
1328 {
1329  hwNode->IPR.B.TRINP = srcId;
1330 }
1331 
1332 
1334 {
1335  hwNode->ECNT.B.TEC = value;
1336 }
1337 
1338 
1340 {
1341  mcan->MCR.B.MPSEL = 0x0U;
1342 }
1343 
1344 
1346 {
1347  mcan->MSPND[list].U = 0x0;
1348 }
1349 
1350 
1352 {
1353  mcan->CLC.B.DISR = 1U;
1354 }
1355 
1356 
1358 {
1359  mcan->CLC.B.EDIS = 1U;
1360 }
1361 
1362 
1364 {
1365  mcan->CLC.B.DISR = 0U;
1366 }
1367 
1368 
1370 {
1371  mcan->CLC.B.EDIS = 0U;
1372 }
1373 
1374 
1376 {
1377  return mcan->FDR.B.DM;
1378 }
1379 
1380 
1382 {
1383  return mcan->FDR.B.STEP;
1384 }
1385 
1386 
1388 {
1389  return (IfxMultican_ClockSelect)mcan->MCR.B.CLKSEL;
1390 }
1391 
1392 
1394 {
1395  return mcan->CLC.B.DISS == 0;
1396 }
1397 
1398 
1400 {
1401  mcan->FDR.B.DM = mode;
1402 }
1403 
1404 
1406 {
1407  mcan->FDR.B.STEP = stepValue;
1408 }
1409 
1410 
1412 {
1413  mcan->MCR.B.CLKSEL = clockSelect;
1414 }
1415 
1416 
1418 {
1419  mcan->MSIMASK.U = mask;
1420 }
1421 
1422 
1424 {
1426  IfxScuWdt_clearCpuEndinit(passwd);
1427  can->CLC.B.EDIS = mode;
1428  IfxScuWdt_setCpuEndinit(passwd);
1429 }
1430 
1431 
1433 {
1434  while (mcan->PANCTR.B.BUSY != 0)
1435  {}
1436 }
1437 
1438 
1439 #endif /* IFXMULTICAN_H */