LPCOpen function Chip_CCAN_Send() - blocking

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPCOpen function Chip_CCAN_Send() - blocking

599件の閲覧回数
quex
Contributor I

I'm using the LPCOpen function Chip_CCAN_Send() on LPC4357. The function writes the data to a message object using the selected interface and then keeps checking if the data was sent. This checking is a blocking call. If the message does not get sent (and acknowledged), the function never returns.

I changed the function so that it also checks the CAN status register and returns if the last error "LEC" part of the CAN STATUS register is not zero. This way at least my program continues running if there is a bus problem. The function should return the status as well. So far it does not and all the data supposed to be sent in this situation is lost. (not a big deal in my case)

Does this implementation make sense or am I missing something?

ラベル(5)
0 件の賞賛
1 返信

417件の閲覧回数
soledad
NXP Employee
NXP Employee

Hi,

Please try using the example code used in the below thread.

EVB-4357: project periph_ccan 


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛