Mcan_Hal_InitParamsType
Module: HAL (AM13E232X) API / CAN HAL API
CAN HW initialization parameters.
#include <Mcan_Hal.h>
Public Attributes
Name |
|
|---|---|
void * |
HwRegsPtr |
void * |
UserArgsPtr |
MaxMsgFormat |
|
TxConfig |
|
RxConfig |
|
ErrorCb |
|
ErrorProcessingMode |
|
ErrorIntrMask |
|
TimestampPrescaler |
|
TimeoutEnable |
|
TimeoutPreload |
|
EmulationEnable |
|
EdgeFilteringEnable |
|
ProtocolExceptionHandlingDisable |
|
WakeupRequestEnable |
|
AutoWakeupEnable |
|
WatchdogCounterPreload |
Public Attributes Documentation
variable HwRegsPtr
void * HwRegsPtr;
Pointer to CAN HW registers - MCAN base address.
variable UserArgsPtr
void * UserArgsPtr;
Pointer to user arguments, returned back to user when any CAN callback is called.
variable MaxMsgFormat
Mcan_Hal_MsgFormatType MaxMsgFormat;
Maximum message format supported by this instance (Classic or FD). Configures MCAN_CCCR.FDOE and MCAN_CCCR.BRSE bits.
variable TxConfig
Mcan_Hal_TxConfigType TxConfig;
TX queue, buffer, and callback configuration.
variable RxConfig
Mcan_Hal_RxConfigType RxConfig;
RX FIFO, buffer, filter, global filter, and callback configuration.
variable ErrorCb
Mcan_Hal_ErrorCallbackType ErrorCb;
Error/status callback — called from Mcan_Hal_InterruptHandler_Line0() when one or more error/status interrupt sources (MCAN_IR) are pending. Only called when non-NULL.
variable ErrorProcessingMode
Mcan_Hal_ProcessingModeType ErrorProcessingMode;
Error processing mode set during Mcan_Hal_Init.
variable ErrorIntrMask
uint32 ErrorIntrMask;
Error interrupt enable mask. OR [MCAN_HAL_INTR_SRC_ERR] macros to select which error/status interrupt sources are enabled. Use MCAN_HAL_INTR_SRC_ERR_DEFAULT for the recommended set. Set to 0U to disable all error interrupts.
variable TimestampPrescaler
uint8 TimestampPrescaler;
Timestamp counter prescaler Timestamp increments every CAN bit periods. 1 (default) = increment every CAN bit period.
variable TimeoutEnable
boolean TimeoutEnable;
Enable the MCAN timeout counter When TRUE, MCAN_IR.TOO fires when the counter reaches 0. FALSE (default): timeout counter disabled.
variable TimeoutPreload
uint16 TimeoutPreload;
Timeout counter preload value Counter counts down from this value. Only used when TimeoutEnable=TRUE.
variable EmulationEnable
boolean EmulationEnable;
Emulation/debug suspend mode (MCANSS_CTRL.DBGSUSP_FREE). FALSE (default): MCAN stops immediately when debugger asserts suspend (DBGSUSP_FREE=0). TRUE : When suspend is asserted, an internal clock-stop request is issued; MCAN finishes all pending TX frames, waits for bus idle, then sets MCAN_CCCR.INIT=1.
variable EdgeFilteringEnable
boolean EdgeFilteringEnable;
Edge Filtering during Bus Integration (MCAN_CCCR.EFBI). FALSE (default): Edge filtering disabled. TRUE : Two consecutive dominant time quanta required to detect an edge for hard synchronization.
variable ProtocolExceptionHandlingDisable
boolean ProtocolExceptionHandlingDisable;
Protocol Exception Handling Disable (MCAN_CCCR.PXHD). FALSE (default): Protocol exception handling enabled — MCAN enters integrating state on protocol exception. TRUE : Protocol exception handling disabled — MCAN transmits an error frame on protocol exception.
variable WakeupRequestEnable
boolean WakeupRequestEnable;
Wakeup Request Enable (MCANSS_CTRL.WAKEUPREQEN). FALSE (default) : Wakeup request disabled. TRUE : MCAN generates a wakeup request when the RX pin is dominant (logical 0) during clock-stop mode.
variable AutoWakeupEnable
boolean AutoWakeupEnable;
Auto-Wakeup Enable (MCANSS_CTRL.AUTOWAKEUP). FALSE (default) : Auto-wakeup disabled. TRUE : After clock-stop removal, MCAN automatically clears MCAN_CCCR.INIT to resume operation. Requires WakeupRequestEnable=TRUE.
variable WatchdogCounterPreload
uint8 WatchdogCounterPreload;
Message RAM Watchdog Counter preload value (MCAN_RWD.WDC, range 0x00-0xFF). The watchdog monitors the Message RAM READY signal. A value of 0 (default) disables the watchdog. When non-zero, the counter starts on each Message RAM access and fires MCAN_IR.WDI if the RAM does not respond before the counter reaches zero.