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-02-19 07:46 PM
Hello
I have moved your question to the
‌ where someone should be able to assist you.Thanks
Oli
2017-02-19 08:12 PM
How many nodes are on the Bus ?
is the bus terminated ?
Only one master can be on the bus. Do you have multiple masters ?
You need at least one slave too.
2017-03-16 03:30 AM
Are you meaning where to find the values of your error frames when debugging?
Have you solved your question? I would like to see if it possible and find the register where this frames are kept and translated.
2017-03-16 03:15 PM
I am using 1Mb/s baudrate. It's in a UAV device, so the cable length is short.
The error frame only can be seen on bus. I am using a CANTrace to capture the CAN message, CANTrace also record error frame. I do use Kvaser CanKing, it accumulate error frame count but not record in log file.
2017-03-16 03:46 PM
It's battery-powered UAV. The whole system come with several subsystem, each one powered by a MCU and communicate with each other using CAN bus.
Unless I can change all of subsystem to other baudrate, otherwise it will error frame too - I think.
I think we don't have correct termination is the issue to have error frame. What I still can't prove is if the right termination will fix the issue. I have been tried couple of different termination already.
Thanks.
2017-03-16 03:56 PM
Yes, I did that. That's why I know we are not correctly terminated. What I am not sure if the right termination actually fix the issue.
2017-03-16 04:00 PM
I think you are asking about hardware, not registers, so they are likely unavailable.
what baud rate are you running ?
what length of cable ?
are you using a real CanBus cable solution, or still on loopback ?
I received errors very occasionally at 250Khz on a true solution over a 10M cable with a 120 Ohm terminator at one end. (should be on both ends I know)
after a few minutes I may see an error, but usually when someone turns on a fan or light or fridge I guess.
The hardware recovers immediately, but it reports the error.
2017-03-16 04:32 PM
yes, you really should match the impedance of the drivers to have half a chance of reducing errors.
are you using the CanBus filter ?
or
maybe you can get thicker power wires, the ground wire is most important.
put extra capacitance on your 5V rail,
can you feed power through an inductor or filter ?
2017-03-16 04:34 PM
is it electric or petrol based UAV ? either way, you will have noise issues.
I would say that you have noise on the line, so make sure both terminators are on, to reduce it.
Are you using isolated CAN modules ? it shouldn't be necessary if you have good grounding. 2-4mm wire between modules with good connections.
How are you generating the 5 volts ? .. it is likely your problem.
Power supplies seem to have many issues, solved by extra parts.
inductors and caps either side of the Switchers help, ferrites only stop noise above 2MHz
In my power supplies, I tend to go overboard, but the results are good.
do you need to go at 1Mhz ?
can you try 250KHz so see if the problem is resolved ?