STM32G474xx HAL 用户手册
宏定义
HAL FDCAN 错误代码
FDCAN 导出的常量

宏定义

#define HAL_FDCAN_ERROR_NONE   ((uint32_t)0x00000000U)
#define HAL_FDCAN_ERROR_TIMEOUT   ((uint32_t)0x00000001U)
#define HAL_FDCAN_ERROR_NOT_INITIALIZED   ((uint32_t)0x00000002U)
#define HAL_FDCAN_ERROR_NOT_READY   ((uint32_t)0x00000004U)
#define HAL_FDCAN_ERROR_NOT_STARTED   ((uint32_t)0x00000008U)
#define HAL_FDCAN_ERROR_NOT_SUPPORTED   ((uint32_t)0x00000010U)
#define HAL_FDCAN_ERROR_PARAM   ((uint32_t)0x00000020U)
#define HAL_FDCAN_ERROR_PENDING   ((uint32_t)0x00000040U)
#define HAL_FDCAN_ERROR_RAM_ACCESS   ((uint32_t)0x00000080U)
#define HAL_FDCAN_ERROR_FIFO_EMPTY   ((uint32_t)0x00000100U)
#define HAL_FDCAN_ERROR_FIFO_FULL   ((uint32_t)0x00000200U)
#define HAL_FDCAN_ERROR_LOG_OVERFLOW   FDCAN_IR_ELO
#define HAL_FDCAN_ERROR_RAM_WDG   FDCAN_IR_WDI
#define HAL_FDCAN_ERROR_PROTOCOL_ARBT   FDCAN_IR_PEA
#define HAL_FDCAN_ERROR_PROTOCOL_DATA   FDCAN_IR_PED
#define HAL_FDCAN_ERROR_RESERVED_AREA   FDCAN_IR_ARA
#define HAL_FDCAN_ERROR_INVALID_CALLBACK   ((uint32_t)0x00000100U)

宏定义文档

#define HAL_FDCAN_ERROR_FIFO_EMPTY   ((uint32_t)0x00000100U)

从空 FIFO 中获取元素

定义在文件 520 处的 stm32g4xx_hal_fdcan.h 第520行。

HAL_FDCAN_GetRxMessage()HAL_FDCAN_GetTxEvent() 引用。

#define HAL_FDCAN_ERROR_FIFO_FULL   ((uint32_t)0x00000200U)

向已满的 FIFO 中放入元素

定义在文件 521 处的 stm32g4xx_hal_fdcan.h 第521行。

HAL_FDCAN_AddMessageToTxFifoQ() 引用。

#define HAL_FDCAN_ERROR_INVALID_CALLBACK   ((uint32_t)0x00000100U)
#define HAL_FDCAN_ERROR_LOG_OVERFLOW   FDCAN_IR_ELO

CAN 错误日志计数器的溢出

定义在文件 522 处的 stm32g4xx_hal_fdcan.h 第522行。

#define HAL_FDCAN_ERROR_NONE   ((uint32_t)0x00000000U)

无错误

定义在文件 511 处的 stm32g4xx_hal_fdcan.h 第511行。

HAL_FDCAN_DeInit()HAL_FDCAN_Init()HAL_FDCAN_IRQHandler()HAL_FDCAN_Start() 引用。

#define HAL_FDCAN_ERROR_NOT_INITIALIZED   ((uint32_t)0x00000002U)
#define HAL_FDCAN_ERROR_NOT_READY   ((uint32_t)0x00000004U)
#define HAL_FDCAN_ERROR_NOT_STARTED   ((uint32_t)0x00000008U)
#define HAL_FDCAN_ERROR_NOT_SUPPORTED   ((uint32_t)0x00000010U)

模式不支持

定义在文件 516 处的 stm32g4xx_hal_fdcan.h 第516行。

HAL_FDCAN_ResetTimeoutCounter()HAL_FDCAN_ResetTimestampCounter() 引用。