152 uint32_t *pTxEvtFifo;
160 uint32_t fastBitTiming;
161 uint32_t nmbrStdFilts;
162 uint32_t nmbrExtFilts;
163 uint32_t nmbrFifo0Elmts;
164 uint32_t nmbrFifo1Elmts;
165 uint32_t nmbrRxDedBufElmts;
166 uint32_t nmbrTxEvtFifoElmts;
167 uint32_t nmbrTxDedBufElmts;
168 uint32_t nmbrTxFifoQElmts;
169 uint32_t rxFifo0ElmtSize;
170 uint32_t rxFifo1ElmtSize;
171 uint32_t rxBufElmtSize;
173 uint32_t txBufElmtSize;
181__STATIC_INLINE uint32_t MCAN_IsTxComplete(
184 Mcan *mcan = mcanConfig->pMCan;
185 return (mcan->
MCAN_IR & MCAN_IR_TC);
188__STATIC_INLINE
void MCAN_ClearTxComplete(
191 Mcan *mcan = mcanConfig->pMCan;
195__STATIC_INLINE uint32_t MCAN_IsMessageStoredToRxDedBuffer(
198 Mcan *mcan = mcanConfig->pMCan;
200 return (mcan->
MCAN_IR & MCAN_IR_DRX);
203__STATIC_INLINE
void MCAN_ClearMessageStoredToRxBuffer(
206 Mcan *mcan = mcanConfig->pMCan;
210__STATIC_INLINE uint32_t MCAN_IsMessageStoredToRxFifo0(
213 Mcan *mcan = mcanConfig->pMCan;
214 return (mcan->
MCAN_IR & MCAN_IR_RF0N);
217__STATIC_INLINE
void MCAN_ClearMessageStoredToRxFifo0(
220 Mcan *mcan = mcanConfig->pMCan;
224__STATIC_INLINE uint32_t MCAN_IsMessageStoredToRxFifo1(
227 Mcan *mcan = mcanConfig->pMCan;
228 return (mcan->
MCAN_IR & MCAN_IR_RF1N);
231__STATIC_INLINE
void MCAN_ClearMessageStoredToRxFifo1(
234 Mcan *mcan = mcanConfig->pMCan;
273 MCan_IntrLineType line);
288 uint32_t
id, MCan_IdType idType,
289 MCan_DlcType dlc, uint8_t *data);
void MCAN_ConfigRxClassicFilter(const MCan_ConfigType *mcanConfig, MCan_FifoType fifo, uint8_t filter, uint32_t id, MCan_IdType idType, uint32_t mask)
Configure Classic Filter Classic Filters direct accepted messages to a FIFO & include both a ID and a...
Definition: mcan.c:995
uint32_t MCAN_GetRxFifoBuffer(const MCan_ConfigType *mcanConfig, MCan_FifoType fifo, Mailbox64Type *pRxMailbox)
Get from the receive FIFO and place in a application mailbox.
Definition: mcan.c:1113
void MCAN_RequestFd(const MCan_ConfigType *mcanConfig)
Requests switch to FD mode (tx & rx payloads up to 64 bytes) but transmits WITHOUT bit rate switching...
Definition: mcan.c:767
void MCAN_IEnableMessageStoredToRxDedBuffer(const MCan_ConfigType *mcanConfig, MCan_IntrLineType line)
Enable message line and message stored to Dedicated Receive Buffer Interrupt Line.
Definition: mcan.c:827
uint8_t MCAN_IsNewDataInRxDedBuffer(const MCan_ConfigType *mcanConfig, uint8_t buffer)
check if data received into buffer
Definition: mcan.c:1037
void MCAN_ConfigRxBufferFilter(const MCan_ConfigType *mcanConfig, uint32_t buffer, uint32_t filter, uint32_t id, MCan_IdType idType)
Configure RX Buffer Filter ID must match exactly for a RX Buffer Filter.
Definition: mcan.c:957
void MCAN_InitFdBitRateSwitchEnable(const MCan_ConfigType *mcanConfig)
Enables a FUTURE switch to FD mode (tx & rx payloads up to 64 bytes) and transmits WITH bit rate swit...
Definition: mcan.c:697
void MCAN_Enable(const MCan_ConfigType *mcanConfig)
Enable MCAN peripheral. INIT must be set - so this should be called between MCAN_Init()
Definition: mcan.c:738
uint8_t * MCAN_ConfigTxDedBuffer(const MCan_ConfigType *mcanConfig, uint8_t buffer, uint32_t id, MCan_IdType idType, MCan_DlcType dlc)
Configures a Dedicated TX Buffer.
Definition: mcan.c:853
void MCAN_LoopbackOff(const MCan_ConfigType *mcanConfig)
Switch off loop back mode.
Definition: mcan.c:815
void MCAN_InitLoopback(const MCan_ConfigType *mcanConfig)
Initializes the MCAN in loop back mode. INIT must be set - so this should be called between MCAN_Init...
Definition: mcan.c:712
void MCAN_Init(const MCan_ConfigType *mcanConfig)
Initializes the MCAN hardware for giving peripheral. Default: Mixed mode TX Buffer + FIFO.
Definition: mcan.c:540
void MCAN_RequestFdBitRateSwitch(const MCan_ConfigType *mcanConfig)
Request switch to FD mode (tx & rx payloads up to 64 bytes) and transmits WITH bit rate switching....
Definition: mcan.c:786
void MCAN_GetRxDedBuffer(const MCan_ConfigType *mcanConfig, uint8_t buffer, Mailbox64Type *pRxMailbox)
Get Rx buffer.
Definition: mcan.c:1056
void MCAN_SendTxDedBuffer(const MCan_ConfigType *mcanConfig, uint8_t buffer)
Send Tx buffer.
Definition: mcan.c:882
void MCAN_LoopbackOn(const MCan_ConfigType *mcanConfig)
Switch on loop back mode. TEST must be set in MCAN_CCCR - e.g. by a prior call to MCAN_InitLoopback()
Definition: mcan.c:805
void MCAN_RequestIso11898_1(const MCan_ConfigType *mcanConfig)
Requests switch to Iso11898-1 (standard / classic) mode (tx & rx payloads up to 8 bytes).
Definition: mcan.c:749
void MCAN_InitFdEnable(const MCan_ConfigType *mcanConfig)
Enables a FUTURE switch to FD mode (tx & rx payloads up to 64 bytes) but transmits WITHOUT bit rate s...
Definition: mcan.c:682
uint32_t MCAN_AddToTxFifoQ(const MCan_ConfigType *mcanConfig, uint32_t id, MCan_IdType idType, MCan_DlcType dlc, uint8_t *data)
Adds Message to TX Fifo / Queue.
Definition: mcan.c:898
uint8_t MCAN_IsBufferTxd(const MCan_ConfigType *mcanConfig, uint8_t buffer)
Check if data transmitted from buffer/fifo/queue.
Definition: mcan.c:942
void MCAN_InitTxQueue(const MCan_ConfigType *mcanConfig)
Initializes MCAN queue for TX INIT must be set - so this should be called between MCAN_Init() and MCA...
Definition: mcan.c:727
Mcan hardware registers.
Definition: component_mcan.h:41
__IO uint32_t MCAN_IR
(Mcan Offset: 0x50) Interrupt Register
Definition: component_mcan.h:57