Mcan_Hal_TxConfigType

Module: HAL (AM13E230X) API / CAN HAL API

CAN TX configuration parameters. More…

#include <Mcan_Hal.h>

Public Attributes

Name

uint8

TxBufNum
Number of dedicated TX buffers Total dedicated + FIFO/Queue must not exceed MCAN_HAL_TX_BUFFER_MAX (32).

uint8

TxFifoSize
TX FIFO/Queue size Total dedicated + FIFO/Queue must not exceed MCAN_HAL_TX_BUFFER_MAX (32).

boolean

TxQueueMode
TX FIFO/Queue operating mode FALSE (default): TX FIFO — messages transmitted in FIFO order. TRUE : TX Queue — hardware transmits highest-priority message first.

uint8

TxBufElemSize
TX Buffer element data field size in bytes For Classic CAN (MaxMsgFormat=CLASSIC): fixed at 8 bytes. For CAN FD (MaxMsgFormat=FD): choose 8, 12, 16, 20, 24, 32, 48, or 64.

uint8

TxEventFifoSize
TX Event FIFO size. Set to 0 to disable TX Event FIFO.

uint8

TxEventFifoWatermark
TX Event FIFO watermark level (0=disabled, MCAN_TXEFC.EFWM); MCAN_IR.TEFW fires when fill level reaches this value.

Mcan_Hal_ProcessingModeType

TxProcessingMode
TX processing mode: polling or interrupt. POLLING — use Mcan_Hal_CheckTxConfirmationPoll() to detect TX completion. INTERRUPT — TX Event FIFO new entry fires the TxConfirmationCb callback.

Mcan_Hal_TxConfirmationCallbackType

TxConfirmationCb
TX Confirmation callback — called from Mcan_Hal_InterruptHandler_Line0() when a frame has been successfully transmitted.

uint32

TxIntrMask
TX interrupt enable mask. OR [MCAN_HAL_INTR_SRC_TX] macros to select which TX interrupt sources are enabled. Use MCAN_HAL_INTR_SRC_TX_DEFAULT for the recommended set. Set to 0U to disable all TX interrupts.

boolean

DisableAutoRetransmission
Disable Automatic Retransmission (MCAN_CCCR.DAR). FALSE (default): automatic retransmission enabled. TRUE : automatic retransmission disabled.

boolean

EnableTransmitPause
Enable Transmit Pause When TRUE, MCAN pauses 2 CAN bit times after each successful transmission.

Detailed Description

struct Mcan_Hal_TxConfigType;

CAN TX configuration parameters.

Groups all TX-related Message RAM and queue configuration fields used during initialization.

Public Attributes Documentation

variable TxBufNum

uint8 TxBufNum;

Number of dedicated TX buffers Total dedicated + FIFO/Queue must not exceed MCAN_HAL_TX_BUFFER_MAX (32).

variable TxFifoSize

uint8 TxFifoSize;

TX FIFO/Queue size Total dedicated + FIFO/Queue must not exceed MCAN_HAL_TX_BUFFER_MAX (32).

variable TxQueueMode

boolean TxQueueMode;

TX FIFO/Queue operating mode FALSE (default): TX FIFO — messages transmitted in FIFO order. TRUE : TX Queue — hardware transmits highest-priority message first.

variable TxBufElemSize

uint8 TxBufElemSize;

TX Buffer element data field size in bytes For Classic CAN (MaxMsgFormat=CLASSIC): fixed at 8 bytes. For CAN FD (MaxMsgFormat=FD): choose 8, 12, 16, 20, 24, 32, 48, or 64.

variable TxEventFifoSize

uint8 TxEventFifoSize;

TX Event FIFO size. Set to 0 to disable TX Event FIFO.

variable TxEventFifoWatermark

uint8 TxEventFifoWatermark;

TX Event FIFO watermark level (0=disabled, MCAN_TXEFC.EFWM); MCAN_IR.TEFW fires when fill level reaches this value.

variable TxProcessingMode

Mcan_Hal_ProcessingModeType TxProcessingMode;

TX processing mode: polling or interrupt. POLLING — use Mcan_Hal_CheckTxConfirmationPoll() to detect TX completion. INTERRUPT — TX Event FIFO new entry fires the TxConfirmationCb callback.

variable TxConfirmationCb

Mcan_Hal_TxConfirmationCallbackType TxConfirmationCb;

TX Confirmation callback — called from Mcan_Hal_InterruptHandler_Line0() when a frame has been successfully transmitted.

variable TxIntrMask

uint32 TxIntrMask;

TX interrupt enable mask. OR [MCAN_HAL_INTR_SRC_TX] macros to select which TX interrupt sources are enabled. Use MCAN_HAL_INTR_SRC_TX_DEFAULT for the recommended set. Set to 0U to disable all TX interrupts.

variable DisableAutoRetransmission

boolean DisableAutoRetransmission;

Disable Automatic Retransmission (MCAN_CCCR.DAR). FALSE (default): automatic retransmission enabled. TRUE : automatic retransmission disabled.

variable EnableTransmitPause

boolean EnableTransmitPause;

Enable Transmit Pause When TRUE, MCAN pauses 2 CAN bit times after each successful transmission.