RTEMS 6.1-rc1
stm32h7xx_hal_fdcan.h
Go to the documentation of this file.
1
19/* Define to prevent recursive inclusion -------------------------------------*/
20#ifndef STM32H7xx_HAL_FDCAN_H
21#define STM32H7xx_HAL_FDCAN_H
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Includes ------------------------------------------------------------------*/
28#include "stm32h7xx_hal_def.h"
29
30#if defined(FDCAN1)
31
40/* Exported types ------------------------------------------------------------*/
49typedef enum
50{
51 HAL_FDCAN_STATE_RESET = 0x00U,
52 HAL_FDCAN_STATE_READY = 0x01U,
53 HAL_FDCAN_STATE_BUSY = 0x02U,
54 HAL_FDCAN_STATE_ERROR = 0x03U
55} HAL_FDCAN_StateTypeDef;
56
60typedef struct
61{
62 uint32_t FrameFormat;
65 uint32_t Mode;
68 FunctionalState AutoRetransmission;
71 FunctionalState TransmitPause;
74 FunctionalState ProtocolException;
77 uint32_t NominalPrescaler;
81 uint32_t NominalSyncJumpWidth;
86 uint32_t NominalTimeSeg1;
89 uint32_t NominalTimeSeg2;
92 uint32_t DataPrescaler;
96 uint32_t DataSyncJumpWidth;
101 uint32_t DataTimeSeg1;
104 uint32_t DataTimeSeg2;
107 uint32_t MessageRAMOffset;
110 uint32_t StdFiltersNbr;
113 uint32_t ExtFiltersNbr;
116 uint32_t RxFifo0ElmtsNbr;
119 uint32_t RxFifo0ElmtSize;
122 uint32_t RxFifo1ElmtsNbr;
125 uint32_t RxFifo1ElmtSize;
128 uint32_t RxBuffersNbr;
131 uint32_t RxBufferSize;
134 uint32_t TxEventsNbr;
137 uint32_t TxBuffersNbr;
140 uint32_t TxFifoQueueElmtsNbr;
143 uint32_t TxFifoQueueMode;
146 uint32_t TxElmtSize;
149} FDCAN_InitTypeDef;
150
154typedef struct
155{
156 uint32_t ClockCalibration;
159 uint32_t ClockDivider;
163 uint32_t MinOscClkPeriods;
167 uint32_t CalFieldLength;
170 uint32_t TimeQuantaPerBitTime;
173 uint32_t WatchdogStartValue;
177} FDCAN_ClkCalUnitTypeDef;
178
182typedef struct
183{
184 uint32_t IdType;
187 uint32_t FilterIndex;
192 uint32_t FilterType;
199 uint32_t FilterConfig;
202 uint32_t FilterID1;
207 uint32_t FilterID2;
214 uint32_t RxBufferIndex;
220 uint32_t IsCalibrationMsg;
228} FDCAN_FilterTypeDef;
229
233typedef struct
234{
235 uint32_t Identifier;
240 uint32_t IdType;
244 uint32_t TxFrameType;
247 uint32_t DataLength;
250 uint32_t ErrorStateIndicator;
253 uint32_t BitRateSwitch;
257 uint32_t FDFormat;
261 uint32_t TxEventFifoControl;
264 uint32_t MessageMarker;
268} FDCAN_TxHeaderTypeDef;
269
273typedef struct
274{
275 uint32_t Identifier;
280 uint32_t IdType;
283 uint32_t RxFrameType;
286 uint32_t DataLength;
289 uint32_t ErrorStateIndicator;
292 uint32_t BitRateSwitch;
296 uint32_t FDFormat;
300 uint32_t RxTimestamp;
304 uint32_t FilterIndex;
311 uint32_t IsFilterMatchingFrame;
317} FDCAN_RxHeaderTypeDef;
318
322typedef struct
323{
324 uint32_t Identifier;
329 uint32_t IdType;
332 uint32_t TxFrameType;
335 uint32_t DataLength;
338 uint32_t ErrorStateIndicator;
341 uint32_t BitRateSwitch;
345 uint32_t FDFormat;
349 uint32_t TxTimestamp;
353 uint32_t MessageMarker;
357 uint32_t EventType;
360} FDCAN_TxEventFifoTypeDef;
361
365typedef struct
366{
367 uint32_t FilterList;
372 uint32_t FilterIndex;
377 uint32_t MessageStorage;
380 uint32_t MessageIndex;
387} FDCAN_HpMsgStatusTypeDef;
388
392typedef struct
393{
394 uint32_t LastErrorCode;
397 uint32_t DataLastErrorCode;
401 uint32_t Activity;
404 uint32_t ErrorPassive;
409 uint32_t Warning;
414 uint32_t BusOff;
419 uint32_t RxESIflag;
424 uint32_t RxBRSflag;
429 uint32_t RxFDFflag;
434 uint32_t ProtocolException;
439 uint32_t TDCvalue;
442} FDCAN_ProtocolStatusTypeDef;
443
447typedef struct
448{
449 uint32_t TxErrorCnt;
452 uint32_t RxErrorCnt;
455 uint32_t RxErrorPassive;
460 uint32_t ErrorLogging;
466} FDCAN_ErrorCountersTypeDef;
467
471typedef struct
472{
473 uint32_t OperationMode;
476 uint32_t GapEnable;
481 uint32_t TimeMaster;
484 uint32_t SyncDevLimit;
489 uint32_t InitRefTrigOffset;
492 uint32_t ExternalClkSync;
497 uint32_t AppWdgLimit;
505 uint32_t GlobalTimeFilter;
510 uint32_t ClockCalibration;
515 uint32_t EvtTrigPolarity;
520 uint32_t BasicCyclesNbr;
523 uint32_t CycleStartSync;
526 uint32_t TxEnableWindow;
529 uint32_t ExpTxTrigNbr;
534 uint32_t TURNumerator;
538 uint32_t TURDenominator;
541 uint32_t TriggerMemoryNbr;
544 uint32_t StopWatchTrigSel;
547 uint32_t EventTrigSel;
550} FDCAN_TT_ConfigTypeDef;
551
555typedef struct
556{
557 uint32_t TriggerIndex;
560 uint32_t TimeMark;
563 uint32_t RepeatFactor;
566 uint32_t StartCycle;
570 uint32_t TmEventInt;
575 uint32_t TmEventExt;
580 uint32_t TriggerType;
583 uint32_t FilterType;
586 uint32_t TxBufferIndex;
591 uint32_t FilterIndex;
598} FDCAN_TriggerTypeDef;
599
603typedef struct
604{
605 uint32_t ErrorLevel;
608 uint32_t MasterState;
611 uint32_t SyncState;
614 uint32_t GTimeQuality;
620 uint32_t ClockQuality;
626 uint32_t RefTrigOffset;
629 uint32_t GTimeDiscPending;
634 uint32_t GapFinished;
639 uint32_t MasterPriority;
642 uint32_t GapStarted;
647 uint32_t WaitForEvt;
652 uint32_t AppWdgEvt;
657 uint32_t ECSPending;
662 uint32_t PhaseLock;
667} FDCAN_TTOperationStatusTypeDef;
668
672typedef struct
673{
674 uint32_t StandardFilterSA;
677 uint32_t ExtendedFilterSA;
680 uint32_t RxFIFO0SA;
683 uint32_t RxFIFO1SA;
686 uint32_t RxBufferSA;
689 uint32_t TxEventFIFOSA;
692 uint32_t TxBufferSA;
695 uint32_t TxFIFOQSA;
698 uint32_t TTMemorySA;
701 uint32_t EndAddress;
704} FDCAN_MsgRamAddressTypeDef;
705
709#if USE_HAL_FDCAN_REGISTER_CALLBACKS == 1
710typedef struct __FDCAN_HandleTypeDef
711#else
712typedef struct
713#endif /* USE_HAL_FDCAN_REGISTER_CALLBACKS */
714{
715 FDCAN_GlobalTypeDef *Instance;
717 TTCAN_TypeDef *ttcan;
719 FDCAN_InitTypeDef Init;
721 FDCAN_MsgRamAddressTypeDef msgRam;
723 uint32_t LatestTxFifoQRequest;
726 __IO HAL_FDCAN_StateTypeDef State;
728 HAL_LockTypeDef Lock;
730 __IO uint32_t ErrorCode;
732#if USE_HAL_FDCAN_REGISTER_CALLBACKS == 1
733 void (* ClockCalibrationCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t ClkCalibrationITs);
734 void (* TxEventFifoCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t TxEventFifoITs);
735 void (* RxFifo0Callback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo0ITs);
736 void (* RxFifo1Callback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo1ITs);
737 void (* TxFifoEmptyCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
738 void (* TxBufferCompleteCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndexes);
739 void (* TxBufferAbortCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndexes);
740 void (* RxBufferNewMessageCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
741 void (* HighPriorityMessageCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
742 void (* TimestampWraparoundCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
743 void (* TimeoutOccurredCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
744 void (* ErrorCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
745 void (* ErrorStatusCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t ErrorStatusITs);
746 void (* TT_ScheduleSyncCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t TTSchedSyncITs);
747 void (* TT_TimeMarkCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t TTTimeMarkITs);
748 void (* TT_StopWatchCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t SWTime, uint32_t SWCycleCount);
749 void (* TT_GlobalTimeCallback)(struct __FDCAN_HandleTypeDef *hfdcan, uint32_t TTGlobTimeITs);
751 void (* MspInitCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
752 void (* MspDeInitCallback)(struct __FDCAN_HandleTypeDef *hfdcan);
753#endif /* USE_HAL_FDCAN_REGISTER_CALLBACKS */
754
755} FDCAN_HandleTypeDef;
756
757#if USE_HAL_FDCAN_REGISTER_CALLBACKS == 1
761typedef enum
762{
763 HAL_FDCAN_TX_FIFO_EMPTY_CB_ID = 0x00U,
764 HAL_FDCAN_RX_BUFFER_NEW_MSG_CB_ID = 0x01U,
765 HAL_FDCAN_HIGH_PRIO_MESSAGE_CB_ID = 0x02U,
766 HAL_FDCAN_TIMESTAMP_WRAPAROUND_CB_ID = 0x03U,
767 HAL_FDCAN_TIMEOUT_OCCURRED_CB_ID = 0x04U,
768 HAL_FDCAN_ERROR_CALLBACK_CB_ID = 0x05U,
770 HAL_FDCAN_MSPINIT_CB_ID = 0x06U,
771 HAL_FDCAN_MSPDEINIT_CB_ID = 0x07U,
773} HAL_FDCAN_CallbackIDTypeDef;
774
778typedef void (*pFDCAN_CallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan);
779typedef void (*pFDCAN_ClockCalibrationCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t ClkCalibrationITs);
780typedef void (*pFDCAN_TxEventFifoCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t TxEventFifoITs);
781typedef void (*pFDCAN_RxFifo0CallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo0ITs);
782typedef void (*pFDCAN_RxFifo1CallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo1ITs);
783typedef void (*pFDCAN_TxBufferCompleteCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndexes);
784typedef void (*pFDCAN_TxBufferAbortCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndexes);
785typedef void (*pFDCAN_ErrorStatusCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t ErrorStatusITs);
786typedef void (*pFDCAN_TT_ScheduleSyncCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t TTSchedSyncITs);
787typedef void (*pFDCAN_TT_TimeMarkCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t TTTimeMarkITs);
788typedef void (*pFDCAN_TT_StopWatchCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t SWTime, uint32_t SWCycleCount);
789typedef void (*pFDCAN_TT_GlobalTimeCallbackTypeDef)(FDCAN_HandleTypeDef *hfdcan, uint32_t TTGlobTimeITs);
790#endif /* USE_HAL_FDCAN_REGISTER_CALLBACKS */
791
796/* Exported constants --------------------------------------------------------*/
806#define HAL_FDCAN_ERROR_NONE ((uint32_t)0x00000000U)
807#define HAL_FDCAN_ERROR_TIMEOUT ((uint32_t)0x00000001U)
808#define HAL_FDCAN_ERROR_NOT_INITIALIZED ((uint32_t)0x00000002U)
809#define HAL_FDCAN_ERROR_NOT_READY ((uint32_t)0x00000004U)
810#define HAL_FDCAN_ERROR_NOT_STARTED ((uint32_t)0x00000008U)
811#define HAL_FDCAN_ERROR_NOT_SUPPORTED ((uint32_t)0x00000010U)
812#define HAL_FDCAN_ERROR_PARAM ((uint32_t)0x00000020U)
813#define HAL_FDCAN_ERROR_PENDING ((uint32_t)0x00000040U)
814#define HAL_FDCAN_ERROR_RAM_ACCESS ((uint32_t)0x00000080U)
815#define HAL_FDCAN_ERROR_FIFO_EMPTY ((uint32_t)0x00000100U)
816#define HAL_FDCAN_ERROR_FIFO_FULL ((uint32_t)0x00000200U)
817#define HAL_FDCAN_ERROR_LOG_OVERFLOW FDCAN_IR_ELO
818#define HAL_FDCAN_ERROR_RAM_WDG FDCAN_IR_WDI
819#define HAL_FDCAN_ERROR_PROTOCOL_ARBT FDCAN_IR_PEA
820#define HAL_FDCAN_ERROR_PROTOCOL_DATA FDCAN_IR_PED
821#define HAL_FDCAN_ERROR_RESERVED_AREA FDCAN_IR_ARA
822#define HAL_FDCAN_ERROR_TT_GLOBAL_TIME FDCAN_TTIR_GTE
823#define HAL_FDCAN_ERROR_TT_TX_UNDERFLOW FDCAN_TTIR_TXU
824#define HAL_FDCAN_ERROR_TT_TX_OVERFLOW FDCAN_TTIR_TXO
825#define HAL_FDCAN_ERROR_TT_SCHEDULE1 FDCAN_TTIR_SE1
826#define HAL_FDCAN_ERROR_TT_SCHEDULE2 FDCAN_TTIR_SE2
827#define HAL_FDCAN_ERROR_TT_NO_INIT_REF FDCAN_TTIR_IWT
828#define HAL_FDCAN_ERROR_TT_NO_REF FDCAN_TTIR_WT
829#define HAL_FDCAN_ERROR_TT_APPL_WDG FDCAN_TTIR_AW
830#define HAL_FDCAN_ERROR_TT_CONFIG FDCAN_TTIR_CER
832#if USE_HAL_FDCAN_REGISTER_CALLBACKS == 1
833#define HAL_FDCAN_ERROR_INVALID_CALLBACK ((uint32_t)0x00000100U)
834#endif /* USE_HAL_FDCAN_REGISTER_CALLBACKS */
843#define FDCAN_FRAME_CLASSIC ((uint32_t)0x00000000U)
844#define FDCAN_FRAME_FD_NO_BRS ((uint32_t)FDCAN_CCCR_FDOE)
845#define FDCAN_FRAME_FD_BRS ((uint32_t)(FDCAN_CCCR_FDOE | FDCAN_CCCR_BRSE))
854#define FDCAN_MODE_NORMAL ((uint32_t)0x00000000U)
855#define FDCAN_MODE_RESTRICTED_OPERATION ((uint32_t)0x00000001U)
856#define FDCAN_MODE_BUS_MONITORING ((uint32_t)0x00000002U)
857#define FDCAN_MODE_INTERNAL_LOOPBACK ((uint32_t)0x00000003U)
858#define FDCAN_MODE_EXTERNAL_LOOPBACK ((uint32_t)0x00000004U)
867#define FDCAN_CLOCK_CALIBRATION_DISABLE ((uint32_t)0x00000000U)
868#define FDCAN_CLOCK_CALIBRATION_ENABLE ((uint32_t)0x00000001U)
877#define FDCAN_CLOCK_DIV1 ((uint32_t)0x00000000U)
878#define FDCAN_CLOCK_DIV2 ((uint32_t)0x00010000U)
879#define FDCAN_CLOCK_DIV4 ((uint32_t)0x00020000U)
880#define FDCAN_CLOCK_DIV6 ((uint32_t)0x00030000U)
881#define FDCAN_CLOCK_DIV8 ((uint32_t)0x00040000U)
882#define FDCAN_CLOCK_DIV10 ((uint32_t)0x00050000U)
883#define FDCAN_CLOCK_DIV12 ((uint32_t)0x00060000U)
884#define FDCAN_CLOCK_DIV14 ((uint32_t)0x00070000U)
885#define FDCAN_CLOCK_DIV16 ((uint32_t)0x00080000U)
886#define FDCAN_CLOCK_DIV18 ((uint32_t)0x00090000U)
887#define FDCAN_CLOCK_DIV20 ((uint32_t)0x000A0000U)
888#define FDCAN_CLOCK_DIV22 ((uint32_t)0x000B0000U)
889#define FDCAN_CLOCK_DIV24 ((uint32_t)0x000C0000U)
890#define FDCAN_CLOCK_DIV26 ((uint32_t)0x000D0000U)
891#define FDCAN_CLOCK_DIV28 ((uint32_t)0x000E0000U)
892#define FDCAN_CLOCK_DIV30 ((uint32_t)0x000F0000U)
901#define FDCAN_CALIB_FIELD_LENGTH_32 ((uint32_t)0x00000000U)
902#define FDCAN_CALIB_FIELD_LENGTH_64 ((uint32_t)FDCANCCU_CCFG_CFL)
911#define FDCAN_CLOCK_NOT_CALIBRATED ((uint32_t)0x00000000U)
912#define FDCAN_CLOCK_BASIC_CALIBRATED ((uint32_t)0x40000000U)
913#define FDCAN_CLOCK_PRECISION_CALIBRATED ((uint32_t)0x80000000U)
922#define FDCAN_CALIB_TIME_QUANTA_COUNTER ((uint32_t)0x00000000U)
923#define FDCAN_CALIB_CLOCK_PERIOD_COUNTER ((uint32_t)0x00000001U)
924#define FDCAN_CALIB_WATCHDOG_COUNTER ((uint32_t)0x00000002U)
933#define FDCAN_DATA_BYTES_8 ((uint32_t)0x00000004U)
934#define FDCAN_DATA_BYTES_12 ((uint32_t)0x00000005U)
935#define FDCAN_DATA_BYTES_16 ((uint32_t)0x00000006U)
936#define FDCAN_DATA_BYTES_20 ((uint32_t)0x00000007U)
937#define FDCAN_DATA_BYTES_24 ((uint32_t)0x00000008U)
938#define FDCAN_DATA_BYTES_32 ((uint32_t)0x0000000AU)
939#define FDCAN_DATA_BYTES_48 ((uint32_t)0x0000000EU)
940#define FDCAN_DATA_BYTES_64 ((uint32_t)0x00000012U)
949#define FDCAN_TX_FIFO_OPERATION ((uint32_t)0x00000000U)
950#define FDCAN_TX_QUEUE_OPERATION ((uint32_t)FDCAN_TXBC_TFQM)
959#define FDCAN_STANDARD_ID ((uint32_t)0x00000000U)
960#define FDCAN_EXTENDED_ID ((uint32_t)0x40000000U)
969#define FDCAN_DATA_FRAME ((uint32_t)0x00000000U)
970#define FDCAN_REMOTE_FRAME ((uint32_t)0x20000000U)
979#define FDCAN_DLC_BYTES_0 ((uint32_t)0x00000000U)
980#define FDCAN_DLC_BYTES_1 ((uint32_t)0x00010000U)
981#define FDCAN_DLC_BYTES_2 ((uint32_t)0x00020000U)
982#define FDCAN_DLC_BYTES_3 ((uint32_t)0x00030000U)
983#define FDCAN_DLC_BYTES_4 ((uint32_t)0x00040000U)
984#define FDCAN_DLC_BYTES_5 ((uint32_t)0x00050000U)
985#define FDCAN_DLC_BYTES_6 ((uint32_t)0x00060000U)
986#define FDCAN_DLC_BYTES_7 ((uint32_t)0x00070000U)
987#define FDCAN_DLC_BYTES_8 ((uint32_t)0x00080000U)
988#define FDCAN_DLC_BYTES_12 ((uint32_t)0x00090000U)
989#define FDCAN_DLC_BYTES_16 ((uint32_t)0x000A0000U)
990#define FDCAN_DLC_BYTES_20 ((uint32_t)0x000B0000U)
991#define FDCAN_DLC_BYTES_24 ((uint32_t)0x000C0000U)
992#define FDCAN_DLC_BYTES_32 ((uint32_t)0x000D0000U)
993#define FDCAN_DLC_BYTES_48 ((uint32_t)0x000E0000U)
994#define FDCAN_DLC_BYTES_64 ((uint32_t)0x000F0000U)
1003#define FDCAN_ESI_ACTIVE ((uint32_t)0x00000000U)
1004#define FDCAN_ESI_PASSIVE ((uint32_t)0x80000000U)
1013#define FDCAN_BRS_OFF ((uint32_t)0x00000000U)
1014#define FDCAN_BRS_ON ((uint32_t)0x00100000U)
1023#define FDCAN_CLASSIC_CAN ((uint32_t)0x00000000U)
1024#define FDCAN_FD_CAN ((uint32_t)0x00200000U)
1033#define FDCAN_NO_TX_EVENTS ((uint32_t)0x00000000U)
1034#define FDCAN_STORE_TX_EVENTS ((uint32_t)0x00800000U)
1043#define FDCAN_FILTER_RANGE ((uint32_t)0x00000000U)
1044#define FDCAN_FILTER_DUAL ((uint32_t)0x00000001U)
1045#define FDCAN_FILTER_MASK ((uint32_t)0x00000002U)
1046#define FDCAN_FILTER_RANGE_NO_EIDM ((uint32_t)0x00000003U)
1055#define FDCAN_FILTER_DISABLE ((uint32_t)0x00000000U)
1056#define FDCAN_FILTER_TO_RXFIFO0 ((uint32_t)0x00000001U)
1057#define FDCAN_FILTER_TO_RXFIFO1 ((uint32_t)0x00000002U)
1058#define FDCAN_FILTER_REJECT ((uint32_t)0x00000003U)
1059#define FDCAN_FILTER_HP ((uint32_t)0x00000004U)
1060#define FDCAN_FILTER_TO_RXFIFO0_HP ((uint32_t)0x00000005U)
1061#define FDCAN_FILTER_TO_RXFIFO1_HP ((uint32_t)0x00000006U)
1062#define FDCAN_FILTER_TO_RXBUFFER ((uint32_t)0x00000007U)
1071#define FDCAN_TX_BUFFER0 ((uint32_t)0x00000001U)
1072#define FDCAN_TX_BUFFER1 ((uint32_t)0x00000002U)
1073#define FDCAN_TX_BUFFER2 ((uint32_t)0x00000004U)
1074#define FDCAN_TX_BUFFER3 ((uint32_t)0x00000008U)
1075#define FDCAN_TX_BUFFER4 ((uint32_t)0x00000010U)
1076#define FDCAN_TX_BUFFER5 ((uint32_t)0x00000020U)
1077#define FDCAN_TX_BUFFER6 ((uint32_t)0x00000040U)
1078#define FDCAN_TX_BUFFER7 ((uint32_t)0x00000080U)
1079#define FDCAN_TX_BUFFER8 ((uint32_t)0x00000100U)
1080#define FDCAN_TX_BUFFER9 ((uint32_t)0x00000200U)
1081#define FDCAN_TX_BUFFER10 ((uint32_t)0x00000400U)
1082#define FDCAN_TX_BUFFER11 ((uint32_t)0x00000800U)
1083#define FDCAN_TX_BUFFER12 ((uint32_t)0x00001000U)
1084#define FDCAN_TX_BUFFER13 ((uint32_t)0x00002000U)
1085#define FDCAN_TX_BUFFER14 ((uint32_t)0x00004000U)
1086#define FDCAN_TX_BUFFER15 ((uint32_t)0x00008000U)
1087#define FDCAN_TX_BUFFER16 ((uint32_t)0x00010000U)
1088#define FDCAN_TX_BUFFER17 ((uint32_t)0x00020000U)
1089#define FDCAN_TX_BUFFER18 ((uint32_t)0x00040000U)
1090#define FDCAN_TX_BUFFER19 ((uint32_t)0x00080000U)
1091#define FDCAN_TX_BUFFER20 ((uint32_t)0x00100000U)
1092#define FDCAN_TX_BUFFER21 ((uint32_t)0x00200000U)
1093#define FDCAN_TX_BUFFER22 ((uint32_t)0x00400000U)
1094#define FDCAN_TX_BUFFER23 ((uint32_t)0x00800000U)
1095#define FDCAN_TX_BUFFER24 ((uint32_t)0x01000000U)
1096#define FDCAN_TX_BUFFER25 ((uint32_t)0x02000000U)
1097#define FDCAN_TX_BUFFER26 ((uint32_t)0x04000000U)
1098#define FDCAN_TX_BUFFER27 ((uint32_t)0x08000000U)
1099#define FDCAN_TX_BUFFER28 ((uint32_t)0x10000000U)
1100#define FDCAN_TX_BUFFER29 ((uint32_t)0x20000000U)
1101#define FDCAN_TX_BUFFER30 ((uint32_t)0x40000000U)
1102#define FDCAN_TX_BUFFER31 ((uint32_t)0x80000000U)
1111#define FDCAN_RX_FIFO0 ((uint32_t)0x00000040U)
1112#define FDCAN_RX_FIFO1 ((uint32_t)0x00000041U)
1113#define FDCAN_RX_BUFFER0 ((uint32_t)0x00000000U)
1114#define FDCAN_RX_BUFFER1 ((uint32_t)0x00000001U)
1115#define FDCAN_RX_BUFFER2 ((uint32_t)0x00000002U)
1116#define FDCAN_RX_BUFFER3 ((uint32_t)0x00000003U)
1117#define FDCAN_RX_BUFFER4 ((uint32_t)0x00000004U)
1118#define FDCAN_RX_BUFFER5 ((uint32_t)0x00000005U)
1119#define FDCAN_RX_BUFFER6 ((uint32_t)0x00000006U)
1120#define FDCAN_RX_BUFFER7 ((uint32_t)0x00000007U)
1121#define FDCAN_RX_BUFFER8 ((uint32_t)0x00000008U)
1122#define FDCAN_RX_BUFFER9 ((uint32_t)0x00000009U)
1123#define FDCAN_RX_BUFFER10 ((uint32_t)0x0000000AU)
1124#define FDCAN_RX_BUFFER11 ((uint32_t)0x0000000BU)
1125#define FDCAN_RX_BUFFER12 ((uint32_t)0x0000000CU)
1126#define FDCAN_RX_BUFFER13 ((uint32_t)0x0000000DU)
1127#define FDCAN_RX_BUFFER14 ((uint32_t)0x0000000EU)
1128#define FDCAN_RX_BUFFER15 ((uint32_t)0x0000000FU)
1129#define FDCAN_RX_BUFFER16 ((uint32_t)0x00000010U)
1130#define FDCAN_RX_BUFFER17 ((uint32_t)0x00000011U)
1131#define FDCAN_RX_BUFFER18 ((uint32_t)0x00000012U)
1132#define FDCAN_RX_BUFFER19 ((uint32_t)0x00000013U)
1133#define FDCAN_RX_BUFFER20 ((uint32_t)0x00000014U)
1134#define FDCAN_RX_BUFFER21 ((uint32_t)0x00000015U)
1135#define FDCAN_RX_BUFFER22 ((uint32_t)0x00000016U)
1136#define FDCAN_RX_BUFFER23 ((uint32_t)0x00000017U)
1137#define FDCAN_RX_BUFFER24 ((uint32_t)0x00000018U)
1138#define FDCAN_RX_BUFFER25 ((uint32_t)0x00000019U)
1139#define FDCAN_RX_BUFFER26 ((uint32_t)0x0000001AU)
1140#define FDCAN_RX_BUFFER27 ((uint32_t)0x0000001BU)
1141#define FDCAN_RX_BUFFER28 ((uint32_t)0x0000001CU)
1142#define FDCAN_RX_BUFFER29 ((uint32_t)0x0000001DU)
1143#define FDCAN_RX_BUFFER30 ((uint32_t)0x0000001EU)
1144#define FDCAN_RX_BUFFER31 ((uint32_t)0x0000001FU)
1145#define FDCAN_RX_BUFFER32 ((uint32_t)0x00000020U)
1146#define FDCAN_RX_BUFFER33 ((uint32_t)0x00000021U)
1147#define FDCAN_RX_BUFFER34 ((uint32_t)0x00000022U)
1148#define FDCAN_RX_BUFFER35 ((uint32_t)0x00000023U)
1149#define FDCAN_RX_BUFFER36 ((uint32_t)0x00000024U)
1150#define FDCAN_RX_BUFFER37 ((uint32_t)0x00000025U)
1151#define FDCAN_RX_BUFFER38 ((uint32_t)0x00000026U)
1152#define FDCAN_RX_BUFFER39 ((uint32_t)0x00000027U)
1153#define FDCAN_RX_BUFFER40 ((uint32_t)0x00000028U)
1154#define FDCAN_RX_BUFFER41 ((uint32_t)0x00000029U)
1155#define FDCAN_RX_BUFFER42 ((uint32_t)0x0000002AU)
1156#define FDCAN_RX_BUFFER43 ((uint32_t)0x0000002BU)
1157#define FDCAN_RX_BUFFER44 ((uint32_t)0x0000002CU)
1158#define FDCAN_RX_BUFFER45 ((uint32_t)0x0000002DU)
1159#define FDCAN_RX_BUFFER46 ((uint32_t)0x0000002EU)
1160#define FDCAN_RX_BUFFER47 ((uint32_t)0x0000002FU)
1161#define FDCAN_RX_BUFFER48 ((uint32_t)0x00000030U)
1162#define FDCAN_RX_BUFFER49 ((uint32_t)0x00000031U)
1163#define FDCAN_RX_BUFFER50 ((uint32_t)0x00000032U)
1164#define FDCAN_RX_BUFFER51 ((uint32_t)0x00000033U)
1165#define FDCAN_RX_BUFFER52 ((uint32_t)0x00000034U)
1166#define FDCAN_RX_BUFFER53 ((uint32_t)0x00000035U)
1167#define FDCAN_RX_BUFFER54 ((uint32_t)0x00000036U)
1168#define FDCAN_RX_BUFFER55 ((uint32_t)0x00000037U)
1169#define FDCAN_RX_BUFFER56 ((uint32_t)0x00000038U)
1170#define FDCAN_RX_BUFFER57 ((uint32_t)0x00000039U)
1171#define FDCAN_RX_BUFFER58 ((uint32_t)0x0000003AU)
1172#define FDCAN_RX_BUFFER59 ((uint32_t)0x0000003BU)
1173#define FDCAN_RX_BUFFER60 ((uint32_t)0x0000003CU)
1174#define FDCAN_RX_BUFFER61 ((uint32_t)0x0000003DU)
1175#define FDCAN_RX_BUFFER62 ((uint32_t)0x0000003EU)
1176#define FDCAN_RX_BUFFER63 ((uint32_t)0x0000003FU)
1185#define FDCAN_TX_EVENT ((uint32_t)0x00400000U)
1186#define FDCAN_TX_IN_SPITE_OF_ABORT ((uint32_t)0x00800000U)
1195#define FDCAN_HP_STORAGE_NO_FIFO ((uint32_t)0x00000000U)
1196#define FDCAN_HP_STORAGE_MSG_LOST ((uint32_t)0x00000040U)
1197#define FDCAN_HP_STORAGE_RXFIFO0 ((uint32_t)0x00000080U)
1198#define FDCAN_HP_STORAGE_RXFIFO1 ((uint32_t)0x000000C0U)
1207#define FDCAN_PROTOCOL_ERROR_NONE ((uint32_t)0x00000000U)
1208#define FDCAN_PROTOCOL_ERROR_STUFF ((uint32_t)0x00000001U)
1209#define FDCAN_PROTOCOL_ERROR_FORM ((uint32_t)0x00000002U)
1210#define FDCAN_PROTOCOL_ERROR_ACK ((uint32_t)0x00000003U)
1211#define FDCAN_PROTOCOL_ERROR_BIT1 ((uint32_t)0x00000004U)
1212#define FDCAN_PROTOCOL_ERROR_BIT0 ((uint32_t)0x00000005U)
1213#define FDCAN_PROTOCOL_ERROR_CRC ((uint32_t)0x00000006U)
1214#define FDCAN_PROTOCOL_ERROR_NO_CHANGE ((uint32_t)0x00000007U)
1223#define FDCAN_COM_STATE_SYNC ((uint32_t)0x00000000U)
1224#define FDCAN_COM_STATE_IDLE ((uint32_t)0x00000008U)
1225#define FDCAN_COM_STATE_RX ((uint32_t)0x00000010U)
1226#define FDCAN_COM_STATE_TX ((uint32_t)0x00000018U)
1235#define FDCAN_CFG_TX_EVENT_FIFO ((uint32_t)0x00000000U)
1236#define FDCAN_CFG_RX_FIFO0 ((uint32_t)0x00000001U)
1237#define FDCAN_CFG_RX_FIFO1 ((uint32_t)0x00000002U)
1246#define FDCAN_RX_FIFO_BLOCKING ((uint32_t)0x00000000U)
1247#define FDCAN_RX_FIFO_OVERWRITE ((uint32_t)0x80000000U)
1256#define FDCAN_ACCEPT_IN_RX_FIFO0 ((uint32_t)0x00000000U)
1257#define FDCAN_ACCEPT_IN_RX_FIFO1 ((uint32_t)0x00000001U)
1258#define FDCAN_REJECT ((uint32_t)0x00000002U)
1267#define FDCAN_FILTER_REMOTE ((uint32_t)0x00000000U)
1268#define FDCAN_REJECT_REMOTE ((uint32_t)0x00000001U)
1277#define FDCAN_INTERRUPT_LINE0 ((uint32_t)0x00000001U)
1278#define FDCAN_INTERRUPT_LINE1 ((uint32_t)0x00000002U)
1287#define FDCAN_TIMESTAMP_INTERNAL ((uint32_t)0x00000001U)
1288#define FDCAN_TIMESTAMP_EXTERNAL ((uint32_t)0x00000002U)
1297#define FDCAN_TIMESTAMP_PRESC_1 ((uint32_t)0x00000000U)
1298#define FDCAN_TIMESTAMP_PRESC_2 ((uint32_t)0x00010000U)
1299#define FDCAN_TIMESTAMP_PRESC_3 ((uint32_t)0x00020000U)
1300#define FDCAN_TIMESTAMP_PRESC_4 ((uint32_t)0x00030000U)
1301#define FDCAN_TIMESTAMP_PRESC_5 ((uint32_t)0x00040000U)
1302#define FDCAN_TIMESTAMP_PRESC_6 ((uint32_t)0x00050000U)
1303#define FDCAN_TIMESTAMP_PRESC_7 ((uint32_t)0x00060000U)
1304#define FDCAN_TIMESTAMP_PRESC_8 ((uint32_t)0x00070000U)
1305#define FDCAN_TIMESTAMP_PRESC_9 ((uint32_t)0x00080000U)
1306#define FDCAN_TIMESTAMP_PRESC_10 ((uint32_t)0x00090000U)
1307#define FDCAN_TIMESTAMP_PRESC_11 ((uint32_t)0x000A0000U)
1308#define FDCAN_TIMESTAMP_PRESC_12 ((uint32_t)0x000B0000U)
1309#define FDCAN_TIMESTAMP_PRESC_13 ((uint32_t)0x000C0000U)
1310#define FDCAN_TIMESTAMP_PRESC_14 ((uint32_t)0x000D0000U)
1311#define FDCAN_TIMESTAMP_PRESC_15 ((uint32_t)0x000E0000U)
1312#define FDCAN_TIMESTAMP_PRESC_16 ((uint32_t)0x000F0000U)
1321#define FDCAN_TIMEOUT_CONTINUOUS ((uint32_t)0x00000000U)
1322#define FDCAN_TIMEOUT_TX_EVENT_FIFO ((uint32_t)0x00000002U)
1323#define FDCAN_TIMEOUT_RX_FIFO0 ((uint32_t)0x00000004U)
1324#define FDCAN_TIMEOUT_RX_FIFO1 ((uint32_t)0x00000006U)
1333#define FDCAN_TT_REF_MESSAGE_NO_PAYLOAD ((uint32_t)0x00000000U)
1334#define FDCAN_TT_REF_MESSAGE_ADD_PAYLOAD ((uint32_t)FDCAN_TTRMC_RMPS)
1343#define FDCAN_TT_REPEAT_EVERY_CYCLE ((uint32_t)0x00000000U)
1344#define FDCAN_TT_REPEAT_EVERY_2ND_CYCLE ((uint32_t)0x00000002U)
1345#define FDCAN_TT_REPEAT_EVERY_4TH_CYCLE ((uint32_t)0x00000004U)
1346#define FDCAN_TT_REPEAT_EVERY_8TH_CYCLE ((uint32_t)0x00000008U)
1347#define FDCAN_TT_REPEAT_EVERY_16TH_CYCLE ((uint32_t)0x00000010U)
1348#define FDCAN_TT_REPEAT_EVERY_32ND_CYCLE ((uint32_t)0x00000020U)
1349#define FDCAN_TT_REPEAT_EVERY_64TH_CYCLE ((uint32_t)0x00000040U)
1358#define FDCAN_TT_TX_REF_TRIGGER ((uint32_t)0x00000000U)
1359#define FDCAN_TT_TX_REF_TRIGGER_GAP ((uint32_t)0x00000001U)
1360#define FDCAN_TT_TX_TRIGGER_SINGLE ((uint32_t)0x00000002U)
1361#define FDCAN_TT_TX_TRIGGER_CONTINUOUS ((uint32_t)0x00000003U)
1362#define FDCAN_TT_TX_TRIGGER_ARBITRATION ((uint32_t)0x00000004U)
1363#define FDCAN_TT_TX_TRIGGER_MERGED ((uint32_t)0x00000005U)
1364#define FDCAN_TT_WATCH_TRIGGER ((uint32_t)0x00000006U)
1365#define FDCAN_TT_WATCH_TRIGGER_GAP ((uint32_t)0x00000007U)
1366#define FDCAN_TT_RX_TRIGGER ((uint32_t)0x00000008U)
1367#define FDCAN_TT_TIME_BASE_TRIGGER ((uint32_t)0x00000009U)
1368#define FDCAN_TT_END_OF_LIST ((uint32_t)0x0000000AU)
1377#define FDCAN_TT_TM_NO_INTERNAL_EVENT ((uint32_t)0x00000000U)
1378#define FDCAN_TT_TM_GEN_INTERNAL_EVENT ((uint32_t)0x00000020U)
1387#define FDCAN_TT_TM_NO_EXTERNAL_EVENT ((uint32_t)0x00000000U)
1388#define FDCAN_TT_TM_GEN_EXTERNAL_EVENT ((uint32_t)0x00000010U)
1397#define FDCAN_TT_COMMUNICATION_LEVEL1 ((uint32_t)0x00000001U)
1398#define FDCAN_TT_COMMUNICATION_LEVEL2 ((uint32_t)0x00000002U)
1399#define FDCAN_TT_COMMUNICATION_LEVEL0 ((uint32_t)0x00000003U)
1408#define FDCAN_STRICTLY_TT_OPERATION ((uint32_t)0x00000000U)
1409#define FDCAN_EXT_EVT_SYNC_TT_OPERATION ((uint32_t)FDCAN_TTOCF_GEN)
1418#define FDCAN_TT_SLAVE ((uint32_t)0x00000000U)
1419#define FDCAN_TT_POTENTIAL_MASTER ((uint32_t)FDCAN_TTOCF_TM)
1428#define FDCAN_TT_EXT_CLK_SYNC_DISABLE ((uint32_t)0x00000000U)
1429#define FDCAN_TT_EXT_CLK_SYNC_ENABLE ((uint32_t)FDCAN_TTOCF_EECS)
1438#define FDCAN_TT_GLOB_TIME_FILT_DISABLE ((uint32_t)0x00000000U)
1439#define FDCAN_TT_GLOB_TIME_FILT_ENABLE ((uint32_t)FDCAN_TTOCF_EGTF)
1448#define FDCAN_TT_AUTO_CLK_CALIB_DISABLE ((uint32_t)0x00000000U)
1449#define FDCAN_TT_AUTO_CLK_CALIB_ENABLE ((uint32_t)FDCAN_TTOCF_ECC)
1458#define FDCAN_TT_EVT_TRIG_POL_RISING ((uint32_t)0x00000000U)
1459#define FDCAN_TT_EVT_TRIG_POL_FALLING ((uint32_t)FDCAN_TTOCF_EVTP)
1468#define FDCAN_TT_CYCLES_PER_MATRIX_1 ((uint32_t)0x00000000U)
1469#define FDCAN_TT_CYCLES_PER_MATRIX_2 ((uint32_t)0x00000001U)
1470#define FDCAN_TT_CYCLES_PER_MATRIX_4 ((uint32_t)0x00000003U)
1471#define FDCAN_TT_CYCLES_PER_MATRIX_8 ((uint32_t)0x00000007U)
1472#define FDCAN_TT_CYCLES_PER_MATRIX_16 ((uint32_t)0x0000000FU)
1473#define FDCAN_TT_CYCLES_PER_MATRIX_32 ((uint32_t)0x0000001FU)
1474#define FDCAN_TT_CYCLES_PER_MATRIX_64 ((uint32_t)0x0000003FU)
1483#define FDCAN_TT_NO_SYNC_PULSE ((uint32_t)0x00000000U)
1484#define FDCAN_TT_SYNC_BASIC_CYCLE_START ((uint32_t)0x00000040U)
1485#define FDCAN_TT_SYNC_MATRIX_START ((uint32_t)0x00000080U)
1494#define FDCAN_TT_STOP_WATCH_TRIGGER_0 ((uint32_t)0x00000000U)
1495#define FDCAN_TT_STOP_WATCH_TRIGGER_1 ((uint32_t)0x00000001U)
1496#define FDCAN_TT_STOP_WATCH_TRIGGER_2 ((uint32_t)0x00000002U)
1497#define FDCAN_TT_STOP_WATCH_TRIGGER_3 ((uint32_t)0x00000003U)
1506#define FDCAN_TT_EVENT_TRIGGER_0 ((uint32_t)0x00000000U)
1507#define FDCAN_TT_EVENT_TRIGGER_1 ((uint32_t)0x00000010U)
1508#define FDCAN_TT_EVENT_TRIGGER_2 ((uint32_t)0x00000020U)
1509#define FDCAN_TT_EVENT_TRIGGER_3 ((uint32_t)0x00000030U)
1518#define FDCAN_TT_STOP_WATCH_DISABLED ((uint32_t)0x00000000U)
1519#define FDCAN_TT_STOP_WATCH_CYCLE_TIME ((uint32_t)0x00000008U)
1520#define FDCAN_TT_STOP_WATCH_LOCAL_TIME ((uint32_t)0x00000010U)
1521#define FDCAN_TT_STOP_WATCH_GLOBAL_TIME ((uint32_t)0x00000018U)
1530#define FDCAN_TT_STOP_WATCH_RISING ((uint32_t)0x00000000U)
1531#define FDCAN_TT_STOP_WATCH_FALLING ((uint32_t)0x00000004U)
1540#define FDCAN_TT_REG_TIMEMARK_DIABLED ((uint32_t)0x00000000U)
1541#define FDCAN_TT_REG_TIMEMARK_CYC_TIME ((uint32_t)0x00000040U)
1542#define FDCAN_TT_REG_TIMEMARK_LOC_TIME ((uint32_t)0x00000080U)
1543#define FDCAN_TT_REG_TIMEMARK_GLO_TIME ((uint32_t)0x000000C0U)
1552#define FDCAN_TT_NO_ERROR ((uint32_t)0x00000000U)
1553#define FDCAN_TT_WARNING ((uint32_t)0x00000001U)
1554#define FDCAN_TT_ERROR ((uint32_t)0x00000002U)
1555#define FDCAN_TT_SEVERE_ERROR ((uint32_t)0x00000003U)
1564#define FDCAN_TT_MASTER_OFF ((uint32_t)0x00000000U)
1565#define FDCAN_TT_TIME_SLAVE ((uint32_t)0x00000004U)
1566#define FDCAN_TT_BACKUP_TIME_MASTER ((uint32_t)0x00000008U)
1567#define FDCAN_TT_CURRENT_TIME_MASTER ((uint32_t)0x0000000CU)
1576#define FDCAN_TT_OUT_OF_SYNC ((uint32_t)0x00000000U)
1577#define FDCAN_TT_SYNCHRONIZING ((uint32_t)0x00000010U)
1578#define FDCAN_TT_IN_GAP ((uint32_t)0x00000020U)
1579#define FDCAN_TT_IN_SCHEDULE ((uint32_t)0x00000030U)
1588#define FDCAN_IR_MASK ((uint32_t)0x3FCFFFFFU)
1589#define CCU_IR_MASK ((uint32_t)0xC0000000U)
1598#define FDCAN_FLAG_TX_COMPLETE FDCAN_IR_TC
1599#define FDCAN_FLAG_TX_ABORT_COMPLETE FDCAN_IR_TCF
1600#define FDCAN_FLAG_TX_FIFO_EMPTY FDCAN_IR_TFE
1601#define FDCAN_FLAG_RX_HIGH_PRIORITY_MSG FDCAN_IR_HPM
1602#define FDCAN_FLAG_RX_BUFFER_NEW_MESSAGE FDCAN_IR_DRX
1603#define FDCAN_FLAG_TX_EVT_FIFO_ELT_LOST FDCAN_IR_TEFL
1604#define FDCAN_FLAG_TX_EVT_FIFO_FULL FDCAN_IR_TEFF
1605#define FDCAN_FLAG_TX_EVT_FIFO_WATERMARK FDCAN_IR_TEFW
1606#define FDCAN_FLAG_TX_EVT_FIFO_NEW_DATA FDCAN_IR_TEFN
1607#define FDCAN_FLAG_RX_FIFO0_MESSAGE_LOST FDCAN_IR_RF0L
1608#define FDCAN_FLAG_RX_FIFO0_FULL FDCAN_IR_RF0F
1609#define FDCAN_FLAG_RX_FIFO0_WATERMARK FDCAN_IR_RF0W
1610#define FDCAN_FLAG_RX_FIFO0_NEW_MESSAGE FDCAN_IR_RF0N
1611#define FDCAN_FLAG_RX_FIFO1_MESSAGE_LOST FDCAN_IR_RF1L
1612#define FDCAN_FLAG_RX_FIFO1_FULL FDCAN_IR_RF1F
1613#define FDCAN_FLAG_RX_FIFO1_WATERMARK FDCAN_IR_RF1W
1614#define FDCAN_FLAG_RX_FIFO1_NEW_MESSAGE FDCAN_IR_RF1N
1615#define FDCAN_FLAG_RAM_ACCESS_FAILURE FDCAN_IR_MRAF
1616#define FDCAN_FLAG_ERROR_LOGGING_OVERFLOW FDCAN_IR_ELO
1617#define FDCAN_FLAG_ERROR_PASSIVE FDCAN_IR_EP
1618#define FDCAN_FLAG_ERROR_WARNING FDCAN_IR_EW
1619#define FDCAN_FLAG_BUS_OFF FDCAN_IR_BO
1620#define FDCAN_FLAG_RAM_WATCHDOG FDCAN_IR_WDI
1621#define FDCAN_FLAG_ARB_PROTOCOL_ERROR FDCAN_IR_PEA
1622#define FDCAN_FLAG_DATA_PROTOCOL_ERROR FDCAN_IR_PED
1623#define FDCAN_FLAG_RESERVED_ADDRESS_ACCESS FDCAN_IR_ARA
1624#define FDCAN_FLAG_TIMESTAMP_WRAPAROUND FDCAN_IR_TSW
1625#define FDCAN_FLAG_TIMEOUT_OCCURRED FDCAN_IR_TOO
1626#define FDCAN_FLAG_CALIB_STATE_CHANGED (FDCANCCU_IR_CSC << 30)
1627#define FDCAN_FLAG_CALIB_WATCHDOG_EVENT (FDCANCCU_IR_CWE << 30)
1641#define FDCAN_IT_TX_COMPLETE FDCAN_IE_TCE
1642#define FDCAN_IT_TX_ABORT_COMPLETE FDCAN_IE_TCFE
1643#define FDCAN_IT_TX_FIFO_EMPTY FDCAN_IE_TFEE
1652#define FDCAN_IT_RX_HIGH_PRIORITY_MSG FDCAN_IE_HPME
1653#define FDCAN_IT_RX_BUFFER_NEW_MESSAGE FDCAN_IE_DRXE
1662#define FDCAN_IT_TIMESTAMP_WRAPAROUND FDCAN_IE_TSWE
1663#define FDCAN_IT_TIMEOUT_OCCURRED FDCAN_IE_TOOE
1672#define FDCAN_IT_CALIB_STATE_CHANGED (FDCANCCU_IE_CSCE << 30)
1673#define FDCAN_IT_CALIB_WATCHDOG_EVENT (FDCANCCU_IE_CWEE << 30)
1682#define FDCAN_IT_TX_EVT_FIFO_ELT_LOST FDCAN_IE_TEFLE
1683#define FDCAN_IT_TX_EVT_FIFO_FULL FDCAN_IE_TEFFE
1684#define FDCAN_IT_TX_EVT_FIFO_WATERMARK FDCAN_IE_TEFWE
1685#define FDCAN_IT_TX_EVT_FIFO_NEW_DATA FDCAN_IE_TEFNE
1694#define FDCAN_IT_RX_FIFO0_MESSAGE_LOST FDCAN_IE_RF0LE
1695#define FDCAN_IT_RX_FIFO0_FULL FDCAN_IE_RF0FE
1696#define FDCAN_IT_RX_FIFO0_WATERMARK FDCAN_IE_RF0WE
1697#define FDCAN_IT_RX_FIFO0_NEW_MESSAGE FDCAN_IE_RF0NE
1706#define FDCAN_IT_RX_FIFO1_MESSAGE_LOST FDCAN_IE_RF1LE
1707#define FDCAN_IT_RX_FIFO1_FULL FDCAN_IE_RF1FE
1708#define FDCAN_IT_RX_FIFO1_WATERMARK FDCAN_IE_RF1WE
1709#define FDCAN_IT_RX_FIFO1_NEW_MESSAGE FDCAN_IE_RF1NE
1718#define FDCAN_IT_RAM_ACCESS_FAILURE FDCAN_IE_MRAFE
1719#define FDCAN_IT_ERROR_LOGGING_OVERFLOW FDCAN_IE_ELOE
1720#define FDCAN_IT_RAM_WATCHDOG FDCAN_IE_WDIE
1721#define FDCAN_IT_ARB_PROTOCOL_ERROR FDCAN_IE_PEAE
1722#define FDCAN_IT_DATA_PROTOCOL_ERROR FDCAN_IE_PEDE
1723#define FDCAN_IT_RESERVED_ADDRESS_ACCESS FDCAN_IE_ARAE
1732#define FDCAN_IT_ERROR_PASSIVE FDCAN_IE_EPE
1733#define FDCAN_IT_ERROR_WARNING FDCAN_IE_EWE
1734#define FDCAN_IT_BUS_OFF FDCAN_IE_BOE
1747#define FDCAN_TT_FLAG_BASIC_CYCLE_START FDCAN_TTIR_SBC
1748#define FDCAN_TT_FLAG_MATRIX_CYCLE_START FDCAN_TTIR_SMC
1749#define FDCAN_TT_FLAG_SYNC_MODE_CHANGE FDCAN_TTIR_CSM
1750#define FDCAN_TT_FLAG_START_OF_GAP FDCAN_TTIR_SOG
1751#define FDCAN_TT_FLAG_REG_TIME_MARK FDCAN_TTIR_RTMI
1752#define FDCAN_TT_FLAG_TRIG_TIME_MARK FDCAN_TTIR_TTMI
1753#define FDCAN_TT_FLAG_STOP_WATCH FDCAN_TTIR_SWE
1754#define FDCAN_TT_FLAG_GLOBAL_TIME_WRAP FDCAN_TTIR_GTW
1755#define FDCAN_TT_FLAG_GLOBAL_TIME_DISC FDCAN_TTIR_GTD
1756#define FDCAN_TT_FLAG_GLOBAL_TIME_ERROR FDCAN_TTIR_GTE
1757#define FDCAN_TT_FLAG_TX_COUNT_UNDERFLOW FDCAN_TTIR_TXU
1758#define FDCAN_TT_FLAG_TX_COUNT_OVERFLOW FDCAN_TTIR_TXO
1759#define FDCAN_TT_FLAG_SCHEDULING_ERROR_1 FDCAN_TTIR_SE1
1760#define FDCAN_TT_FLAG_SCHEDULING_ERROR_2 FDCAN_TTIR_SE2
1761#define FDCAN_TT_FLAG_ERROR_LEVEL_CHANGE FDCAN_TTIR_ELC
1762#define FDCAN_TT_FLAG_INIT_WATCH_TRIGGER FDCAN_TTIR_IWT
1763#define FDCAN_TT_FLAG_WATCH_TRIGGER FDCAN_TTIR_WT
1764#define FDCAN_TT_FLAG_APPLICATION_WATCHDOG FDCAN_TTIR_AW
1765#define FDCAN_TT_FLAG_CONFIG_ERROR FDCAN_TTIR_CER
1779#define FDCAN_TT_IT_BASIC_CYCLE_START FDCAN_TTIE_SBCE
1780#define FDCAN_TT_IT_MATRIX_CYCLE_START FDCAN_TTIE_SMCE
1781#define FDCAN_TT_IT_SYNC_MODE_CHANGE FDCAN_TTIE_CSME
1782#define FDCAN_TT_IT_START_OF_GAP FDCAN_TTIE_SOGE
1791#define FDCAN_TT_IT_REG_TIME_MARK FDCAN_TTIE_RTMIE
1792#define FDCAN_TT_IT_TRIG_TIME_MARK FDCAN_TTIE_TTMIE
1801#define FDCAN_TT_IT_STOP_WATCH FDCAN_TTIE_SWEE
1810#define FDCAN_TT_IT_GLOBAL_TIME_WRAP FDCAN_TTIE_GTWE
1811#define FDCAN_TT_IT_GLOBAL_TIME_DISC FDCAN_TTIE_GTDE
1820#define FDCAN_TT_IT_GLOBAL_TIME_ERROR FDCAN_TTIE_GTEE
1821#define FDCAN_TT_IT_TX_COUNT_UNDERFLOW FDCAN_TTIE_TXUE
1822#define FDCAN_TT_IT_TX_COUNT_OVERFLOW FDCAN_TTIE_TXOE
1823#define FDCAN_TT_IT_SCHEDULING_ERROR_1 FDCAN_TTIE_SE1E
1824#define FDCAN_TT_IT_SCHEDULING_ERROR_2 FDCAN_TTIE_SE2E
1825#define FDCAN_TT_IT_ERROR_LEVEL_CHANGE FDCAN_TTIE_ELCE
1834#define FDCAN_TT_IT_INIT_WATCH_TRIGGER FDCAN_TTIE_IWTE
1835#define FDCAN_TT_IT_WATCH_TRIGGER FDCAN_TTIE_WTE
1836#define FDCAN_TT_IT_APPLICATION_WATCHDOG FDCAN_TTIE_AWE
1837#define FDCAN_TT_IT_CONFIG_ERROR FDCAN_TTIE_CERE
1850/* Exported macro ------------------------------------------------------------*/
1860#if USE_HAL_FDCAN_REGISTER_CALLBACKS == 1
1861#define __HAL_FDCAN_RESET_HANDLE_STATE(__HANDLE__) do{ \
1862 (__HANDLE__)->State = HAL_FDCAN_STATE_RESET; \
1863 (__HANDLE__)->MspInitCallback = NULL; \
1864 (__HANDLE__)->MspDeInitCallback = NULL; \
1865 } while(0)
1866#else
1867#define __HAL_FDCAN_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_FDCAN_STATE_RESET)
1868#endif /* USE_HAL_FDCAN_REGISTER_CALLBACKS */
1869
1877#define __HAL_FDCAN_ENABLE_IT(__HANDLE__, __INTERRUPT__) \
1878 do{ \
1879 (__HANDLE__)->Instance->IE |= ((__INTERRUPT__) & FDCAN_IR_MASK); \
1880 FDCAN_CCU->IE |= (((__INTERRUPT__) & CCU_IR_MASK) >> 30); \
1881 }while(0)
1882
1883
1891#define __HAL_FDCAN_DISABLE_IT(__HANDLE__, __INTERRUPT__) \
1892 do{ \
1893 ((__HANDLE__)->Instance->IE) &= ~((__INTERRUPT__) & FDCAN_IR_MASK); \
1894 FDCAN_CCU->IE &= ~(((__INTERRUPT__) & CCU_IR_MASK) >> 30); \
1895 }while(0)
1896
1904#define __HAL_FDCAN_GET_IT(__HANDLE__, __INTERRUPT__) (((__INTERRUPT__) < FDCAN_IT_CALIB_WATCHDOG_EVENT) ? ((__HANDLE__)->Instance->IR & (__INTERRUPT__)) : ((FDCAN_CCU->IR << 30) & (__INTERRUPT__)))
1905
1913#define __HAL_FDCAN_CLEAR_IT(__HANDLE__, __INTERRUPT__) \
1914do{ \
1915 ((__HANDLE__)->Instance->IR) = ((__INTERRUPT__) & FDCAN_IR_MASK); \
1916 FDCAN_CCU->IR = (((__INTERRUPT__) & CCU_IR_MASK) >> 30); \
1917 }while(0)
1918
1926#define __HAL_FDCAN_GET_FLAG(__HANDLE__, __FLAG__) (((__FLAG__) < FDCAN_FLAG_CALIB_WATCHDOG_EVENT) ? ((__HANDLE__)->Instance->IR & (__FLAG__)) : ((FDCAN_CCU->IR << 30) & (__FLAG__)))
1927
1935#define __HAL_FDCAN_CLEAR_FLAG(__HANDLE__, __FLAG__) \
1936do{ \
1937 ((__HANDLE__)->Instance->IR) = ((__FLAG__) & FDCAN_IR_MASK); \
1938 FDCAN_CCU->IR = (((__FLAG__) & CCU_IR_MASK) >> 30); \
1939 }while(0)
1940
1947#define __HAL_FDCAN_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__INTERRUPT__) < FDCAN_IT_CALIB_WATCHDOG_EVENT) ? ((__HANDLE__)->Instance->IE & (__INTERRUPT__)) : ((FDCAN_CCU->IE << 30) & (__INTERRUPT__)))
1948
1956#define __HAL_FDCAN_TT_ENABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->ttcan->TTIE) |= (__INTERRUPT__))
1957
1965#define __HAL_FDCAN_TT_DISABLE_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->ttcan->TTIE) &= ~(__INTERRUPT__))
1966
1974#define __HAL_FDCAN_TT_GET_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->ttcan->TTIR) & (__INTERRUPT__))
1975
1983#define __HAL_FDCAN_TT_CLEAR_IT(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->ttcan->TTIR) = (__INTERRUPT__))
1984
1992#define __HAL_FDCAN_TT_GET_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->ttcan->TTIR) & (__FLAG__))
1993
2001#define __HAL_FDCAN_TT_CLEAR_FLAG(__HANDLE__, __FLAG__) (((__HANDLE__)->ttcan->TTIR) = (__FLAG__))
2002
2009#define __HAL_FDCAN_TT_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->ttcan->TTIE) & (__INTERRUPT__))
2010
2015/* Exported functions --------------------------------------------------------*/
2023/* Initialization and de-initialization functions *****************************/
2024HAL_StatusTypeDef HAL_FDCAN_Init(FDCAN_HandleTypeDef *hfdcan);
2025HAL_StatusTypeDef HAL_FDCAN_DeInit(FDCAN_HandleTypeDef *hfdcan);
2026void HAL_FDCAN_MspInit(FDCAN_HandleTypeDef *hfdcan);
2027void HAL_FDCAN_MspDeInit(FDCAN_HandleTypeDef *hfdcan);
2028HAL_StatusTypeDef HAL_FDCAN_EnterPowerDownMode(FDCAN_HandleTypeDef *hfdcan);
2029HAL_StatusTypeDef HAL_FDCAN_ExitPowerDownMode(FDCAN_HandleTypeDef *hfdcan);
2030
2031#if USE_HAL_FDCAN_REGISTER_CALLBACKS == 1
2032/* Callbacks Register/UnRegister functions ***********************************/
2033HAL_StatusTypeDef HAL_FDCAN_RegisterCallback(FDCAN_HandleTypeDef *hfdcan, HAL_FDCAN_CallbackIDTypeDef CallbackID, pFDCAN_CallbackTypeDef pCallback);
2034HAL_StatusTypeDef HAL_FDCAN_UnRegisterCallback(FDCAN_HandleTypeDef *hfdcan, HAL_FDCAN_CallbackIDTypeDef CallbackID);
2035HAL_StatusTypeDef HAL_FDCAN_RegisterClockCalibrationCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_ClockCalibrationCallbackTypeDef pCallback);
2036HAL_StatusTypeDef HAL_FDCAN_UnRegisterClockCalibrationCallback(FDCAN_HandleTypeDef *hfdcan);
2037HAL_StatusTypeDef HAL_FDCAN_RegisterTxEventFifoCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_TxEventFifoCallbackTypeDef pCallback);
2038HAL_StatusTypeDef HAL_FDCAN_UnRegisterTxEventFifoCallback(FDCAN_HandleTypeDef *hfdcan);
2039HAL_StatusTypeDef HAL_FDCAN_RegisterRxFifo0Callback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_RxFifo0CallbackTypeDef pCallback);
2040HAL_StatusTypeDef HAL_FDCAN_UnRegisterRxFifo0Callback(FDCAN_HandleTypeDef *hfdcan);
2041HAL_StatusTypeDef HAL_FDCAN_RegisterRxFifo1Callback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_RxFifo1CallbackTypeDef pCallback);
2042HAL_StatusTypeDef HAL_FDCAN_UnRegisterRxFifo1Callback(FDCAN_HandleTypeDef *hfdcan);
2043HAL_StatusTypeDef HAL_FDCAN_RegisterTxBufferCompleteCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_TxBufferCompleteCallbackTypeDef pCallback);
2044HAL_StatusTypeDef HAL_FDCAN_UnRegisterTxBufferCompleteCallback(FDCAN_HandleTypeDef *hfdcan);
2045HAL_StatusTypeDef HAL_FDCAN_RegisterTxBufferAbortCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_TxBufferAbortCallbackTypeDef pCallback);
2046HAL_StatusTypeDef HAL_FDCAN_UnRegisterTxBufferAbortCallback(FDCAN_HandleTypeDef *hfdcan);
2047HAL_StatusTypeDef HAL_FDCAN_RegisterErrorStatusCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_ErrorStatusCallbackTypeDef pCallback);
2048HAL_StatusTypeDef HAL_FDCAN_UnRegisterErrorStatusCallback(FDCAN_HandleTypeDef *hfdcan);
2049HAL_StatusTypeDef HAL_FDCAN_RegisterTTScheduleSyncCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_TT_ScheduleSyncCallbackTypeDef pCallback);
2050HAL_StatusTypeDef HAL_FDCAN_UnRegisterTTScheduleSyncCallback(FDCAN_HandleTypeDef *hfdcan);
2051HAL_StatusTypeDef HAL_FDCAN_RegisterTTTimeMarkCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_TT_TimeMarkCallbackTypeDef pCallback);
2052HAL_StatusTypeDef HAL_FDCAN_UnRegisterTTTimeMarkCallback(FDCAN_HandleTypeDef *hfdcan);
2053HAL_StatusTypeDef HAL_FDCAN_RegisterTTStopWatchCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_TT_StopWatchCallbackTypeDef pCallback);
2054HAL_StatusTypeDef HAL_FDCAN_UnRegisterTTStopWatchCallback(FDCAN_HandleTypeDef *hfdcan);
2055HAL_StatusTypeDef HAL_FDCAN_RegisterTTGlobalTimeCallback(FDCAN_HandleTypeDef *hfdcan, pFDCAN_TT_GlobalTimeCallbackTypeDef pCallback);
2056HAL_StatusTypeDef HAL_FDCAN_UnRegisterTTGlobalTimeCallback(FDCAN_HandleTypeDef *hfdcan);
2057#endif /* USE_HAL_FDCAN_REGISTER_CALLBACKS */
2065/* Configuration functions ****************************************************/
2066HAL_StatusTypeDef HAL_FDCAN_ConfigClockCalibration(FDCAN_HandleTypeDef *hfdcan, FDCAN_ClkCalUnitTypeDef *sCcuConfig);
2067uint32_t HAL_FDCAN_GetClockCalibrationState(FDCAN_HandleTypeDef *hfdcan);
2068HAL_StatusTypeDef HAL_FDCAN_ResetClockCalibrationState(FDCAN_HandleTypeDef *hfdcan);
2069uint32_t HAL_FDCAN_GetClockCalibrationCounter(FDCAN_HandleTypeDef *hfdcan, uint32_t Counter);
2070HAL_StatusTypeDef HAL_FDCAN_ConfigFilter(FDCAN_HandleTypeDef *hfdcan, FDCAN_FilterTypeDef *sFilterConfig);
2071HAL_StatusTypeDef HAL_FDCAN_ConfigGlobalFilter(FDCAN_HandleTypeDef *hfdcan, uint32_t NonMatchingStd, uint32_t NonMatchingExt, uint32_t RejectRemoteStd, uint32_t RejectRemoteExt);
2072HAL_StatusTypeDef HAL_FDCAN_ConfigExtendedIdMask(FDCAN_HandleTypeDef *hfdcan, uint32_t Mask);
2073HAL_StatusTypeDef HAL_FDCAN_ConfigRxFifoOverwrite(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo, uint32_t OperationMode);
2074HAL_StatusTypeDef HAL_FDCAN_ConfigFifoWatermark(FDCAN_HandleTypeDef *hfdcan, uint32_t FIFO, uint32_t Watermark);
2075HAL_StatusTypeDef HAL_FDCAN_ConfigRamWatchdog(FDCAN_HandleTypeDef *hfdcan, uint32_t CounterStartValue);
2076HAL_StatusTypeDef HAL_FDCAN_ConfigTimestampCounter(FDCAN_HandleTypeDef *hfdcan, uint32_t TimestampPrescaler);
2077HAL_StatusTypeDef HAL_FDCAN_EnableTimestampCounter(FDCAN_HandleTypeDef *hfdcan, uint32_t TimestampOperation);
2078HAL_StatusTypeDef HAL_FDCAN_DisableTimestampCounter(FDCAN_HandleTypeDef *hfdcan);
2079uint16_t HAL_FDCAN_GetTimestampCounter(FDCAN_HandleTypeDef *hfdcan);
2080HAL_StatusTypeDef HAL_FDCAN_ResetTimestampCounter(FDCAN_HandleTypeDef *hfdcan);
2081HAL_StatusTypeDef HAL_FDCAN_ConfigTimeoutCounter(FDCAN_HandleTypeDef *hfdcan, uint32_t TimeoutOperation, uint32_t TimeoutPeriod);
2082HAL_StatusTypeDef HAL_FDCAN_EnableTimeoutCounter(FDCAN_HandleTypeDef *hfdcan);
2083HAL_StatusTypeDef HAL_FDCAN_DisableTimeoutCounter(FDCAN_HandleTypeDef *hfdcan);
2084uint16_t HAL_FDCAN_GetTimeoutCounter(FDCAN_HandleTypeDef *hfdcan);
2085HAL_StatusTypeDef HAL_FDCAN_ResetTimeoutCounter(FDCAN_HandleTypeDef *hfdcan);
2086HAL_StatusTypeDef HAL_FDCAN_ConfigTxDelayCompensation(FDCAN_HandleTypeDef *hfdcan, uint32_t TdcOffset, uint32_t TdcFilter);
2087HAL_StatusTypeDef HAL_FDCAN_EnableTxDelayCompensation(FDCAN_HandleTypeDef *hfdcan);
2088HAL_StatusTypeDef HAL_FDCAN_DisableTxDelayCompensation(FDCAN_HandleTypeDef *hfdcan);
2089HAL_StatusTypeDef HAL_FDCAN_EnableISOMode(FDCAN_HandleTypeDef *hfdcan);
2090HAL_StatusTypeDef HAL_FDCAN_DisableISOMode(FDCAN_HandleTypeDef *hfdcan);
2091HAL_StatusTypeDef HAL_FDCAN_EnableEdgeFiltering(FDCAN_HandleTypeDef *hfdcan);
2092HAL_StatusTypeDef HAL_FDCAN_DisableEdgeFiltering(FDCAN_HandleTypeDef *hfdcan);
2100/* Control functions **********************************************************/
2101HAL_StatusTypeDef HAL_FDCAN_Start(FDCAN_HandleTypeDef *hfdcan);
2102HAL_StatusTypeDef HAL_FDCAN_Stop(FDCAN_HandleTypeDef *hfdcan);
2103HAL_StatusTypeDef HAL_FDCAN_AddMessageToTxFifoQ(FDCAN_HandleTypeDef *hfdcan, FDCAN_TxHeaderTypeDef *pTxHeader, uint8_t *pTxData);
2104HAL_StatusTypeDef HAL_FDCAN_AddMessageToTxBuffer(FDCAN_HandleTypeDef *hfdcan, FDCAN_TxHeaderTypeDef *pTxHeader, uint8_t *pTxData, uint32_t BufferIndex);
2105HAL_StatusTypeDef HAL_FDCAN_EnableTxBufferRequest(FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndex);
2106uint32_t HAL_FDCAN_GetLatestTxFifoQRequestBuffer(FDCAN_HandleTypeDef *hfdcan);
2107HAL_StatusTypeDef HAL_FDCAN_AbortTxRequest(FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndex);
2108HAL_StatusTypeDef HAL_FDCAN_GetRxMessage(FDCAN_HandleTypeDef *hfdcan, uint32_t RxLocation, FDCAN_RxHeaderTypeDef *pRxHeader, uint8_t *pRxData);
2109HAL_StatusTypeDef HAL_FDCAN_GetTxEvent(FDCAN_HandleTypeDef *hfdcan, FDCAN_TxEventFifoTypeDef *pTxEvent);
2110HAL_StatusTypeDef HAL_FDCAN_GetHighPriorityMessageStatus(FDCAN_HandleTypeDef *hfdcan, FDCAN_HpMsgStatusTypeDef *HpMsgStatus);
2111HAL_StatusTypeDef HAL_FDCAN_GetProtocolStatus(FDCAN_HandleTypeDef *hfdcan, FDCAN_ProtocolStatusTypeDef *ProtocolStatus);
2112HAL_StatusTypeDef HAL_FDCAN_GetErrorCounters(FDCAN_HandleTypeDef *hfdcan, FDCAN_ErrorCountersTypeDef *ErrorCounters);
2113uint32_t HAL_FDCAN_IsRxBufferMessageAvailable(FDCAN_HandleTypeDef *hfdcan, uint32_t RxBufferIndex);
2114uint32_t HAL_FDCAN_IsTxBufferMessagePending(FDCAN_HandleTypeDef *hfdcan, uint32_t TxBufferIndex);
2115uint32_t HAL_FDCAN_GetRxFifoFillLevel(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo);
2116uint32_t HAL_FDCAN_GetTxFifoFreeLevel(FDCAN_HandleTypeDef *hfdcan);
2117uint32_t HAL_FDCAN_IsRestrictedOperationMode(FDCAN_HandleTypeDef *hfdcan);
2118HAL_StatusTypeDef HAL_FDCAN_ExitRestrictedOperationMode(FDCAN_HandleTypeDef *hfdcan);
2126/* TT Configuration and control functions**************************************/
2127HAL_StatusTypeDef HAL_FDCAN_TT_ConfigOperation(FDCAN_HandleTypeDef *hfdcan, FDCAN_TT_ConfigTypeDef *pTTParams);
2128HAL_StatusTypeDef HAL_FDCAN_TT_ConfigReferenceMessage(FDCAN_HandleTypeDef *hfdcan, uint32_t IdType, uint32_t Identifier, uint32_t Payload);
2129HAL_StatusTypeDef HAL_FDCAN_TT_ConfigTrigger(FDCAN_HandleTypeDef *hfdcan, FDCAN_TriggerTypeDef *sTriggerConfig);
2130HAL_StatusTypeDef HAL_FDCAN_TT_SetGlobalTime(FDCAN_HandleTypeDef *hfdcan, uint32_t TimePreset);
2131HAL_StatusTypeDef HAL_FDCAN_TT_SetClockSynchronization(FDCAN_HandleTypeDef *hfdcan, uint32_t NewTURNumerator);
2132HAL_StatusTypeDef HAL_FDCAN_TT_ConfigStopWatch(FDCAN_HandleTypeDef *hfdcan, uint32_t Source, uint32_t Polarity);
2133HAL_StatusTypeDef HAL_FDCAN_TT_ConfigRegisterTimeMark(FDCAN_HandleTypeDef *hfdcan, uint32_t TimeMarkSource, uint32_t TimeMarkValue, uint32_t RepeatFactor, uint32_t StartCycle);
2134HAL_StatusTypeDef HAL_FDCAN_TT_EnableRegisterTimeMarkPulse(FDCAN_HandleTypeDef *hfdcan);
2135HAL_StatusTypeDef HAL_FDCAN_TT_DisableRegisterTimeMarkPulse(FDCAN_HandleTypeDef *hfdcan);
2136HAL_StatusTypeDef HAL_FDCAN_TT_EnableTriggerTimeMarkPulse(FDCAN_HandleTypeDef *hfdcan);
2137HAL_StatusTypeDef HAL_FDCAN_TT_DisableTriggerTimeMarkPulse(FDCAN_HandleTypeDef *hfdcan);
2138HAL_StatusTypeDef HAL_FDCAN_TT_EnableHardwareGapControl(FDCAN_HandleTypeDef *hfdcan);
2139HAL_StatusTypeDef HAL_FDCAN_TT_DisableHardwareGapControl(FDCAN_HandleTypeDef *hfdcan);
2140HAL_StatusTypeDef HAL_FDCAN_TT_EnableTimeMarkGapControl(FDCAN_HandleTypeDef *hfdcan);
2141HAL_StatusTypeDef HAL_FDCAN_TT_DisableTimeMarkGapControl(FDCAN_HandleTypeDef *hfdcan);
2142HAL_StatusTypeDef HAL_FDCAN_TT_SetNextIsGap(FDCAN_HandleTypeDef *hfdcan);
2143HAL_StatusTypeDef HAL_FDCAN_TT_SetEndOfGap(FDCAN_HandleTypeDef *hfdcan);
2144HAL_StatusTypeDef HAL_FDCAN_TT_ConfigExternalSyncPhase(FDCAN_HandleTypeDef *hfdcan, uint32_t TargetPhase);
2145HAL_StatusTypeDef HAL_FDCAN_TT_EnableExternalSynchronization(FDCAN_HandleTypeDef *hfdcan);
2146HAL_StatusTypeDef HAL_FDCAN_TT_DisableExternalSynchronization(FDCAN_HandleTypeDef *hfdcan);
2147HAL_StatusTypeDef HAL_FDCAN_TT_GetOperationStatus(FDCAN_HandleTypeDef *hfdcan, FDCAN_TTOperationStatusTypeDef *TTOpStatus);
2155/* Interrupts management ******************************************************/
2156HAL_StatusTypeDef HAL_FDCAN_ConfigInterruptLines(FDCAN_HandleTypeDef *hfdcan, uint32_t ITList, uint32_t InterruptLine);
2157HAL_StatusTypeDef HAL_FDCAN_TT_ConfigInterruptLines(FDCAN_HandleTypeDef *hfdcan, uint32_t TTITList, uint32_t InterruptLine);
2158HAL_StatusTypeDef HAL_FDCAN_ActivateNotification(FDCAN_HandleTypeDef *hfdcan, uint32_t ActiveITs, uint32_t BufferIndexes);
2159HAL_StatusTypeDef HAL_FDCAN_DeactivateNotification(FDCAN_HandleTypeDef *hfdcan, uint32_t InactiveITs);
2160HAL_StatusTypeDef HAL_FDCAN_TT_ActivateNotification(FDCAN_HandleTypeDef *hfdcan, uint32_t ActiveTTITs);
2161HAL_StatusTypeDef HAL_FDCAN_TT_DeactivateNotification(FDCAN_HandleTypeDef *hfdcan, uint32_t InactiveTTITs);
2162void HAL_FDCAN_IRQHandler(FDCAN_HandleTypeDef *hfdcan);
2170/* Callback functions *********************************************************/
2171void HAL_FDCAN_ClockCalibrationCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t ClkCalibrationITs);
2172void HAL_FDCAN_TxEventFifoCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t TxEventFifoITs);
2173void HAL_FDCAN_RxFifo0Callback(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo0ITs);
2174void HAL_FDCAN_RxFifo1Callback(FDCAN_HandleTypeDef *hfdcan, uint32_t RxFifo1ITs);
2175void HAL_FDCAN_TxFifoEmptyCallback(FDCAN_HandleTypeDef *hfdcan);
2176void HAL_FDCAN_TxBufferCompleteCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndexes);
2177void HAL_FDCAN_TxBufferAbortCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t BufferIndexes);
2178void HAL_FDCAN_RxBufferNewMessageCallback(FDCAN_HandleTypeDef *hfdcan);
2179void HAL_FDCAN_HighPriorityMessageCallback(FDCAN_HandleTypeDef *hfdcan);
2180void HAL_FDCAN_TimestampWraparoundCallback(FDCAN_HandleTypeDef *hfdcan);
2181void HAL_FDCAN_TimeoutOccurredCallback(FDCAN_HandleTypeDef *hfdcan);
2182void HAL_FDCAN_ErrorCallback(FDCAN_HandleTypeDef *hfdcan);
2183void HAL_FDCAN_ErrorStatusCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t ErrorStatusITs);
2184void HAL_FDCAN_TT_ScheduleSyncCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t TTSchedSyncITs);
2185void HAL_FDCAN_TT_TimeMarkCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t TTTimeMarkITs);
2186void HAL_FDCAN_TT_StopWatchCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t SWTime, uint32_t SWCycleCount);
2187void HAL_FDCAN_TT_GlobalTimeCallback(FDCAN_HandleTypeDef *hfdcan, uint32_t TTGlobTimeITs);
2195/* Peripheral State functions *************************************************/
2196uint32_t HAL_FDCAN_GetError(FDCAN_HandleTypeDef *hfdcan);
2197HAL_FDCAN_StateTypeDef HAL_FDCAN_GetState(FDCAN_HandleTypeDef *hfdcan);
2206/* Private types -------------------------------------------------------------*/
2216/* Private variables ---------------------------------------------------------*/
2226/* Private constants ---------------------------------------------------------*/
2236/* Private macros ------------------------------------------------------------*/
2241#define IS_FDCAN_FRAME_FORMAT(FORMAT) (((FORMAT) == FDCAN_FRAME_CLASSIC ) || \
2242 ((FORMAT) == FDCAN_FRAME_FD_NO_BRS) || \
2243 ((FORMAT) == FDCAN_FRAME_FD_BRS ))
2244#define IS_FDCAN_MODE(MODE) (((MODE) == FDCAN_MODE_NORMAL ) || \
2245 ((MODE) == FDCAN_MODE_RESTRICTED_OPERATION) || \
2246 ((MODE) == FDCAN_MODE_BUS_MONITORING ) || \
2247 ((MODE) == FDCAN_MODE_INTERNAL_LOOPBACK ) || \
2248 ((MODE) == FDCAN_MODE_EXTERNAL_LOOPBACK ))
2249
2250#define IS_FDCAN_CLOCK_CALIBRATION(CALIBRATION) (((CALIBRATION) == FDCAN_CLOCK_CALIBRATION_DISABLE) || \
2251 ((CALIBRATION) == FDCAN_CLOCK_CALIBRATION_ENABLE ))
2252
2253#define IS_FDCAN_CKDIV(CKDIV) (((CKDIV) == FDCAN_CLOCK_DIV1 ) || \
2254 ((CKDIV) == FDCAN_CLOCK_DIV2 ) || \
2255 ((CKDIV) == FDCAN_CLOCK_DIV4 ) || \
2256 ((CKDIV) == FDCAN_CLOCK_DIV6 ) || \
2257 ((CKDIV) == FDCAN_CLOCK_DIV8 ) || \
2258 ((CKDIV) == FDCAN_CLOCK_DIV10) || \
2259 ((CKDIV) == FDCAN_CLOCK_DIV12) || \
2260 ((CKDIV) == FDCAN_CLOCK_DIV14) || \
2261 ((CKDIV) == FDCAN_CLOCK_DIV16) || \
2262 ((CKDIV) == FDCAN_CLOCK_DIV18) || \
2263 ((CKDIV) == FDCAN_CLOCK_DIV20) || \
2264 ((CKDIV) == FDCAN_CLOCK_DIV22) || \
2265 ((CKDIV) == FDCAN_CLOCK_DIV24) || \
2266 ((CKDIV) == FDCAN_CLOCK_DIV26) || \
2267 ((CKDIV) == FDCAN_CLOCK_DIV28) || \
2268 ((CKDIV) == FDCAN_CLOCK_DIV30))
2269#define IS_FDCAN_NOMINAL_PRESCALER(PRESCALER) (((PRESCALER) >= 1U) && ((PRESCALER) <= 512U))
2270#define IS_FDCAN_NOMINAL_SJW(SJW) (((SJW) >= 1U) && ((SJW) <= 128U))
2271#define IS_FDCAN_NOMINAL_TSEG1(TSEG1) (((TSEG1) >= 1U) && ((TSEG1) <= 256U))
2272#define IS_FDCAN_NOMINAL_TSEG2(TSEG2) (((TSEG2) >= 1U) && ((TSEG2) <= 128U))
2273#define IS_FDCAN_DATA_PRESCALER(PRESCALER) (((PRESCALER) >= 1U) && ((PRESCALER) <= 32U))
2274#define IS_FDCAN_DATA_SJW(SJW) (((SJW) >= 1U) && ((SJW) <= 16U))
2275#define IS_FDCAN_DATA_TSEG1(TSEG1) (((TSEG1) >= 1U) && ((TSEG1) <= 32U))
2276#define IS_FDCAN_DATA_TSEG2(TSEG2) (((TSEG2) >= 1U) && ((TSEG2) <= 16U))
2277#define IS_FDCAN_MAX_VALUE(VALUE, MAX) ((VALUE) <= (MAX))
2278#define IS_FDCAN_MIN_VALUE(VALUE, MIN) ((VALUE) >= (MIN))
2279#define IS_FDCAN_DATA_SIZE(SIZE) (((SIZE) == FDCAN_DATA_BYTES_8 ) || \
2280 ((SIZE) == FDCAN_DATA_BYTES_12) || \
2281 ((SIZE) == FDCAN_DATA_BYTES_16) || \
2282 ((SIZE) == FDCAN_DATA_BYTES_20) || \
2283 ((SIZE) == FDCAN_DATA_BYTES_24) || \
2284 ((SIZE) == FDCAN_DATA_BYTES_32) || \
2285 ((SIZE) == FDCAN_DATA_BYTES_48) || \
2286 ((SIZE) == FDCAN_DATA_BYTES_64))
2287#define IS_FDCAN_TX_FIFO_QUEUE_MODE(MODE) (((MODE) == FDCAN_TX_FIFO_OPERATION ) || \
2288 ((MODE) == FDCAN_TX_QUEUE_OPERATION))
2289#define IS_FDCAN_ID_TYPE(ID_TYPE) (((ID_TYPE) == FDCAN_STANDARD_ID) || \
2290 ((ID_TYPE) == FDCAN_EXTENDED_ID))
2291#define IS_FDCAN_FILTER_CFG(CONFIG) (((CONFIG) == FDCAN_FILTER_DISABLE ) || \
2292 ((CONFIG) == FDCAN_FILTER_TO_RXFIFO0 ) || \
2293 ((CONFIG) == FDCAN_FILTER_TO_RXFIFO1 ) || \
2294 ((CONFIG) == FDCAN_FILTER_REJECT ) || \
2295 ((CONFIG) == FDCAN_FILTER_HP ) || \
2296 ((CONFIG) == FDCAN_FILTER_TO_RXFIFO0_HP) || \
2297 ((CONFIG) == FDCAN_FILTER_TO_RXFIFO1_HP) || \
2298 ((CONFIG) == FDCAN_FILTER_TO_RXBUFFER ))
2299#define IS_FDCAN_TX_LOCATION(LOCATION) (((LOCATION) == FDCAN_TX_BUFFER0 ) || ((LOCATION) == FDCAN_TX_BUFFER1 ) || \
2300 ((LOCATION) == FDCAN_TX_BUFFER2 ) || ((LOCATION) == FDCAN_TX_BUFFER3 ) || \
2301 ((LOCATION) == FDCAN_TX_BUFFER4 ) || ((LOCATION) == FDCAN_TX_BUFFER5 ) || \
2302 ((LOCATION) == FDCAN_TX_BUFFER6 ) || ((LOCATION) == FDCAN_TX_BUFFER7 ) || \
2303 ((LOCATION) == FDCAN_TX_BUFFER8 ) || ((LOCATION) == FDCAN_TX_BUFFER9 ) || \
2304 ((LOCATION) == FDCAN_TX_BUFFER10) || ((LOCATION) == FDCAN_TX_BUFFER11) || \
2305 ((LOCATION) == FDCAN_TX_BUFFER12) || ((LOCATION) == FDCAN_TX_BUFFER13) || \
2306 ((LOCATION) == FDCAN_TX_BUFFER14) || ((LOCATION) == FDCAN_TX_BUFFER15) || \
2307 ((LOCATION) == FDCAN_TX_BUFFER16) || ((LOCATION) == FDCAN_TX_BUFFER17) || \
2308 ((LOCATION) == FDCAN_TX_BUFFER18) || ((LOCATION) == FDCAN_TX_BUFFER19) || \
2309 ((LOCATION) == FDCAN_TX_BUFFER20) || ((LOCATION) == FDCAN_TX_BUFFER21) || \
2310 ((LOCATION) == FDCAN_TX_BUFFER22) || ((LOCATION) == FDCAN_TX_BUFFER23) || \
2311 ((LOCATION) == FDCAN_TX_BUFFER24) || ((LOCATION) == FDCAN_TX_BUFFER25) || \
2312 ((LOCATION) == FDCAN_TX_BUFFER26) || ((LOCATION) == FDCAN_TX_BUFFER27) || \
2313 ((LOCATION) == FDCAN_TX_BUFFER28) || ((LOCATION) == FDCAN_TX_BUFFER29) || \
2314 ((LOCATION) == FDCAN_TX_BUFFER30) || ((LOCATION) == FDCAN_TX_BUFFER31))
2315#define IS_FDCAN_RX_FIFO(FIFO) (((FIFO) == FDCAN_RX_FIFO0) || \
2316 ((FIFO) == FDCAN_RX_FIFO1))
2317#define IS_FDCAN_RX_FIFO_MODE(MODE) (((MODE) == FDCAN_RX_FIFO_BLOCKING ) || \
2318 ((MODE) == FDCAN_RX_FIFO_OVERWRITE))
2319#define IS_FDCAN_STD_FILTER_TYPE(TYPE) (((TYPE) == FDCAN_FILTER_RANGE) || \
2320 ((TYPE) == FDCAN_FILTER_DUAL ) || \
2321 ((TYPE) == FDCAN_FILTER_MASK ))
2322#define IS_FDCAN_EXT_FILTER_TYPE(TYPE) (((TYPE) == FDCAN_FILTER_RANGE ) || \
2323 ((TYPE) == FDCAN_FILTER_DUAL ) || \
2324 ((TYPE) == FDCAN_FILTER_MASK ) || \
2325 ((TYPE) == FDCAN_FILTER_RANGE_NO_EIDM))
2326#define IS_FDCAN_FRAME_TYPE(TYPE) (((TYPE) == FDCAN_DATA_FRAME ) || \
2327 ((TYPE) == FDCAN_REMOTE_FRAME))
2328#define IS_FDCAN_DLC(DLC) (((DLC) == FDCAN_DLC_BYTES_0 ) || \
2329 ((DLC) == FDCAN_DLC_BYTES_1 ) || \
2330 ((DLC) == FDCAN_DLC_BYTES_2 ) || \
2331 ((DLC) == FDCAN_DLC_BYTES_3 ) || \
2332 ((DLC) == FDCAN_DLC_BYTES_4 ) || \
2333 ((DLC) == FDCAN_DLC_BYTES_5 ) || \
2334 ((DLC) == FDCAN_DLC_BYTES_6 ) || \
2335 ((DLC) == FDCAN_DLC_BYTES_7 ) || \
2336 ((DLC) == FDCAN_DLC_BYTES_8 ) || \
2337 ((DLC) == FDCAN_DLC_BYTES_12) || \
2338 ((DLC) == FDCAN_DLC_BYTES_16) || \
2339 ((DLC) == FDCAN_DLC_BYTES_20) || \
2340 ((DLC) == FDCAN_DLC_BYTES_24) || \
2341 ((DLC) == FDCAN_DLC_BYTES_32) || \
2342 ((DLC) == FDCAN_DLC_BYTES_48) || \
2343 ((DLC) == FDCAN_DLC_BYTES_64))
2344#define IS_FDCAN_ESI(ESI) (((ESI) == FDCAN_ESI_ACTIVE ) || \
2345 ((ESI) == FDCAN_ESI_PASSIVE))
2346#define IS_FDCAN_BRS(BRS) (((BRS) == FDCAN_BRS_OFF) || \
2347 ((BRS) == FDCAN_BRS_ON ))
2348#define IS_FDCAN_FDF(FDF) (((FDF) == FDCAN_CLASSIC_CAN) || \
2349 ((FDF) == FDCAN_FD_CAN ))
2350#define IS_FDCAN_EFC(EFC) (((EFC) == FDCAN_NO_TX_EVENTS ) || \
2351 ((EFC) == FDCAN_STORE_TX_EVENTS))
2352#define IS_FDCAN_IT(IT) (((IT) & ~(FDCAN_IR_MASK | CCU_IR_MASK)) == 0U)
2353#define IS_FDCAN_TT_IT(IT) (((IT) & 0xFFF80000U) == 0U)
2354#define IS_FDCAN_FIFO_WATERMARK(FIFO) (((FIFO) == FDCAN_CFG_TX_EVENT_FIFO) || \
2355 ((FIFO) == FDCAN_CFG_RX_FIFO0 ) || \
2356 ((FIFO) == FDCAN_CFG_RX_FIFO1 ))
2357#define IS_FDCAN_NON_MATCHING(DESTINATION) (((DESTINATION) == FDCAN_ACCEPT_IN_RX_FIFO0) || \
2358 ((DESTINATION) == FDCAN_ACCEPT_IN_RX_FIFO1) || \
2359 ((DESTINATION) == FDCAN_REJECT ))
2360#define IS_FDCAN_REJECT_REMOTE(DESTINATION) (((DESTINATION) == FDCAN_FILTER_REMOTE) || \
2361 ((DESTINATION) == FDCAN_REJECT_REMOTE))
2362#define IS_FDCAN_IT_LINE(IT_LINE) (((IT_LINE) == FDCAN_INTERRUPT_LINE0) || \
2363 ((IT_LINE) == FDCAN_INTERRUPT_LINE1))
2364#define IS_FDCAN_TIMESTAMP(OPERATION) (((OPERATION) == FDCAN_TIMESTAMP_INTERNAL) || \
2365 ((OPERATION) == FDCAN_TIMESTAMP_EXTERNAL))
2366#define IS_FDCAN_TIMESTAMP_PRESCALER(PRESCALER) (((PRESCALER) == FDCAN_TIMESTAMP_PRESC_1 ) || \
2367 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_2 ) || \
2368 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_3 ) || \
2369 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_4 ) || \
2370 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_5 ) || \
2371 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_6 ) || \
2372 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_7 ) || \
2373 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_8 ) || \
2374 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_9 ) || \
2375 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_10) || \
2376 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_11) || \
2377 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_12) || \
2378 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_13) || \
2379 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_14) || \
2380 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_15) || \
2381 ((PRESCALER) == FDCAN_TIMESTAMP_PRESC_16))
2382#define IS_FDCAN_TIMEOUT(OPERATION) (((OPERATION) == FDCAN_TIMEOUT_CONTINUOUS ) || \
2383 ((OPERATION) == FDCAN_TIMEOUT_TX_EVENT_FIFO) || \
2384 ((OPERATION) == FDCAN_TIMEOUT_RX_FIFO0 ) || \
2385 ((OPERATION) == FDCAN_TIMEOUT_RX_FIFO1 ))
2386#define IS_FDCAN_CALIBRATION_FIELD_LENGTH(LENGTH) (((LENGTH) == FDCAN_CALIB_FIELD_LENGTH_32) || \
2387 ((LENGTH) == FDCAN_CALIB_FIELD_LENGTH_64))
2388#define IS_FDCAN_CALIBRATION_COUNTER(COUNTER) (((COUNTER) == FDCAN_CALIB_TIME_QUANTA_COUNTER ) || \
2389 ((COUNTER) == FDCAN_CALIB_CLOCK_PERIOD_COUNTER) || \
2390 ((COUNTER) == FDCAN_CALIB_WATCHDOG_COUNTER ))
2391#define IS_FDCAN_TT_REFERENCE_MESSAGE_PAYLOAD(PAYLOAD) (((PAYLOAD) == FDCAN_TT_REF_MESSAGE_NO_PAYLOAD ) || \
2392 ((PAYLOAD) == FDCAN_TT_REF_MESSAGE_ADD_PAYLOAD))
2393#define IS_FDCAN_TT_REPEAT_FACTOR(FACTOR) (((FACTOR) == FDCAN_TT_REPEAT_EVERY_CYCLE ) || \
2394 ((FACTOR) == FDCAN_TT_REPEAT_EVERY_2ND_CYCLE ) || \
2395 ((FACTOR) == FDCAN_TT_REPEAT_EVERY_4TH_CYCLE ) || \
2396 ((FACTOR) == FDCAN_TT_REPEAT_EVERY_8TH_CYCLE ) || \
2397 ((FACTOR) == FDCAN_TT_REPEAT_EVERY_16TH_CYCLE) || \
2398 ((FACTOR) == FDCAN_TT_REPEAT_EVERY_32ND_CYCLE) || \
2399 ((FACTOR) == FDCAN_TT_REPEAT_EVERY_64TH_CYCLE))
2400#define IS_FDCAN_TT_TRIGGER_TYPE(TYPE) (((TYPE) == FDCAN_TT_TX_REF_TRIGGER ) || \
2401 ((TYPE) == FDCAN_TT_TX_REF_TRIGGER_GAP ) || \
2402 ((TYPE) == FDCAN_TT_TX_TRIGGER_SINGLE ) || \
2403 ((TYPE) == FDCAN_TT_TX_TRIGGER_CONTINUOUS ) || \
2404 ((TYPE) == FDCAN_TT_TX_TRIGGER_ARBITRATION) || \
2405 ((TYPE) == FDCAN_TT_TX_TRIGGER_MERGED ) || \
2406 ((TYPE) == FDCAN_TT_WATCH_TRIGGER ) || \
2407 ((TYPE) == FDCAN_TT_WATCH_TRIGGER_GAP ) || \
2408 ((TYPE) == FDCAN_TT_RX_TRIGGER ) || \
2409 ((TYPE) == FDCAN_TT_TIME_BASE_TRIGGER ) || \
2410 ((TYPE) == FDCAN_TT_END_OF_LIST ))
2411#define IS_FDCAN_TT_TM_EVENT_INTERNAL(EVENT) (((EVENT) == FDCAN_TT_TM_NO_INTERNAL_EVENT ) || \
2412 ((EVENT) == FDCAN_TT_TM_GEN_INTERNAL_EVENT))
2413#define IS_FDCAN_TT_TM_EVENT_EXTERNAL(EVENT) (((EVENT) == FDCAN_TT_TM_NO_EXTERNAL_EVENT ) || \
2414 ((EVENT) == FDCAN_TT_TM_GEN_EXTERNAL_EVENT))
2415#define IS_FDCAN_OPERATION_MODE(MODE) (((MODE) == FDCAN_TT_COMMUNICATION_LEVEL1 ) || \
2416 ((MODE) == FDCAN_TT_COMMUNICATION_LEVEL2 ) || \
2417 ((MODE) == FDCAN_TT_COMMUNICATION_LEVEL0 ))
2418#define IS_FDCAN_TT_OPERATION(OPERATION) (((OPERATION) == FDCAN_STRICTLY_TT_OPERATION ) || \
2419 ((OPERATION) == FDCAN_EXT_EVT_SYNC_TT_OPERATION))
2420#define IS_FDCAN_TT_TIME_MASTER(FUNCTION) (((FUNCTION) == FDCAN_TT_SLAVE ) || \
2421 ((FUNCTION) == FDCAN_TT_POTENTIAL_MASTER))
2422#define IS_FDCAN_TT_EXTERNAL_CLK_SYNC(SYNC) (((SYNC) == FDCAN_TT_EXT_CLK_SYNC_DISABLE) || \
2423 ((SYNC) == FDCAN_TT_EXT_CLK_SYNC_ENABLE ))
2424#define IS_FDCAN_TT_GLOBAL_TIME_FILTERING(FILTERING) (((FILTERING) == FDCAN_TT_GLOB_TIME_FILT_DISABLE) || \
2425 ((FILTERING) == FDCAN_TT_GLOB_TIME_FILT_ENABLE ))
2426#define IS_FDCAN_TT_AUTO_CLK_CALIBRATION(CALIBRATION) (((CALIBRATION) == FDCAN_TT_AUTO_CLK_CALIB_DISABLE) || \
2427 ((CALIBRATION) == FDCAN_TT_AUTO_CLK_CALIB_ENABLE ))
2428#define IS_FDCAN_TT_EVENT_TRIGGER_POLARITY(POLARITY) (((POLARITY) == FDCAN_TT_EVT_TRIG_POL_RISING ) || \
2429 ((POLARITY) == FDCAN_TT_EVT_TRIG_POL_FALLING))
2430#define IS_FDCAN_TT_BASIC_CYCLES_NUMBER(NUMBER) (((NUMBER) == FDCAN_TT_CYCLES_PER_MATRIX_1 ) || \
2431 ((NUMBER) == FDCAN_TT_CYCLES_PER_MATRIX_2 ) || \
2432 ((NUMBER) == FDCAN_TT_CYCLES_PER_MATRIX_4 ) || \
2433 ((NUMBER) == FDCAN_TT_CYCLES_PER_MATRIX_8 ) || \
2434 ((NUMBER) == FDCAN_TT_CYCLES_PER_MATRIX_16) || \
2435 ((NUMBER) == FDCAN_TT_CYCLES_PER_MATRIX_32) || \
2436 ((NUMBER) == FDCAN_TT_CYCLES_PER_MATRIX_64))
2437#define IS_FDCAN_TT_CYCLE_START_SYNC(SYNC) (((SYNC) == FDCAN_TT_NO_SYNC_PULSE ) || \
2438 ((SYNC) == FDCAN_TT_SYNC_BASIC_CYCLE_START) || \
2439 ((SYNC) == FDCAN_TT_SYNC_MATRIX_START ))
2440#define IS_FDCAN_TT_TX_ENABLE_WINDOW(NTU) (((NTU) >= 1U) && ((NTU) <= 16U))
2441#define IS_FDCAN_TT_TUR_NUMERATOR(NUMERATOR) (((NUMERATOR) >= 0x10000U) && ((NUMERATOR) <= 0x1FFFFU))
2442#define IS_FDCAN_TT_TUR_DENOMINATOR(DENOMINATOR) (((DENOMINATOR) >= 0x0001U) && ((DENOMINATOR) <= 0x3FFFU))
2443#define IS_FDCAN_TT_TUR_LEVEL_1(NC,DC) ((NC) >= (4U * (DC)))
2444#define IS_FDCAN_TT_TUR_LEVEL_0_2(NC,DC) ((NC) >= (8U * (DC)))
2445#define IS_FDCAN_TT_STOP_WATCH_TRIGGER(TRIGGER) (((TRIGGER) == FDCAN_TT_STOP_WATCH_TRIGGER_0) || \
2446 ((TRIGGER) == FDCAN_TT_STOP_WATCH_TRIGGER_1) || \
2447 ((TRIGGER) == FDCAN_TT_STOP_WATCH_TRIGGER_2) || \
2448 ((TRIGGER) == FDCAN_TT_STOP_WATCH_TRIGGER_3))
2449#define IS_FDCAN_TT_EVENT_TRIGGER(TRIGGER) (((TRIGGER) == FDCAN_TT_EVENT_TRIGGER_0) || \
2450 ((TRIGGER) == FDCAN_TT_EVENT_TRIGGER_1) || \
2451 ((TRIGGER) == FDCAN_TT_EVENT_TRIGGER_2) || \
2452 ((TRIGGER) == FDCAN_TT_EVENT_TRIGGER_3))
2453#define IS_FDCAN_TT_TIME_PRESET(TIME) (((TIME) <= 0xFFFFU) && ((TIME) != 0x8000U))
2454#define IS_FDCAN_TT_STOP_WATCH_SOURCE(SOURCE) (((SOURCE) == FDCAN_TT_STOP_WATCH_DISABLED ) || \
2455 ((SOURCE) == FDCAN_TT_STOP_WATCH_CYCLE_TIME ) || \
2456 ((SOURCE) == FDCAN_TT_STOP_WATCH_LOCAL_TIME ) || \
2457 ((SOURCE) == FDCAN_TT_STOP_WATCH_GLOBAL_TIME))
2458#define IS_FDCAN_TT_STOP_WATCH_POLARITY(POLARITY) (((POLARITY) == FDCAN_TT_STOP_WATCH_RISING ) || \
2459 ((POLARITY) == FDCAN_TT_STOP_WATCH_FALLING))
2460#define IS_FDCAN_TT_REGISTER_TIME_MARK_SOURCE(SOURCE) (((SOURCE) == FDCAN_TT_REG_TIMEMARK_DIABLED ) || \
2461 ((SOURCE) == FDCAN_TT_REG_TIMEMARK_CYC_TIME) || \
2462 ((SOURCE) == FDCAN_TT_REG_TIMEMARK_LOC_TIME) || \
2463 ((SOURCE) == FDCAN_TT_REG_TIMEMARK_GLO_TIME))
2464
2465#define FDCAN_CHECK_IT_SOURCE(__IE__, __IT__) ((((__IE__) & (__IT__)) == (__IT__)) ? SET : RESET)
2466
2467#define FDCAN_CHECK_FLAG(__IR__, __FLAG__) ((((__IR__) & (__FLAG__)) == (__FLAG__)) ? SET : RESET)
2472/* Private functions prototypes ----------------------------------------------*/
2482/* Private functions ---------------------------------------------------------*/
2498#endif /* FDCAN1 */
2499
2500#ifdef __cplusplus
2501}
2502#endif
2503
2504#endif /* STM32H7xx_HAL_FDCAN_H */
2505
2506
#define __IO
Definition: core_cm4.h:239
This file contains HAL common defines, enumeration, macros and structures definitions.
HAL_StatusTypeDef
HAL Status structures definition.
Definition: stm32h7xx_hal_def.h:47
HAL_LockTypeDef
HAL Lock structures definition.
Definition: stm32h7xx_hal_def.h:58
FD Controller Area Network.
Definition: stm32h723xx.h:315
TTFD Controller Area Network.
Definition: stm32h723xx.h:376