The CAN Write function returns a 0 if the write fails and a 1 if the write is successful per the Handbook page below.
What are the conditions that would/could trigger the Write to fail? Is one of the condition if there is no other nodes on the CAN Bus to send a ACK? How long does it wait before returning a failed write, etc..
Thanks
write
int write( CANMessage msg )
Write a CANMessage to the bus.
Variables
msg The CANMessage to write.
Returns
0 If write failed.
1 If write was successful.
The CAN Write function returns a 0 if the write fails and a 1 if the write is successful per the Handbook page below.
What are the conditions that would/could trigger the Write to fail? Is one of the condition if there is no other nodes on the CAN Bus to send a ACK? How long does it wait before returning a failed write, etc..
Thanks
<<code>>
write
int write( CANMessage msg )
Write a CANMessage to the bus.
Variables
msg The CANMessage to write.
Returns
0 If write failed.
1 If write was successful.
<</code>>
The CAN Transceiver activate pin is not pulled down to ground (deactivated)
The Bus is not terminated correctly
Have you tried the Loopback test to be sure your tranceivers are working? You can do this on a breadboard with two tranceivers and both CAN1 & CAN2 set up. Use CAN1 to TX and CAN2 to RX...
Hi Kevin,
The only things I know of are as follows...
The CAN Transceiver activate pin is not pulled down to ground (deactivated)
The Bus is not terminated correctly
Have you tried the Loopback test to be sure your tranceivers are working? You can do this on a breadboard with two tranceivers and both CAN1 & CAN2 set up. Use CAN1 to TX and CAN2 to RX...
The CAN Transceiver activate pin is not pulled down to ground (deactivated)
The Bus is not terminated correctly
Have you tried the Loopback test to be sure your tranceivers are working? You can do this on a breadboard with two tranceivers and both CAN1 & CAN2 set up. Use CAN1 to TX and CAN2 to RX...
I have the CAN channels working just fine. I'm sending and receiving CAN messages like mad!
So I can write "robust code" I need to know exactly what could cause the CAN write to come back with a "fail" condition.
<<quote TRS300>>
Hi Kevin,
The only things I know of are as follows...
The CAN Transceiver activate pin is not pulled down to ground (deactivated)
The Bus is not terminated correctly
Have you tried the Loopback test to be sure your tranceivers are working? You can do this on a breadboard with two tranceivers and both CAN1 & CAN2 set up. Use CAN1 to TX and CAN2 to RX...
<</quote>>
I have the CAN channels working just fine. I'm sending and receiving CAN messages like mad!
So I can write "robust code" I need to know exactly what could cause the CAN write to come back with a "fail" condition.
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
The CAN Write function returns a 0 if the write fails and a 1 if the write is successful per the Handbook page below.
What are the conditions that would/could trigger the Write to fail? Is one of the condition if there is no other nodes on the CAN Bus to send a ACK? How long does it wait before returning a failed write, etc..
Thanks