Error Frames when No of CAN messages Transmitted and Received ?

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

Error Frames when No of CAN messages Transmitted and Received ?

2,440 Views
jlraj
Contributor I
Hello
i am a new member to this forum.
 When i try to transmit more number of CAN messages (duration ---10 msc ) and as well receive messages i am observing error frames ( Description : Active TX Transmission error) .i am using Triplet buffer for transmission and i have programmed all the acceptance filters with the message id's that i am transmitting .The no of messages tranmitted is around  7 ( with standard identifiers) from the micro.The nof of messages that micro is suppose to receive is 6( All with standard identifiers) .The family i am using for this is S12X family..
Can anybody help in solving this problem?
 
Thanks for your help in advance.

Message Edited by jlraj on 2007-04-0505:18 AM

Labels (1)
0 Kudos
5 Replies

639 Views
Alban
Senior Contributor II
Hello !

Welcome to the Forum. Please state the device you are using in the subject line, as it's easier to trace and answer.

For your issue, do you have a receiver acknowledging ALL packets. You can see this on the bus iteself.
As you seem to work with only one node, you could try the LOOPBACK mode to make abstraction of the physical interface and only work within the microcontroller.

The Active Tx Error means that the MCU has not seen its packets achnowledged.
The Error counter is incremented by 8 each time. And would flag an Error Active above 128, if I remember well.
This would mean that 16 messages sent were not acknowledged.

Alban.
0 Kudos

639 Views
jlraj
Contributor I
Hello
 
Thanks for the reply.
 i am using MC9S12XA256C .
i am using a CANCARD as an other node and a Vector tool for observing messages.
Independantly i am able to transmit messages from Micro and i am able to observe all the messages on the tool. Similarly i am able to Receive  messages in the micro with the correct filter hit ,when the messages are from the tool .
The problem is when i am transmitting around 4 messages from the micro and receive the messages (in to the micro) from the tool i am observing error frames. The Active TX error count is observed in the tool statistics window. But along with the error frames i am able to see the messages both transmitted and received.
i will check the transmission with loopback mode as advised?
Thanks in advance.
 
0 Kudos

639 Views
Alban
Senior Contributor II
Hi Again,

This msCAN module is certified for its CAN Conformance by an independant body.
We will try and analyzed what is wrong in your setup.

For instance, maybe you don't read back fast enough the messages from the Rx buffer.
I am not 100% sure I remember well, but maybe you overrun the Rx buffer because the Rx ISR is too long.

You can try by increasing time between messages and see if the error still occurs.
When you use the loopack, the CANCard will not be able to listen to the bus anymore.

The Error counter you were giving is not the one of the Micro but the one of the CANCard. That changes the deal. It means the CANCard sent messages which were not acknowledged by the S12X.

Alban.
{CAN expert...}
0 Kudos

639 Views
jlraj
Contributor I
Hello
Thank your for your wonderful reply.
The following is configured for reception: 
 i have configured 6 Acceptance filters for receiving six messages and  a single filter for receving messages with the ID for 0x480  ----0x48F .( i am supposed to receive 4 messages within these id's) hence i have alloted a common filter.
 
in the RX interrupt routine i am doing the following;
 
1. disable the RX interrupt.
2. Find the filter that is hit
3. Copy the data
4. clear the RXF flag which caused the ISR.
 
Even after making these changes i could see the error frames.( This i did after you mentioned earlier that the RX-ISR routine may be large enough to miss any incoming interuupts).
 
i have not implemented the error interrupt routine in the code. Can you please tell me the error frames may be due to not implementing the Error-ISR??
 
 
Thank a Lot
 
Jlraj
 
0 Kudos

639 Views
Alban
Senior Contributor II
Hi Jlraj,

Thanks for my ego boost.

I took the datasheet. With 4 messages, the Receiver cannot overrun as there are 5 Rx buffers.
Try without acceptance filtering and see if it could be that you actually reject messages you want.

Get the status of the registers to see if a frame was received.

Alban.
0 Kudos