CAN frame structure in STM32
Hi,
I am trying to implement CAN bus using STM32F072RB
using normal mode.
I have found successfully transmission & reception from both the nodes.
I am having one doubt regarding the frame formation.
CAN is having the format as
SOF|11 bit identifier|SRR|IDE|18 bit identifier|RTR|R1|R0|DLC|8 byte data|CRC|ACK|EOF|IFS
But in stm32 I found only some of the fields in structure
i.e. ID | IDE | RTR | DLC | Timestamp | FilterMatchIndex
typedef struct
{
uint32_t StdId; /*!< Specifies the standard identifier.
This parameter must be a number between Min_Data = 0 and Max_Data = 0x7FF. */
uint32_t ExtId; /*!< Specifies the extended identifier.
This parameter must be a number between Min_Data = 0 and Max_Data = 0x1FFFFFFF. */
uint32_t IDE; /*!< Specifies the type of identifier for the message that will be transmitted.
This parameter can be a value of @ref CAN_identifier_type */
uint32_t RTR; /*!< Specifies the type of frame for the message that will be transmitted.
This parameter can be a value of @ref CAN_remote_transmission_request */
uint32_t DLC; /*!< Specifies the length of the frame that will be transmitted.
This parameter must be a number between Min_Data = 0 and Max_Data = 8. */
uint32_t Timestamp; /*!< Specifies the timestamp counter value captured on start of frame reception.
@note: Time Triggered Communication Mode must be enabled.
This parameter must be a number between Min_Data = 0 and Max_Data = 0xFFFF. */
uint32_t FilterMatchIndex; /*!< Specifies the index of matching acceptance filter element.
This parameter must be a number between Min_Data = 0 and Max_Data = 0xFF. */
} CAN_RxHeaderTypeDef;
How the CRC, ACK, R1, R0 etc. all other fields formation is done??
