iLLD_TC29x
1.0
|
MULTICAN basic functionality. More...
#include "_Impl/IfxMultican_cfg.h"
#include "Src/Std/IfxSrc.h"
#include "_PinMap/IfxMultican_PinMap.h"
#include "Cpu/Std/IfxCpu_Intrinsics.h"
#include "IfxCan_reg.h"
#include "IfxCan_bf.h"
#include "Scu/Std/IfxScuWdt.h"
Go to the source code of this file.
Data Structures | |
union | IfxMultican_MsgObjStat |
Message object status bit-fields. More... | |
Typedefs | |
typedef sint32 | IfxMultican_MsgObjId |
Message object ID, 0 .. IFXMULTICAN_NUM_MESSAGE_OBJECTS. More... | |
Functions | |
IFX_INLINE void | IfxMultican_clearMessagePendingSeletor (Ifx_CAN *mcan) |
clears the message pending interrupt notification of a given list More... | |
IFX_INLINE void | IfxMultican_clearPendingMessageNotification (Ifx_CAN *mcan, uint16 list) |
clears the message pending interrupt notification of a given list More... | |
IFX_INLINE void | IfxMultican_disableModule (Ifx_CAN *mcan) |
Disables the module (sets the disable request) More... | |
IFX_INLINE void | IfxMultican_disableSleepMode (Ifx_CAN *mcan) |
Disregards the sleep mode of the module. More... | |
IFX_INLINE void | IfxMultican_enableModule (Ifx_CAN *mcan) |
Enables the module (clears the disable request) More... | |
IFX_INLINE void | IfxMultican_enableSleepMode (Ifx_CAN *mcan) |
Enables the sleep mode of the module. More... | |
IFX_INLINE uint16 | IfxMultican_getFractionalDividerMode (Ifx_CAN *mcan) |
Returns the selected fractional divider mode. More... | |
IFX_INLINE uint16 | IfxMultican_getFractionalDividerStepValue (Ifx_CAN *mcan) |
Returns the reload or addition value for the result. More... | |
IFX_INLINE IfxMultican_ClockSelect | IfxMultican_getInputClock (Ifx_CAN *mcan) |
Returns the selected input clock source. More... | |
IFX_INLINE boolean | IfxMultican_isModuleEnabled (Ifx_CAN *mcan) |
Returns the status of module enabled or disabled. More... | |
IFX_INLINE void | IfxMultican_setFractionalDividerMode (Ifx_CAN *mcan, uint16 mode) |
sets the fractional divider mode More... | |
IFX_INLINE void | IfxMultican_setFractionalDividerStepValue (Ifx_CAN *mcan, uint16 stepValue) |
sets reload or addition value for the result. More... | |
IFX_INLINE void | IfxMultican_setInputClock (Ifx_CAN *mcan, IfxMultican_ClockSelect clockSelect) |
Sets the input clock source. More... | |
IFX_INLINE void | IfxMultican_setMessageIndexMask (Ifx_CAN *mcan, uint32 mask) |
clears the message pending interrupt notification of a given list More... | |
IFX_INLINE void | IfxMultican_setSleepMode (Ifx_CAN *can, IfxMultican_SleepMode mode) |
Sets the sensitivity of the module to sleep signal. More... | |
IFX_INLINE void | IfxMultican_waitListReady (Ifx_CAN *mcan) |
Wait until the list panel is ready. More... | |
IFX_EXTERN void | IfxMultican_deinit (Ifx_CAN *mcan) |
Reset the CAN module Reset and disable the CAN module, inclusive message object and node registers. More... | |
IFX_EXTERN void | IfxMultican_resetModule (Ifx_CAN *can) |
resets Multican kernel More... | |
IFX_EXTERN void | IfxMultican_setListCommand (Ifx_CAN *mcan, uint32 cmd, uint32 arg2, uint32 arg1) |
Execute a command from the command panel. More... | |
IFX_INLINE void | IfxMultican_Node_activate (Ifx_CAN_N *hwNode) |
Activate the CAN Node. Participate in the CAN bus activities. More... | |
IFX_INLINE void | IfxMultican_Node_deactivate (Ifx_CAN_N *hwNode) |
Deactivate the CAN Node. Take out from participation in the CAN bus activities. More... | |
IFX_INLINE void | IfxMultican_Node_disableConfigurationChange (Ifx_CAN_N *hwNode) |
Disables the configuration changes for the Bit Timing Register, the Port Control Register, and the Error Counter Register of a CAN Node. More... | |
IFX_INLINE void | IfxMultican_Node_enableConfigurationChange (Ifx_CAN_N *hwNode) |
Enables the configuration changes for the Bit Timing Register, the Port Control Register, and the Error Counter Register of a CAN Node. More... | |
IFX_INLINE Ifx_CAN_N * | IfxMultican_Node_getPointer (Ifx_CAN *mcan, IfxMultican_NodeId node) |
Returns the base address to a given CAN node number. More... | |
IFX_INLINE void | IfxMultican_Node_resetControlRegister (Ifx_CAN_N *hwNode) |
Resets the control register of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_resetErrorCounters (Ifx_CAN_N *hwNode) |
Resets the error counters of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_resetInterruptPointers (Ifx_CAN_N *hwNode) |
Resets the interrupt pointers of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_setAlertInterrupt (Ifx_CAN_N *hwNode, boolean enabled) |
Enables / Disables the alert interrupt of CAN node x. More... | |
IFX_INLINE void | IfxMultican_Node_setAlertInterruptPointer (Ifx_CAN_N *hwNode, IfxMultican_SrcId srcId) |
Selects the interrupt output line INT_Om (m = 0-15) for an alert interrupt of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_setAnalyzerMode (Ifx_CAN_N *hwNode, boolean mode) |
Enables / Disables the analyzer mode of CAN node x. More... | |
IFX_INLINE void | IfxMultican_Node_setErrorWarningLevel (Ifx_CAN_N *hwNode, uint8 level) |
Determines the threshold value (warning level, default 96) to be reached in order to set the corresponding error warning bit EWRN. More... | |
IFX_INLINE void | IfxMultican_Node_setFrameCounterInterrupt (Ifx_CAN_N *hwNode, boolean enabled) |
Enables / Disables the CAN frame counter overflow interrupt of CAN node x. More... | |
IFX_INLINE void | IfxMultican_Node_setFrameCounterInterruptPointer (Ifx_CAN_N *hwNode, IfxMultican_SrcId srcId) |
Selects the interrupt output line INT_Om (m = 0-15) for a frame counter overflow interrupt of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_setFrameCounterMode (Ifx_CAN_N *hwNode, IfxMultican_FrameCounterMode mode) |
Sets the operation mode of the frame counter of the CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_setLastErrorCodeInterrupt (Ifx_CAN_N *hwNode, boolean enabled) |
Enables / Disables the last error code interrupt of CAN node x. This interrupt is generated with each hardware update of bit field NSRx.LEC with LEC > 0 (CAN protocol error). More... | |
IFX_INLINE void | IfxMultican_Node_setLastErrorCodeInterruptPointer (Ifx_CAN_N *hwNode, IfxMultican_SrcId srcId) |
Selects the interrupt output line INT_Om (m = 0-15) for an LEC interrupt of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_setLoopBackMode (Ifx_CAN_N *hwNode, boolean mode) |
Enables / Disables the loopback mode of CAN node x. More... | |
IFX_INLINE void | IfxMultican_Node_setReceiveErrorCounter (Ifx_CAN_N *hwNode, uint8 value) |
Sets the value of the receive error counter of CAN node x. More... | |
IFX_INLINE void | IfxMultican_Node_setTimerEventInterruptPointer (Ifx_CAN_N *hwNode, IfxMultican_SrcId srcId) |
Selects the interrupt output line INT_Om (m = 0-15) for a timer event interrupt of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_setTransferInterrupt (Ifx_CAN_N *hwNode, boolean enabled) |
Enables / Disables the transfer interrupt of CAN node x. This interrupt is generated after the successful reception or transmission of a CAN frame in node x. More... | |
IFX_INLINE void | IfxMultican_Node_setTransferInterruptPointer (Ifx_CAN_N *hwNode, IfxMultican_SrcId srcId) |
Selects the interrupt output line INT_Om (m = 0-15) for a transfer OK interrupt of CAN Node x. More... | |
IFX_INLINE void | IfxMultican_Node_setTransmitErrorCounter (Ifx_CAN_N *hwNode, uint8 value) |
Sets the value of the transmit error counter of CAN node x. More... | |
IFX_EXTERN void | IfxMultican_Node_deinit (Ifx_CAN_N *hwNode) |
Reset the CAN node. More... | |
IFX_EXTERN boolean | IfxMultican_Node_initRxPin (Ifx_CAN_N *hwNode, IfxMultican_Rxd_In *rxd, IfxPort_InputMode mode) |
Select and initialise the CAN node receive pin. More... | |
IFX_EXTERN boolean | IfxMultican_Node_initTxPin (Ifx_CAN_N *hwNode, IfxMultican_Txd_Out *txd, IfxPort_OutputMode mode) |
Select and initialise the CAN node transmit pin. More... | |
IFX_EXTERN IfxMultican_Status | IfxMultican_Node_recoverBusOff (Ifx_CAN_N *hwNode) |
Recovers the CAN node from bus off. More... | |
IFX_EXTERN void | IfxMultican_Node_setBitTiming (Ifx_CAN_N *hwNode, float32 moduleFreq, uint32 baudrate, uint16 samplePoint, uint16 synchJumpWidth) |
Calculates the best posible values and configures BTR register. More... | |
IFX_EXTERN void | IfxMultican_calcTimingFromBTR (float32 moduleFreq, uint32 btr, uint32 *baudrate, uint16 *samplePoint, uint16 *synchJumpWidth) |
Returns the CAN node timing. More... | |
IFX_INLINE void | IfxMultican_Message_init (IfxMultican_Message *msg, uint32 id, uint32 dataLow, uint32 dataHigh, IfxMultican_DataLengthCode lengthCode) |
Initializes a CAN message. More... | |
IFX_INLINE void | IfxMultican_MsgObj_clearDataRegisters (Ifx_CAN_MO *hwObj) |
Sets priority class of message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_clearFifoGatewayPointers (Ifx_CAN_MO *hwObj) |
Clears the FIFO/GateWay pointers of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_clearRxPending (Ifx_CAN_MO *hwObj) |
Clear the RX pending flag of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_clearTxPending (Ifx_CAN_MO *hwObj) |
Clear the TX pending flag of a message object. More... | |
IFX_INLINE IfxMultican_MsgObjId | IfxMultican_MsgObj_getBottomObjectPointer (Ifx_CAN_MO *hwObj) |
Gets bottom object pointer of the base message object. More... | |
IFX_INLINE IfxMultican_DataLengthCode | IfxMultican_MsgObj_getDataLengthCode (Ifx_CAN_MO *hwObj) |
Gets data length code of a message object. More... | |
IFX_INLINE uint32 | IfxMultican_MsgObj_getMessageId (Ifx_CAN_MO *hwObj) |
Gets message identifier of message object. More... | |
IFX_INLINE IfxMultican_MsgObjId | IfxMultican_MsgObj_getNextObjectPointer (Ifx_CAN_MO *hwObj) |
Returns next object pointer (PNEXT) of the current message object. More... | |
IFX_INLINE Ifx_CAN_MO * | IfxMultican_MsgObj_getPointer (Ifx_CAN *mcan, IfxMultican_MsgObjId msgObjId) |
Get base address of a message object register. More... | |
IFX_INLINE boolean | IfxMultican_MsgObj_isExtendedFrame (Ifx_CAN_MO *hwObj) |
Get the message object status. More... | |
IFX_INLINE boolean | IfxMultican_MsgObj_isRxPending (Ifx_CAN_MO *hwObj) |
Returns the RX pending flag of a message object. More... | |
IFX_INLINE boolean | IfxMultican_MsgObj_isTransmitRequested (Ifx_CAN_MO *hwObj) |
Returns the TX Request flag of a message object. More... | |
IFX_INLINE boolean | IfxMultican_MsgObj_isTxPending (Ifx_CAN_MO *hwObj) |
Returns the TX pending flag of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setAcceptanceMask (Ifx_CAN_MO *hwObj, uint32 mask, boolean extendedFrame) |
Sets acceptance mask for the message identifier. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setBottomObjectPointer (Ifx_CAN_MO *hwObj, sint32 objNumber) |
Sets bottom object pointer of the base message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setCurrentObjectPointer (Ifx_CAN_MO *hwObj, sint32 objNumber) |
Sets bottom current pointer of the base message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setDataCopy (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable data copy of a gateway source message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setDataLengthCode (Ifx_CAN_MO *hwObj, IfxMultican_DataLengthCode code) |
Sets data length code of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setDataLengthCodeCopy (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable data length code copy of a gateway source message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setGatewayDataFrameSend (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable gateway data frame send of a gateway source message object which in turn sets the TXRQ of the gateway deatination object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setIdentifierCopy (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable identifier copy of a gateway source message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setIdentifierExtension (Ifx_CAN_MO *hwObj, boolean extension) |
Sets identifier extension of message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setMatchingId (Ifx_CAN_MO *hwObj, boolean matchingId) |
Sets acceptance mask for the message IDE bit. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setMessageId (Ifx_CAN_MO *hwObj, uint32 messageId, boolean extendedFrame) |
Sets message identifier of message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setMessageMode (Ifx_CAN_MO *hwObj, IfxMultican_MsgObjMode mode) |
Sets the message mode of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setMessagePendingNumber (Ifx_CAN_MO *hwObj, IfxMultican_MsgObjId messageNumber) |
Sets message pending number that selects the bit position of the bit in the Message Pending Register that is set upon a message object n receive/transmit interrupt. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setOverflowInterrupt (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable overflow interrupt of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setPriorityClass (Ifx_CAN_MO *hwObj, IfxMultican_Priority priority) |
Sets priority class of message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setReceiveInterrupt (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable receive interrupt of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setReceiveInterruptNodePointer (Ifx_CAN_MO *hwObj, IfxMultican_SrcId srcId) |
Sets receive interrupt node pointer of message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setRemoteMonitoring (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable transmit object remote monitoring of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setSelectObjectPointer (Ifx_CAN_MO *hwObj, sint32 objNumber) |
Sets bottom object select pointer of the base message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setSingleDataTransfer (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable single data transfer of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setSingleTransmitTrial (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable single transmit trial of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setTopObjectPointer (Ifx_CAN_MO *hwObj, sint32 objNumber) |
Sets top object pointer of the base message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setTransmitInterrupt (Ifx_CAN_MO *hwObj, boolean enabled) |
Enable / Disable transmit interrupt of a message object. More... | |
IFX_INLINE void | IfxMultican_MsgObj_setTransmitInterruptNodePointer (Ifx_CAN_MO *hwObj, IfxMultican_SrcId srcId) |
Sets transmit interrupt node pointer of message object. More... | |
IFX_EXTERN boolean | IfxMultican_MsgObj_cancelSend (Ifx_CAN_MO *hwObj) |
Cancel pending TX request by invalidating the request, only when frame transmission has not been started. More... | |
IFX_EXTERN void | IfxMultican_MsgObj_clearStatusFlag (Ifx_CAN_MO *hwObj, IfxMultican_MsgObjStatusFlag flag) |
Clears the selected status flag of a message object. More... | |
IFX_EXTERN void | IfxMultican_MsgObj_deinit (Ifx_CAN *mcan, IfxMultican_MsgObjId msgObjId) |
Reset the message object Append the message object to the end of idle list and reset message object registers. More... | |
IFX_EXTERN IfxMultican_MsgObjId | IfxMultican_MsgObj_getPendingId (Ifx_CAN *mcan, IfxMultican_MsgObjGroup msgObjGroup) |
Get message object ID which has TX/RX pending flag from a message object group. More... | |
IFX_EXTERN IfxMultican_MsgObjStat | IfxMultican_MsgObj_getStatus (Ifx_CAN_MO *hwObj) |
Get the message object status. More... | |
IFX_EXTERN boolean | IfxMultican_MsgObj_getStatusFlag (Ifx_CAN_MO *hwObj, IfxMultican_MsgObjStatusFlag flag) |
Gets the status of the selected status flag of a message object. More... | |
IFX_EXTERN IfxMultican_Status | IfxMultican_MsgObj_readMessage (Ifx_CAN_MO *hwObj, IfxMultican_Message *msg) |
Read a received CAN message. More... | |
IFX_EXTERN IfxMultican_Status | IfxMultican_MsgObj_sendMessage (Ifx_CAN_MO *hwObj, const IfxMultican_Message *msg) |
Send a CAN message. More... | |
IFX_EXTERN void | IfxMultican_MsgObj_setFilter (Ifx_CAN_MO *hwObj, boolean extend, uint32 id, uint32 accMask) |
Set message object filter. More... | |
IFX_EXTERN void | IfxMultican_MsgObj_setStatusFlag (Ifx_CAN_MO *hwObj, IfxMultican_MsgObjStatusFlag flag) |
Sets the selected status flag of a message object. More... | |
IFX_EXTERN volatile Ifx_SRC_SRCR * | IfxMultican_getSrcPointer (Ifx_CAN *mcan, IfxMultican_SrcId srcId) |
Get the interrupt source register. More... | |
MULTICAN basic functionality.
IMPORTANT NOTICE
Infineon Technologies AG (Infineon) is supplying this file for use exclusively with Infineon's microcontroller products. This file can be freely distributed within development tools that are supporting such microcontroller products.
THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
Definition in file IfxMultican.h.
struct IfxMultican_Message |
CAN message definition.
Definition at line 206 of file IfxMultican.h.
Data Fields | ||
---|---|---|
uint32 | data[2] | CAN message data. |
boolean | fastBitRate | CAN FD fast bit rate enable/disable. |
uint32 | id | CAN message ID. |
IfxMultican_DataLengthCode | lengthCode | CAN message data length code. |
union IfxMultican_MsgObjStat |
Message object status bit-fields.
Definition at line 216 of file IfxMultican.h.
Data Fields | ||
---|---|---|
Ifx_CAN_MO_STAT_Bits | B | |
unsigned int | U |
typedef sint32 IfxMultican_MsgObjId |
Message object ID, 0 .. IFXMULTICAN_NUM_MESSAGE_OBJECTS.
Definition at line 59 of file IfxMultican.h.