canfd
Vitis Drivers API Documentation
xcanfd.c File Reference

Functions

int XCanFd_CfgInitialize (XCanFd *InstancePtr, XCanFd_Config *ConfigPtr, UINTPTR EffectiveAddr)
 This routine initializes a specific XCanFd instance/driver. More...
 
int XCanFd_stop (XCanFd *InstancePtr)
 This routine releases resources of XCanFd instance/driver. More...
 
u32 XCanFd_AcceptFilterGetEnabled (XCanFd *InstancePtr)
 This function returns enabled acceptance filters. More...
 
u8 XCanFd_GetMode (XCanFd *InstancePtr)
 This routine returns current operation mode the CAN device is in. More...
 
void XCanFd_EnterMode (XCanFd *InstancePtr, u8 OperationMode)
 This function allows the CAN device to enter one of the following operation modes: More...
 
void XCanFd_GetBusErrorCounter (XCanFd *InstancePtr, u8 *RxErrorCount, u8 *TxErrorCount)
 This function reads Receive and Transmit error counters. More...
 
int XCanFd_Send (XCanFd *InstancePtr, u32 *FramePtr, u32 *TxBufferNumber)
 This function sends a CAN/CANFD Frame. More...
 
int XCanFd_Addto_Queue (XCanFd *InstancePtr, u32 *FramePtr, u32 *TxBufferNumber)
 This function writes the Data into specific Buffer.we have 32 TxBuffers we can Add data to each Buffer using this routine.This routine won't transmit the data. More...
 
u32 XCanFd_Recv_Sequential (XCanFd *InstancePtr, u32 *FramePtr)
 This function receives a CAN/CAN FD Frame. More...
 
u32 XCanFd_Recv_TXEvents_Sequential (XCanFd *InstancePtr, u32 *FramePtr)
 This function receives a CAN/CAN FD TX Events. More...
 
u32 XCanFd_Recv_Mailbox (XCanFd *InstancePtr, u32 *FramePtr)
 This function receives a CAN Frame in MAIL BOX Mode. More...
 
u32 XCanFd_RxBuff_MailBox_Active (XCanFd *InstancePtr, u32 RxBuffer)
 This function sets an RxBuffer to Active State.In Mailbox Mode configuration we can set each buffer to receive with specific Id and Mask.inorder compare we need to first Activate the Buffer.Maximum number of RxBuffers depends on Design.Range 48,32,16. More...
 
u32 XCanFd_Set_MailBox_IdMask (XCanFd *InstancePtr, u32 RxBuffer, u32 MaskValue, u32 IdValue)
 This function sets the Id and Mask for an RxBuffer to participate in Id match.if a packet is received with an id which is equal to id we configured, then it is stored in RxBuffer. More...
 
u32 XCanFd_RxBuff_MailBox_DeActive (XCanFd *InstancePtr, u32 RxBuffer)
 This function sets an RxBuffer to InActive State.if we change a buffer to InActive state, then Rx Packet won't store into that buffer, even the Id is matched. More...
 
int XCanFd_TxBuffer_Cancel_Request (XCanFd *InstancePtr, u32 BufferNumber)
 This function Cancels a CAN/CAN FD Frame which was already initiated for transmission.This function first checks TRR Bit based on BufferNumber. More...
 
void XCanFd_AcceptFilterEnable (XCanFd *InstancePtr, u32 FilterIndexMask)
 This routine enables the acceptance filters. More...
 
void XCanFd_AcceptFilterDisable (XCanFd *InstancePtr, u32 FilterIndexMask)
 This routine disables the acceptance filters. More...
 
int XCanFd_AcceptFilterSet (XCanFd *InstancePtr, u32 FilterIndex, u32 MaskValue, u32 IdValue)
 This function sets values to the Acceptance Filter Mask Register (AFMR) and Acceptance Filter ID Register (AFIR) for the specified Acceptance Filter. More...
 
void XCanFd_AcceptFilterGet (XCanFd *InstancePtr, u32 FilterIndex, u32 *MaskValue, u32 *IdValue)
 This function reads the values of the Acceptance Filter Mask and ID Register for the specified Acceptance Filter. More...
 
XCanFd_ConfigXCanFd_GetConfig (unsigned int InstanceIndex)
 This function looks for the device configuration based on the device index. More...
 
int XCanFd_GetDlc2len (u32 Dlc, u32 Edl)
 This function returns Data Length Code(in Bytes),we need to pass DLC Field value in DLC Register. More...
 
u8 XCanFd_GetLen2Dlc (int len)
 This function returns Data Length Code of 4bits,we need to pass length in bytes. More...
 
u32 XCanFd_GetFreeBuffer (XCanFd *InstancePtr)
 This Routine returns the Free Buffers count out of 32 Transmit Buffers. More...
 
int XCanFd_Send_Queue (XCanFd *InstancePtr)
 This routine sends queue of buffers,when added to queue using Addto_Queue() Basically this will trigger the TRR Bit(s).This routine can be used when user want to send multiple packets at a time. More...
 
void XCanFd_PollQueue_Buffer (XCanFd *InstancePtr)
 This function Polls the TxBuffer(s) whether it is transmitted or not. More...
 
int XCanFd_GetNofMessages_Stored_Rx_Fifo (XCanFd *InstancePtr, u8 fifo_no)
 This function returns Number of messages Stored. More...
 
int XCanFd_GetNofMessages_Stored_TXE_FIFO (XCanFd *InstancePtr)
 This function returns Number of messages Stored in TX Event FIFO The FSR Register has Field called FL. More...
 
void XCanFd_Enable_Tranceiver_Delay_Compensation (XCanFd *InstancePtr)
 This function Enables the Transceiver delay compensation. More...
 
void XCanFd_Set_Tranceiver_Delay_Compensation (XCanFd *InstancePtr, u32 TdcOffset)
 This function Sets the Transceiver delay compensation offset. More...
 
void XCanFd_Disable_Tranceiver_Delay_Compensation (XCanFd *InstancePtr)
 This function Disables the Transceiver delay compensation. More...
 
void XCanFd_Pee_BusOff_Handler (XCanFd *InstancePtr)
 This function recovers the CAN device from Protocol Exception Event & Busoff Event States. More...