John Gourlay
2008-01-30 15:40:06 UTC
Olivier,
Thanks for the ideas, but I really would like to avoid polling the interface for the bus state.
I might have answered my own question, but I still need a little help. I've found that if I set the
NC_ATTR_LOG_COMM_ERRS attribute to true, then I get read-available notifications and
NC_FRMTYPE_COMM_ERR frames from ncRead. When the CAN controller goes into
error-passive state, the frame's arbitration id field contains 4003000B, "Comm. warning: No Ack".
When the CAN controller returns to error-active state, the frame's arbitration id field contains
0000000B, "Comm. errors/warnings cleared".
This is exactly what I want as far as it goes, but my remaining question is what if the CAN
controller goes into bus-off state? I can't test this case easily. What arbitration id value will
I get in this case? Reading between the lines, I'm hoping that it is 8003000B, "Comm. error:
No Ack". Is this right?
John
Thanks for the ideas, but I really would like to avoid polling the interface for the bus state.
I might have answered my own question, but I still need a little help. I've found that if I set the
NC_ATTR_LOG_COMM_ERRS attribute to true, then I get read-available notifications and
NC_FRMTYPE_COMM_ERR frames from ncRead. When the CAN controller goes into
error-passive state, the frame's arbitration id field contains 4003000B, "Comm. warning: No Ack".
When the CAN controller returns to error-active state, the frame's arbitration id field contains
0000000B, "Comm. errors/warnings cleared".
This is exactly what I want as far as it goes, but my remaining question is what if the CAN
controller goes into bus-off state? I can't test this case easily. What arbitration id value will
I get in this case? Reading between the lines, I'm hoping that it is 8003000B, "Comm. error:
No Ack". Is this right?
John