LPCOpen function Chip_CCAN_Send() - blocking

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPCOpen function Chip_CCAN_Send() - blocking

584 Views
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?

Labels (5)
0 Kudos
1 Reply

402 Views
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 Kudos