2017-02-17 09:54 AM
Hi,
I am seeing Error Frame from one of our project using STM32F1x MCU. Any recommendation how to debug this issue?
Thanks,
Dick
112.227000 1 108 Rx d 8 db 1f c0 69 ee 89 e8 3e
112.227000 1 109 Rx d 8 86 31 94 43 00 00 00 00 112.227000 1 10a Rx d 8 00 00 00 00 6d 86 ec bf 112.228000 1 10b Rx d 8 00 00 00 00 04 00 00 40 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 ErrorFrame ECC: 11011001 112.228000 1 6fe Rx d 8 00 49 82 56 53 29 39 16 112.229000 1 6fe Rx d 8 00 32 4e 38 37 86 23 21 112.229000 1 6fe Rx d 8 00 50 65 55 49 54 30 022017-03-16 04:52 PM
Hi,
power off the whole system, and use a multimeter to read 60Ohms...
120Ohms at each end is 60Ohms
2017-03-16 04:56 PM
I did try both battery power and power supply, same result.
2017-03-16 06:37 PM
are the issues more or less obvious when the UAV is operating ?
how thick is the ground wire ?
what did you do to suppress the 5V Switcher noise ?
do you have an isolated CAN module ? Can you try one ?
2017-03-16 11:43 PM
What is the bus load and how much are error frames?
You are to expect error frames, CAN bus can handle this up the bus-off limit. It will retransmit. If you go over the bus-off limit, then you should be worried.
If you application is idling, thus no noise generating devices are enabled, do you have errors?
Are you following the standard? Eg: no two nodes transmit the same ID, nodes have a little pause between identical identifiers. Cable is twisted pair. Cable can be shielded.
Both ends of the bus are 120 ohm terminated, preferably split termination. Stub length is under 1.5 meter. (for 250 kbit)
I've build a system with ~40 meters of cable and ~50 nodes at 250kbit with many VFD's and relays. Sometimes when relays switch, an error frame occurs.
CAN is designed to handle this. Is your application?
2017-03-17 07:42 AM
The definition of the error I have. See below. Thx
ErrorFrame ECC: 11011001
11 other type of error
Bit 7 Bit 6 Meaning
0 0 bit error0 1 form error1 0 stuff error1 1 other type of errorBit 5 Meaning
0 TX; error occurred during transmission1 RX; error occurred during receptionBit 4..0 Meaning
0x03 start of frame0x02 ID.28 to ID.210x06 ID.20 to ID.180x04 bit SRTR0x05 bit IDE0x07 ID.17 to ID.130x0F ID.12 to ID.50x0E ID.4 to ID.00x0C bit RTR0x0D reserved bit 10x09 reserved bit 00x0B data length code0x0A data field0x08 CRC sequence0x18 CRC delimiter0x19 acknowledge slot0x1B acknowledge delimiter0x1A end of frame0x12 intermission0x11 active error flag0x16 passive error flag0x13 tolerate dominant bits0x17 error delimiter0x1C overload flagACK slotThe acknowledge slot is used to acknowledge the receipt of a valid CAN frame. Each node that receives the frame without finding an error, transmits a dominant level in the ACK slot and thus overrides the recessive level of the transmitter. If a transmitter detects a recessive level in the ACK slot it knows that no receiver found a valid frame. A receiving node may transmit a recessive to indicate that it did not receive a valid frame, but another node that did receive a valid frame may override this with a dominant. The transmitting node cannot know that the message has been received by all of the nodes on the CAN network.ACKNOWLEDGEMENT ERROR
Detected by the transmitter if a dominant value is not found in theack slot2017-03-17 07:51 AM
Bus load about 20~25%. I think it's pretty normal.
2017-03-17 12:57 PM
Do you have ACK errors? How many active nodes are bus-on? You need at least 2 active nodes for CAN bus to work.
A receiving node may transmit a recessive to indicate that it did not receive a valid frame, but another node that did receive a valid frame may override this with a dominant.
If a receiving node does not receive a correct CAN frame, it won't ACK but it will send and error frame. This is, iirc, 6 dominant bit times. (violates stuffing rule, is an error frame)
Either all nodes receive the message, or no nodes receive the message. If some nodes do, they will discard it on an error frame.