cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting CAN transmit complete via interrupt

malcolm23
Associate III
Posted on April 30, 2015 at 20:52

Greetings,

I'm trying to work out how to detect when a can transmit completes on an STM32F429. Theoretically I could poll using CAN_TransmitStatus to wait for the mailbox to transition to CAN_TxStatus_Ok (or CAN_TxStatus_Failed on error); however the software can't afford to poll, so I'm looking for an interrupt-based solution.

I can't seem to use the CAN_IT_TME interrupt, because it fires when *ANY* transmit mailbox is empty, so if I only want to write a single message and wait for it to finish transmitting, the CAN_IT_TME will fire instantly and continuously because the other two mailboxes are empty.

The reason I'm looking for this feature is I'm controlling a motor, and need to verify all configuration settings (speed, acceleration, target, etc) configuration commands have been received before transmitting the ''go'' command.

Many thanks,

 - Malcolm

#stm32-can
0 REPLIES 0