Controller area network (bxCAN)
ENABLE or DISABLE. When enabled, Time stamp
(TIME[15:0]) value is sent in the last two data bytes of the 8-
byte message: TIME[7:0] in data byte 6 and TIME[15:8] in
data byte 7.
ï‚· DLC must be programmed as 8 in order Time Stamp (2 bytes)
to be sent over the CAN bus.
4.2.9 CAN Frames Transmission functions
4.2.9.1 CAN_Transmit
uint8_t CAN_Transmit ( CAN_TypeDef * CANx, CanTxMsg *
TxMessage)
Initiates and transmits a CAN frame message.
ï‚· CANx : where x can be 1 or 2 to to select the CAN
peripheral.
ï‚· TxMessage : pointer to a structure which contains CAN Id,
CAN DLC and CAN data.
ï‚· The number of the mailbox that is used for transmission
or CAN_TxStatus_NoMailBox if there is no empty
mailbox.
4.2.9.2 CAN_TransmitStatus
uint8_t CAN_TransmitStatus ( CAN_TypeDef * CANx, uint8_t
TransmitMailbox)
Checks the transmission status of a CAN Frame.
ï‚· CANx : where x can be 1 to select the CAN1 peripheral.
ï‚· TransmitMailbox : the number of the mailbox that is used
for transmission.
ï‚· CAN_TxStatus_Ok if the CAN driver transmits the
message, CAN_TxStatus_Failed in an other case.