/
Transmission While Transmitter is Busy
Transmission While Transmitter is Busy
If a task or function wants to transmit a CAN frame by calling the function CanBusWrite()
while the configured CAN transmitter is busy, the following steps will be performed:
Figure - CAN transmission while transmitter is busy
- The function
CanBusWrite()
is pending on the counting semaphore with the configured TxTimeout. The timeout must be set withCanBusIoCtl()
CANBUS_SET_TX_TIMEOUT
- If the function has the semaphore within the timeout, the given CAN frame is copied to the internal transmission queue. If a timeout error was detected, the function
CanBusWrite()
exits with an error-code.
Asynchronous to this actions, the transmission complete interrupt of the CAN controller shall activate the function CanBusTxHandler()
:
- The interrupt handler checks if a CAN frame is in the internal transmission queue.
- If a CAN frame is in the queue, the low level device driver function
Write()
is used to pass the CAN frame to the CAN controller. - The counting semaphore will be posted and the handler will be finished.
, multiple selections available,
Related content
Transmission While Transmitter is Idle
Transmission While Transmitter is Idle
More like this
Reception of a CAN frame
Reception of a CAN frame
More like this
CanBusWrite
CanBusWrite
More like this
Writing a CAN Message
Writing a CAN Message
More like this
CanBusIoCtl
CanBusIoCtl
More like this
CanBusEnable
CanBusEnable
More like this