- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Could you answer ASAP to the questions below?
Target Device: 16FX CY96F637RBPMC-GS-UJE1
Q1. Is there any way to know that a lost arbitration of CAN Tx has been happen, both when CTRLRn.DAR == 0?
Q2. How about lost arbitration detection when CTRLRn.DAR == 1?
After some nodes start Tx at same time, a node, which outputs recessive state (1) simultaneously when another node outputs dominant state (0) for arbitration field, loses the arbitration.
I know that Bit 1 Error in STATRn.LEC excludes an error for arbitration field.
I also conceive of a way with STATRn.RXOK bit which indicates successful message reception, because it is difficult to zero-clear the RXOK between the beginning of a Tx and when the RXOK is set by receiving a message from another node which wins an arbitration on the Tx.
Regards,
Koji
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We confirmed the query of this thread and prepared the answers as below.
Q1. Is there any way to know that a lost arbitration of CAN Tx has been happen, both when CTRLRn.DAR == 0?
A1. There is no way to know arbitration lost.
Q2. How about lost arbitration detection when CTRLRn.DAR == 1?
A2. If the arbitration lost is detected, retransmission doesn't happen. Transmission is stopped.
When CTRLRn.DAR == 1, the re-transmission isn't executed if a lost arbitration. The transmission stops.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I fix a typo to
I also DON'T conceive of a way with STATRn.RXOK bit ...
Regards,
Koji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We confirmed the query of this thread and prepared the answers as below.
Q1. Is there any way to know that a lost arbitration of CAN Tx has been happen, both when CTRLRn.DAR == 0?
A1. There is no way to know arbitration lost.
Q2. How about lost arbitration detection when CTRLRn.DAR == 1?
A2. If the arbitration lost is detected, retransmission doesn't happen. Transmission is stopped.
When CTRLRn.DAR == 1, the re-transmission isn't executed if a lost arbitration. The transmission stops.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi TakashiM_61-san,
Thank you for your great supporting.
Regarding A2,
The following is described in Hardware Manual:
[bit5] DAR: Disable Automatic Retransmission
Notes:
In the mode where the DAR bit is set to "1",
...
When frame transmission has finished successfully, the NEWDAT bit is reset to "0".
If arbitration is lost or an error is detected during transmission, the NEWDAT bit remains set.
How can I decide which it is the lost or the error?
Can I decide that with STATRn.TXOK/LEC.Bit1Error and .Bit0Error?
Is there any interrupt to notify a lost arbitration?
Is there any driver library for this lost arbitration control?
For example, is the following step correct?
1) set TXOK, Bit1Error, and Bit0Error to 0
2) set TXRQST to 1
3) wait TXRQST changed to 0
4) set a timer to wait the Tx finish
5) If NEWDAT == 1 after the timer, and TXOK==0 and no Bit 1/0 error
then it’s a lost arbitration
Regards,
Koji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When DAR bit is "1", a lost arbitration can be judged by STATRn.TXOK/LEC.Bit1Error and .Bit0Error.
There is no interrupt to notify the a lost arbitration. And we are sorry... we don't know there is a driver library or not.
For the step, it looks like correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Takashi-san
Thank you for your confirmation.
Koji