FlexCAN abort race condition

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FlexCAN abort race condition

1,589 次查看
kt1003
Contributor II

In the Reference Manual 50.5.7.1 it says to clear the IFLAG bit before writing the abort code. But this would seem to lead to a race condition:  where the frame had just been transmitted, the IFLAG set, then the flag is cleared and CODE it set to abort and the transmission status is lost.

Elsewhere in the Reference Manual it states that the IFLAG bit is used to block writes to the mailbox. If the flag becomes set just before the abort code is written then the abort is blocked and the ISR will handle the transmission in the normal way (since CODE will indicate the frame is sent). So it would seem that *not* clearing the IFLAG is the correct thing to do.

Is my understanding correct and the recommended procedure for aborting actually wrong?

0 项奖励
回复
0 回复数