![]() |
S32 SDK
|
Data Structures | |
struct | flexcan_id_table_t |
FlexCAN RX FIFO ID filter table structure Implements : flexcan_id_table_t_Class. More... | |
struct | flexcan_buserr_counter_t |
FlexCAN bus error counters Implements : flexcan_buserr_counter_t_Class. More... | |
struct | flexcan_msgbuff_code_status_t |
FlexCAN Message Buffer code and status for transmit and receive Implements : flexcan_msgbuff_code_status_t_Class. More... | |
struct | flexcan_msgbuff_t |
FlexCAN message buffer structure Implements : flexcan_msgbuff_t_Class. More... | |
struct | flexcan_time_segment_t |
FlexCAN timing related structures Implements : flexcan_time_segment_t_Class. More... | |
struct | flexcan_pn_id_filter_t |
Pretended Networking ID filter. More... | |
struct | flexcan_pn_payload_filter_t |
Pretended Networking payload filter. More... | |
struct | flexcan_pn_config_t |
Pretended Networking configuration structure Implements : flexcan_pn_config_t_Class. More... | |
Macros | |
#define | CAN_ID_EXT_MASK 0x3FFFFu |
#define | CAN_ID_EXT_SHIFT 0 |
#define | CAN_ID_EXT_WIDTH 18 |
#define | CAN_ID_STD_MASK 0x1FFC0000u |
#define | CAN_ID_STD_SHIFT 18 |
#define | CAN_ID_STD_WIDTH 11 |
#define | CAN_ID_PRIO_MASK 0xE0000000u |
#define | CAN_ID_PRIO_SHIFT 29 |
#define | CAN_ID_PRIO_WIDTH 3 |
#define | CAN_CS_TIME_STAMP_MASK 0xFFFFu |
#define | CAN_CS_TIME_STAMP_SHIFT 0 |
#define | CAN_CS_TIME_STAMP_WIDTH 16 |
#define | CAN_CS_DLC_MASK 0xF0000u |
#define | CAN_CS_DLC_SHIFT 16 |
#define | CAN_CS_DLC_WIDTH 4 |
#define | CAN_CS_RTR_MASK 0x100000u |
#define | CAN_CS_RTR_SHIFT 20 |
#define | CAN_CS_RTR_WIDTH 1 |
#define | CAN_CS_IDE_MASK 0x200000u |
#define | CAN_CS_IDE_SHIFT 21 |
#define | CAN_CS_IDE_WIDTH 1 |
#define | CAN_CS_SRR_MASK 0x400000u |
#define | CAN_CS_SRR_SHIFT 22 |
#define | CAN_CS_SRR_WIDTH 1 |
#define | CAN_CS_CODE_MASK 0xF000000u |
#define | CAN_CS_CODE_SHIFT 24 |
#define | CAN_CS_CODE_WIDTH 4 |
#define | CAN_MB_EDL_MASK 0x80000000u |
#define | CAN_MB_BRS_MASK 0x40000000u |
Configuration | |
void | FLEXCAN_HAL_Enable (CAN_Type *base) |
Enables FlexCAN controller. More... | |
void | FLEXCAN_HAL_Disable (CAN_Type *base) |
Disables FlexCAN controller. More... | |
void | FLEXCAN_HAL_SelectClock (CAN_Type *base, flexcan_clk_source_t clk) |
Selects the clock source for FlexCAN. More... | |
static bool | FLEXCAN_HAL_GetClock (const CAN_Type *base) |
Reads the clock source for FlexCAN Protocol Engine (PE). More... | |
void | FLEXCAN_HAL_Init (CAN_Type *base) |
Initializes the FlexCAN controller. More... | |
void | FLEXCAN_HAL_SetTimeSegments (CAN_Type *base, const flexcan_time_segment_t *timeSeg) |
Sets the FlexCAN time segments for setting up bit rate. More... | |
void | FLEXCAN_HAL_SetTimeSegmentsCbt (CAN_Type *base, const flexcan_time_segment_t *timeSeg) |
Sets the FlexCAN time segments for setting up bit rate for FD BRS. More... | |
void | FLEXCAN_HAL_GetTimeSegments (const CAN_Type *base, flexcan_time_segment_t *timeSeg) |
Gets the FlexCAN time segments to calculate the bit rate. More... | |
void | FLEXCAN_HAL_ExitFreezeMode (CAN_Type *base) |
Un freezes the FlexCAN module. More... | |
void | FLEXCAN_HAL_EnterFreezeMode (CAN_Type *base) |
Freezes the FlexCAN module. More... | |
void | FLEXCAN_HAL_SetOperationMode (CAN_Type *base, flexcan_operation_modes_t mode) |
Set operation mode. More... | |
void | FLEXCAN_HAL_ExitOperationMode (CAN_Type *base, flexcan_operation_modes_t mode) |
Exit operation mode. More... | |
void | FLEXCAN_HAL_SetFDEnabled (CAN_Type *base, bool enable) |
Enables/Disables Flexible Data rate (if supported). More... | |
bool | FLEXCAN_HAL_IsFDEnabled (const CAN_Type *base) |
Checks if the Flexible Data rate feature is enabled. More... | |
void | FLEXCAN_HAL_SetPayloadSize (CAN_Type *base, flexcan_fd_payload_size_t payloadSize) |
Sets the payload size of the MBs. More... | |
uint8_t | FLEXCAN_HAL_GetPayloadSize (const CAN_Type *base) |
Gets the payload size of the MBs. More... | |
Data transfer | |
status_t | FLEXCAN_HAL_SetTxMsgBuff (CAN_Type *base, uint32_t msgBuffIdx, const flexcan_msgbuff_code_status_t *cs, uint32_t msgId, const uint8_t *msgData) |
Sets the FlexCAN message buffer fields for transmitting. More... | |
status_t | FLEXCAN_HAL_SetRxMsgBuff (CAN_Type *base, uint32_t msgBuffIdx, const flexcan_msgbuff_code_status_t *cs, uint32_t msgId) |
Sets the FlexCAN message buffer fields for receiving. More... | |
status_t | FLEXCAN_HAL_GetMsgBuff (CAN_Type *base, uint32_t msgBuffIdx, flexcan_msgbuff_t *msgBuff) |
Gets the FlexCAN message buffer fields. More... | |
status_t | FLEXCAN_HAL_LockRxMsgBuff (CAN_Type *base, uint32_t msgBuffIdx) |
Locks the FlexCAN Rx message buffer. More... | |
static void | FLEXCAN_HAL_UnlockRxMsgBuff (const CAN_Type *base) |
Unlocks the FlexCAN Rx message buffer. More... | |
status_t | FLEXCAN_HAL_EnableRxFifo (CAN_Type *base, uint32_t numOfFilters) |
Enables the Rx FIFO. More... | |
void | FLEXCAN_HAL_DisableRxFifo (CAN_Type *base) |
Disables the Rx FIFO. More... | |
static bool | FLEXCAN_HAL_IsRxFifoEnabled (const CAN_Type *base) |
Checks if Rx FIFO is enabled. More... | |
void | FLEXCAN_HAL_SetRxFifoFilterNum (CAN_Type *base, uint32_t number) |
Sets the number of the Rx FIFO filters. More... | |
status_t | FLEXCAN_HAL_SetMaxMsgBuffNum (CAN_Type *base, uint32_t maxMsgBuffNum) |
Sets the maximum number of Message Buffers. More... | |
void | FLEXCAN_HAL_SetRxFifoFilter (CAN_Type *base, flexcan_rx_fifo_id_element_format_t idFormat, const flexcan_id_table_t *idFilterTable) |
Sets the FlexCAN Rx FIFO fields. More... | |
void | FLEXCAN_HAL_ReadRxFifo (const CAN_Type *base, flexcan_msgbuff_t *rxFifo) |
Gets the FlexCAN Rx FIFO data. More... | |
Interrupts | |
status_t | FLEXCAN_HAL_SetMsgBuffIntCmd (CAN_Type *base, uint32_t msgBuffIdx, bool enable) |
Enables/Disables the FlexCAN Message Buffer interrupt. More... | |
void | FLEXCAN_HAL_SetErrIntCmd (CAN_Type *base, flexcan_int_type_t errType, bool enable) |
Enables error interrupt of the FlexCAN module. More... | |
Status | |
static uint32_t | FLEXCAN_HAL_GetFreezeAck (const CAN_Type *base) |
Gets the value of FlexCAN freeze ACK. More... | |
uint8_t | FLEXCAN_HAL_GetMsgBuffIntStatusFlag (const CAN_Type *base, uint32_t msgBuffIdx) |
Gets the individual FlexCAN MB interrupt flag. More... | |
static uint32_t | FLEXCAN_HAL_GetAllMsgBuffIntStatusFlag (const CAN_Type *base) |
Gets all FlexCAN Message Buffer interrupt flags. More... | |
static void | FLEXCAN_HAL_ClearMsgBuffIntStatusFlag (CAN_Type *base, uint32_t flag) |
Clears the interrupt flag of the message buffers. More... | |
void | FLEXCAN_HAL_GetErrCounter (const CAN_Type *base, flexcan_buserr_counter_t *errCount) |
Gets the transmit error counter and receives the error counter. More... | |
static uint32_t | FLEXCAN_HAL_GetErrStatus (const CAN_Type *base) |
Gets error and status. More... | |
void | FLEXCAN_HAL_ClearErrIntStatusFlag (CAN_Type *base) |
Clears all other interrupts in ERRSTAT register (Error, Busoff, Wakeup). More... | |
Mask | |
void | FLEXCAN_HAL_SetRxMaskType (CAN_Type *base, flexcan_rx_mask_type_t type) |
Sets the Rx masking type. More... | |
void | FLEXCAN_HAL_SetRxFifoGlobalStdMask (CAN_Type *base, uint32_t stdMask) |
Sets the FlexCAN RX FIFO global standard mask. More... | |
void | FLEXCAN_HAL_SetRxFifoGlobalExtMask (CAN_Type *base, uint32_t extMask) |
Sets the FlexCAN Rx FIFO global extended mask. More... | |
status_t | FLEXCAN_HAL_SetRxIndividualStdMask (CAN_Type *base, uint32_t msgBuffIdx, uint32_t stdMask) |
Sets the FlexCAN Rx individual standard mask for ID filtering in the Rx MBs and the Rx FIFO. More... | |
status_t | FLEXCAN_HAL_SetRxIndividualExtMask (CAN_Type *base, uint32_t msgBuffIdx, uint32_t extMask) |
Sets the FlexCAN Rx individual extended mask for ID filtering in the Rx Message Buffers and the Rx FIFO. More... | |
void | FLEXCAN_HAL_SetRxMsgBuffGlobalStdMask (CAN_Type *base, uint32_t stdMask) |
Sets the FlexCAN Rx Message Buffer global standard mask. More... | |
void | FLEXCAN_HAL_SetRxMsgBuff14StdMask (CAN_Type *base, uint32_t stdMask) |
Sets the FlexCAN RX Message Buffer BUF14 standard mask. More... | |
void | FLEXCAN_HAL_SetRxMsgBuff15StdMask (CAN_Type *base, uint32_t stdMask) |
Sets the FlexCAN Rx Message Buffer BUF15 standard mask. More... | |
void | FLEXCAN_HAL_SetRxMsgBuffGlobalExtMask (CAN_Type *base, uint32_t extMask) |
Sets the FlexCAN RX Message Buffer global extended mask. More... | |
void | FLEXCAN_HAL_SetRxMsgBuff14ExtMask (CAN_Type *base, uint32_t extMask) |
Sets the FlexCAN RX Message Buffer BUF14 extended mask. More... | |
void | FLEXCAN_HAL_SetRxMsgBuff15ExtMask (CAN_Type *base, uint32_t extMask) |
Sets the FlexCAN RX MB BUF15 extended mask. More... | |
static uint32_t | FLEXCAN_HAL_GetRxFifoHitIdAcceptanceFilter (const CAN_Type *base) |
Gets the FlexCAN ID acceptance filter hit indicator on Rx FIFO. More... | |
void | FLEXCAN_HAL_SetStuffBitCount (CAN_Type *base, bool enable) |
Enables/Disables the Stuff Bit Count for CAN FD frames. More... | |
void | FLEXCAN_HAL_SetSelfReception (CAN_Type *base, bool enable) |
Enables/Disables the Self Reception feature. More... | |
status_t | FLEXCAN_HAL_SetRxFifoDMA (CAN_Type *base, bool enable) |
Enables/Disables the DMA support for RxFIFO. More... | |
void | FLEXCAN_HAL_SetTDCOffset (CAN_Type *base, bool enable, uint8_t offset) |
Enables/Disables the Transceiver Delay Compensation feature and sets the Transceiver Delay Compensation Offset (offset value to be added to the measured transceiver's loop delay in order to define the position of the delayed comparison point when bit rate switching is active). More... | |
static uint8_t | FLEXCAN_HAL_GetTDCValue (const CAN_Type *base) |
Gets the value of the Transceiver Delay Compensation. More... | |
static bool | FLEXCAN_HAL_GetTDCFail (const CAN_Type *base) |
Gets the value of the TDC Fail flag. More... | |
static void | FLEXCAN_HAL_ClearTDCFail (CAN_Type *base) |
Clears the TDC Fail flag. More... | |
void | FLEXCAN_HAL_ConfigPN (CAN_Type *base, const flexcan_pn_config_t *pnConfig) |
Configures the Pretended Networking mode. More... | |
void | FLEXCAN_HAL_GetWMB (const CAN_Type *base, uint8_t wmbIndex, flexcan_msgbuff_t *wmb) |
Extracts one of the frames which triggered the wake up event. More... | |
static void | FLEXCAN_HAL_SetPN (CAN_Type *base, bool enable) |
Enables/Disables the Pretended Networking mode. More... | |
#define CAN_CS_CODE_MASK 0xF000000u |
Definition at line 291 of file flexcan_hal.h.
#define CAN_CS_CODE_SHIFT 24 |
Definition at line 292 of file flexcan_hal.h.
#define CAN_CS_CODE_WIDTH 4 |
Definition at line 293 of file flexcan_hal.h.
#define CAN_CS_DLC_MASK 0xF0000u |
Definition at line 275 of file flexcan_hal.h.
#define CAN_CS_DLC_SHIFT 16 |
Definition at line 276 of file flexcan_hal.h.
#define CAN_CS_DLC_WIDTH 4 |
Definition at line 277 of file flexcan_hal.h.
#define CAN_CS_IDE_MASK 0x200000u |
Definition at line 283 of file flexcan_hal.h.
#define CAN_CS_IDE_SHIFT 21 |
Definition at line 284 of file flexcan_hal.h.
#define CAN_CS_IDE_WIDTH 1 |
Definition at line 285 of file flexcan_hal.h.
#define CAN_CS_RTR_MASK 0x100000u |
Definition at line 279 of file flexcan_hal.h.
#define CAN_CS_RTR_SHIFT 20 |
Definition at line 280 of file flexcan_hal.h.
#define CAN_CS_RTR_WIDTH 1 |
Definition at line 281 of file flexcan_hal.h.
#define CAN_CS_SRR_MASK 0x400000u |
Definition at line 287 of file flexcan_hal.h.
#define CAN_CS_SRR_SHIFT 22 |
Definition at line 288 of file flexcan_hal.h.
#define CAN_CS_SRR_WIDTH 1 |
Definition at line 289 of file flexcan_hal.h.
#define CAN_CS_TIME_STAMP_MASK 0xFFFFu |
Definition at line 271 of file flexcan_hal.h.
#define CAN_CS_TIME_STAMP_SHIFT 0 |
Definition at line 272 of file flexcan_hal.h.
#define CAN_CS_TIME_STAMP_WIDTH 16 |
Definition at line 273 of file flexcan_hal.h.
#define CAN_ID_EXT_MASK 0x3FFFFu |
Definition at line 259 of file flexcan_hal.h.
#define CAN_ID_EXT_SHIFT 0 |
Definition at line 260 of file flexcan_hal.h.
#define CAN_ID_EXT_WIDTH 18 |
Definition at line 261 of file flexcan_hal.h.
#define CAN_ID_PRIO_MASK 0xE0000000u |
Definition at line 267 of file flexcan_hal.h.
#define CAN_ID_PRIO_SHIFT 29 |
Definition at line 268 of file flexcan_hal.h.
#define CAN_ID_PRIO_WIDTH 3 |
Definition at line 269 of file flexcan_hal.h.
#define CAN_ID_STD_MASK 0x1FFC0000u |
Definition at line 263 of file flexcan_hal.h.
#define CAN_ID_STD_SHIFT 18 |
Definition at line 264 of file flexcan_hal.h.
#define CAN_ID_STD_WIDTH 11 |
Definition at line 265 of file flexcan_hal.h.
#define CAN_MB_BRS_MASK 0x40000000u |
Definition at line 296 of file flexcan_hal.h.
#define CAN_MB_EDL_MASK 0x80000000u |
Definition at line 295 of file flexcan_hal.h.
anonymous enum |
FlexCAN message buffer CODE for Rx buffers.
Definition at line 63 of file flexcan_hal.h.
anonymous enum |
FlexCAN message buffer CODE FOR Tx buffers.
Definition at line 76 of file flexcan_hal.h.
anonymous enum |
FlexCAN message buffer transmission types.
Definition at line 87 of file flexcan_hal.h.
enum flexcan_clk_source_t |
FlexCAN clock source Implements : flexcan_clk_source_t_Class.
Enumerator | |
---|---|
FLEXCAN_CLK_SOURCE_SOSCDIV2 |
Clock divider 2 for System OSC |
FLEXCAN_CLK_SOURCE_SYS |
Sys clock |
Definition at line 148 of file flexcan_hal.h.
FlexCAN payload sizes Implements : flexcan_fd_payload_size_t_Class.
Definition at line 99 of file flexcan_hal.h.
enum flexcan_int_type_t |
FlexCAN error interrupt types Implements : flexcan_int_type_t_Class.
Enumerator | |
---|---|
FLEXCAN_INT_RX_WARNING |
RX warning interrupt |
FLEXCAN_INT_TX_WARNING |
TX warning interrupt |
FLEXCAN_INT_ERR |
Error interrupt |
FLEXCAN_INT_BUSOFF |
Bus off interrupt |
Definition at line 157 of file flexcan_hal.h.
FlexCAN Message Buffer ID type Implements : flexcan_msgbuff_id_type_t_Class.
Enumerator | |
---|---|
FLEXCAN_MSG_ID_STD |
Standard ID |
FLEXCAN_MSG_ID_EXT |
Extended ID |
Definition at line 139 of file flexcan_hal.h.
FlexCAN operation modes Implements : flexcan_operation_modes_t_Class.
Definition at line 54 of file flexcan_hal.h.
Pretended Networking filtering combinations.
Definition at line 225 of file flexcan_hal.h.
Pretended Networking matching schemes.
Definition at line 233 of file flexcan_hal.h.
ID formats for RxFIFO Implements : flexcan_rx_fifo_id_element_format_t_Class.
Definition at line 109 of file flexcan_hal.h.
FlexCAN RX mask type. Implements : flexcan_rx_mask_type_t_Class.
Enumerator | |
---|---|
FLEXCAN_RX_MASK_GLOBAL |
Rx global mask |
FLEXCAN_RX_MASK_INDIVIDUAL |
Rx individual mask |
Definition at line 131 of file flexcan_hal.h.
void FLEXCAN_HAL_ClearErrIntStatusFlag | ( | CAN_Type * | base | ) |
Clears all other interrupts in ERRSTAT register (Error, Busoff, Wakeup).
base | The FlexCAN base address |
Definition at line 1337 of file flexcan_hal.c.
|
inlinestatic |
Clears the interrupt flag of the message buffers.
base | The FlexCAN base address |
flag | The value to be written to the interrupt flag1 register. Implements : FLEXCAN_HAL_ClearMsgBuffIntStatusFlag_Activity |
Definition at line 686 of file flexcan_hal.h.
|
inlinestatic |
Clears the TDC Fail flag.
base | The FlexCAN base address Implements : FLEXCAN_HAL_ClearTDCFail_Activity |
Definition at line 942 of file flexcan_hal.h.
void FLEXCAN_HAL_ConfigPN | ( | CAN_Type * | base, |
const flexcan_pn_config_t * | pnConfig | ||
) |
Configures the Pretended Networking mode.
base | The FlexCAN base address |
pnConfig | The pretended networking configuration |
void FLEXCAN_HAL_Disable | ( | CAN_Type * | base | ) |
Disables FlexCAN controller.
base | The FlexCAN base address |
Definition at line 408 of file flexcan_hal.c.
void FLEXCAN_HAL_DisableRxFifo | ( | CAN_Type * | base | ) |
Disables the Rx FIFO.
base | The FlexCAN base address |
Definition at line 991 of file flexcan_hal.c.
void FLEXCAN_HAL_Enable | ( | CAN_Type * | base | ) |
Enables FlexCAN controller.
base | The FlexCAN base address |
Definition at line 386 of file flexcan_hal.c.
Enables the Rx FIFO.
base | The FlexCAN base address |
numOfFilters | The number of Rx FIFO filters |
STATUS_SUCCESS | RxFIFO was successfully enabled |
STATUS_ERROR | RxFIFO could not be enabled (e.g. the FD feature was enabled, and these two features are not compatible) |
Definition at line 947 of file flexcan_hal.c.
void FLEXCAN_HAL_EnterFreezeMode | ( | CAN_Type * | base | ) |
Freezes the FlexCAN module.
base | The FlexCAN base address |
Definition at line 1288 of file flexcan_hal.c.
void FLEXCAN_HAL_ExitFreezeMode | ( | CAN_Type * | base | ) |
Un freezes the FlexCAN module.
base | The FlexCAN base address |
Definition at line 1272 of file flexcan_hal.c.
void FLEXCAN_HAL_ExitOperationMode | ( | CAN_Type * | base, |
flexcan_operation_modes_t | mode | ||
) |
Exit operation mode.
base | The FlexCAN base address |
mode | Exit An operation mode |
Definition at line 1722 of file flexcan_hal.c.
|
inlinestatic |
Gets all FlexCAN Message Buffer interrupt flags.
base | The FlexCAN base address |
Definition at line 672 of file flexcan_hal.h.
|
inlinestatic |
Reads the clock source for FlexCAN Protocol Engine (PE).
base | The FlexCAN base address |
Definition at line 342 of file flexcan_hal.h.
void FLEXCAN_HAL_GetErrCounter | ( | const CAN_Type * | base, |
flexcan_buserr_counter_t * | errCount | ||
) |
Gets the transmit error counter and receives the error counter.
base | The FlexCAN base address |
errCount | Transmit error counter and receive error counter |
Definition at line 1319 of file flexcan_hal.c.
|
inlinestatic |
Gets error and status.
base | The FlexCAN base address |
Definition at line 711 of file flexcan_hal.h.
|
inlinestatic |
Gets the value of FlexCAN freeze ACK.
base | The FlexCAN base address |
Definition at line 649 of file flexcan_hal.h.
status_t FLEXCAN_HAL_GetMsgBuff | ( | CAN_Type * | base, |
uint32_t | msgBuffIdx, | ||
flexcan_msgbuff_t * | msgBuff | ||
) |
Gets the FlexCAN message buffer fields.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
msgBuff | The fields of the message buffer |
Definition at line 838 of file flexcan_hal.c.
uint8_t FLEXCAN_HAL_GetMsgBuffIntStatusFlag | ( | const CAN_Type * | base, |
uint32_t | msgBuffIdx | ||
) |
Gets the individual FlexCAN MB interrupt flag.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
Definition at line 1304 of file flexcan_hal.c.
uint8_t FLEXCAN_HAL_GetPayloadSize | ( | const CAN_Type * | base | ) |
Gets the payload size of the MBs.
base | The FlexCAN base address |
Definition at line 1836 of file flexcan_hal.c.
|
inlinestatic |
Gets the FlexCAN ID acceptance filter hit indicator on Rx FIFO.
base | The FlexCAN base address |
Definition at line 855 of file flexcan_hal.h.
|
inlinestatic |
Gets the value of the TDC Fail flag.
base | The FlexCAN base address |
Definition at line 931 of file flexcan_hal.h.
|
inlinestatic |
Gets the value of the Transceiver Delay Compensation.
base | The FlexCAN base address |
Definition at line 917 of file flexcan_hal.h.
void FLEXCAN_HAL_GetTimeSegments | ( | const CAN_Type * | base, |
flexcan_time_segment_t * | timeSeg | ||
) |
Gets the FlexCAN time segments to calculate the bit rate.
base | The FlexCAN base address |
timeSeg | FlexCAN time segments read for bit rate |
Definition at line 578 of file flexcan_hal.c.
void FLEXCAN_HAL_GetWMB | ( | const CAN_Type * | base, |
uint8_t | wmbIndex, | ||
flexcan_msgbuff_t * | wmb | ||
) |
Extracts one of the frames which triggered the wake up event.
base | The FlexCAN base address |
wmbIndex | The index of the message buffer to be extracted. |
wmb | Pointer to the message buffer structure where the frame will be saved. |
void FLEXCAN_HAL_Init | ( | CAN_Type * | base | ) |
Initializes the FlexCAN controller.
base | The FlexCAN base address |
Definition at line 450 of file flexcan_hal.c.
bool FLEXCAN_HAL_IsFDEnabled | ( | const CAN_Type * | base | ) |
Checks if the Flexible Data rate feature is enabled.
base | The FlexCAN base address |
Definition at line 1790 of file flexcan_hal.c.
|
inlinestatic |
Checks if Rx FIFO is enabled.
base | The FlexCAN base address |
Definition at line 557 of file flexcan_hal.h.
Locks the FlexCAN Rx message buffer.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
Definition at line 918 of file flexcan_hal.c.
void FLEXCAN_HAL_ReadRxFifo | ( | const CAN_Type * | base, |
flexcan_msgbuff_t * | rxFifo | ||
) |
Gets the FlexCAN Rx FIFO data.
base | The FlexCAN base address |
rxFifo | The FlexCAN receive FIFO data |
Definition at line 1358 of file flexcan_hal.c.
void FLEXCAN_HAL_SelectClock | ( | CAN_Type * | base, |
flexcan_clk_source_t | clk | ||
) |
Selects the clock source for FlexCAN.
base | The FlexCAN base address |
clk | The FlexCAN clock source |
void FLEXCAN_HAL_SetErrIntCmd | ( | CAN_Type * | base, |
flexcan_int_type_t | errType, | ||
bool | enable | ||
) |
Enables error interrupt of the FlexCAN module.
base | The FlexCAN base address |
errType | The interrupt type |
enable | choose enable or disable |
Definition at line 1247 of file flexcan_hal.c.
void FLEXCAN_HAL_SetFDEnabled | ( | CAN_Type * | base, |
bool | enable | ||
) |
Enables/Disables Flexible Data rate (if supported).
base | The FlexCAN base address |
enable | true to enable; false to disable |
Definition at line 1771 of file flexcan_hal.c.
Sets the maximum number of Message Buffers.
base | The FlexCAN base address |
maxMsgBuffNum | Maximum number of message buffers |
Definition at line 1033 of file flexcan_hal.c.
Enables/Disables the FlexCAN Message Buffer interrupt.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
enable | choose enable or disable |
Definition at line 1210 of file flexcan_hal.c.
void FLEXCAN_HAL_SetOperationMode | ( | CAN_Type * | base, |
flexcan_operation_modes_t | mode | ||
) |
Set operation mode.
base | The FlexCAN base address |
mode | Set an operation mode |
Definition at line 1671 of file flexcan_hal.c.
void FLEXCAN_HAL_SetPayloadSize | ( | CAN_Type * | base, |
flexcan_fd_payload_size_t | payloadSize | ||
) |
Sets the payload size of the MBs.
base | The FlexCAN base address |
payloadSize | The payload size |
Definition at line 1802 of file flexcan_hal.c.
|
inlinestatic |
Enables/Disables the Pretended Networking mode.
base | The FlexCAN base address |
enable | Enable/Disable Pretending Networking Implements : FLEXCAN_HAL_SetPN_Activity |
Definition at line 973 of file flexcan_hal.h.
Enables/Disables the DMA support for RxFIFO.
base | The FlexCAN base address |
enable | Enable/Disable DMA support |
void FLEXCAN_HAL_SetRxFifoFilter | ( | CAN_Type * | base, |
flexcan_rx_fifo_id_element_format_t | idFormat, | ||
const flexcan_id_table_t * | idFilterTable | ||
) |
Sets the FlexCAN Rx FIFO fields.
base | The FlexCAN base address |
idFormat | The format of the Rx FIFO ID Filter Table Elements |
idFilterTable | The ID filter table elements which contain RTR bit, IDE bit, and RX message ID. |
Definition at line 1090 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxFifoFilterNum | ( | CAN_Type * | base, |
uint32_t | number | ||
) |
Sets the number of the Rx FIFO filters.
base | The FlexCAN base address |
number | The number of Rx FIFO filters |
Definition at line 1011 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxFifoGlobalExtMask | ( | CAN_Type * | base, |
uint32_t | extMask | ||
) |
Sets the FlexCAN Rx FIFO global extended mask.
base | The FlexCAN base address |
extMask | Extended mask |
Definition at line 1455 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxFifoGlobalStdMask | ( | CAN_Type * | base, |
uint32_t | stdMask | ||
) |
Sets the FlexCAN RX FIFO global standard mask.
base | The FlexCAN base address |
stdMask | Standard mask |
Definition at line 1434 of file flexcan_hal.c.
status_t FLEXCAN_HAL_SetRxIndividualExtMask | ( | CAN_Type * | base, |
uint32_t | msgBuffIdx, | ||
uint32_t | extMask | ||
) |
Sets the FlexCAN Rx individual extended mask for ID filtering in the Rx Message Buffers and the Rx FIFO.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
extMask | Individual extended mask |
Definition at line 1510 of file flexcan_hal.c.
status_t FLEXCAN_HAL_SetRxIndividualStdMask | ( | CAN_Type * | base, |
uint32_t | msgBuffIdx, | ||
uint32_t | stdMask | ||
) |
Sets the FlexCAN Rx individual standard mask for ID filtering in the Rx MBs and the Rx FIFO.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
stdMask | Individual standard mask |
Definition at line 1476 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxMaskType | ( | CAN_Type * | base, |
flexcan_rx_mask_type_t | type | ||
) |
Sets the Rx masking type.
base | The FlexCAN base address |
type | The FlexCAN Rx mask type |
Definition at line 1404 of file flexcan_hal.c.
status_t FLEXCAN_HAL_SetRxMsgBuff | ( | CAN_Type * | base, |
uint32_t | msgBuffIdx, | ||
const flexcan_msgbuff_code_status_t * | cs, | ||
uint32_t | msgId | ||
) |
Sets the FlexCAN message buffer fields for receiving.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
cs | CODE/status values (RX) |
msgId | ID of the message to receive |
Definition at line 752 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxMsgBuff14ExtMask | ( | CAN_Type * | base, |
uint32_t | extMask | ||
) |
Sets the FlexCAN RX Message Buffer BUF14 extended mask.
base | The FlexCAN base address |
extMask | Extended mask |
Definition at line 1628 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxMsgBuff14StdMask | ( | CAN_Type * | base, |
uint32_t | stdMask | ||
) |
Sets the FlexCAN RX Message Buffer BUF14 standard mask.
base | The FlexCAN base address |
stdMask | Standard mask |
Definition at line 1565 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxMsgBuff15ExtMask | ( | CAN_Type * | base, |
uint32_t | extMask | ||
) |
Sets the FlexCAN RX MB BUF15 extended mask.
base | The FlexCAN base address |
extMask | Extended mask |
Definition at line 1649 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxMsgBuff15StdMask | ( | CAN_Type * | base, |
uint32_t | stdMask | ||
) |
Sets the FlexCAN Rx Message Buffer BUF15 standard mask.
base | The FlexCAN base address |
stdMask | Standard mask |
Definition at line 1586 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxMsgBuffGlobalExtMask | ( | CAN_Type * | base, |
uint32_t | extMask | ||
) |
Sets the FlexCAN RX Message Buffer global extended mask.
base | The FlexCAN base address |
extMask | Extended mask |
Definition at line 1607 of file flexcan_hal.c.
void FLEXCAN_HAL_SetRxMsgBuffGlobalStdMask | ( | CAN_Type * | base, |
uint32_t | stdMask | ||
) |
Sets the FlexCAN Rx Message Buffer global standard mask.
base | The FlexCAN base address |
stdMask | Standard mask |
Definition at line 1543 of file flexcan_hal.c.
void FLEXCAN_HAL_SetSelfReception | ( | CAN_Type * | base, |
bool | enable | ||
) |
Enables/Disables the Self Reception feature.
If enabled, FlexCAN is allowed to receive frames transmitted by itself.
base | The FlexCAN base address |
enable | Enable/Disable Self Reception |
Definition at line 1882 of file flexcan_hal.c.
void FLEXCAN_HAL_SetStuffBitCount | ( | CAN_Type * | base, |
bool | enable | ||
) |
Enables/Disables the Stuff Bit Count for CAN FD frames.
If enabled, the modulo 8 count of variable stuff bits inserted plus the respective parity bit (even parity calculated over the 3-bit modulo 8 count) are combined as the 4-bit Stuff Count field and inserted before the CRC Sequence field. CRC calculation extends beyond the end of Data field and takes the Stuff Count field bits into account.
base | The FlexCAN base address |
enable | Enable/Disable Stuff Bit Count |
Definition at line 1861 of file flexcan_hal.c.
void FLEXCAN_HAL_SetTDCOffset | ( | CAN_Type * | base, |
bool | enable, | ||
uint8_t | offset | ||
) |
Enables/Disables the Transceiver Delay Compensation feature and sets the Transceiver Delay Compensation Offset (offset value to be added to the measured transceiver's loop delay in order to define the position of the delayed comparison point when bit rate switching is active).
base | The FlexCAN base address |
enable | Enable/Disable Transceiver Delay Compensation |
offset | Transceiver Delay Compensation Offset |
Definition at line 1925 of file flexcan_hal.c.
void FLEXCAN_HAL_SetTimeSegments | ( | CAN_Type * | base, |
const flexcan_time_segment_t * | timeSeg | ||
) |
Sets the FlexCAN time segments for setting up bit rate.
base | The FlexCAN base address |
timeSeg | FlexCAN time segments, which need to be set for the bit rate. |
Definition at line 493 of file flexcan_hal.c.
void FLEXCAN_HAL_SetTimeSegmentsCbt | ( | CAN_Type * | base, |
const flexcan_time_segment_t * | timeSeg | ||
) |
Sets the FlexCAN time segments for setting up bit rate for FD BRS.
base | The FlexCAN base address |
timeSeg | FlexCAN time segments, which need to be set for the bit rate. |
Definition at line 547 of file flexcan_hal.c.
status_t FLEXCAN_HAL_SetTxMsgBuff | ( | CAN_Type * | base, |
uint32_t | msgBuffIdx, | ||
const flexcan_msgbuff_code_status_t * | cs, | ||
uint32_t | msgId, | ||
const uint8_t * | msgData | ||
) |
Sets the FlexCAN message buffer fields for transmitting.
base | The FlexCAN base address |
msgBuffIdx | Index of the message buffer |
cs | CODE/status values (TX) |
msgId | ID of the message to transmit |
msgData | Bytes of the FlexCAN message |
Definition at line 603 of file flexcan_hal.c.
|
inlinestatic |
Unlocks the FlexCAN Rx message buffer.
base | The FlexCAN base address Implements : FLEXCAN_HAL_UnlockRxMsgBuff_Activity |
Definition at line 525 of file flexcan_hal.h.