Hi,

The bitrate is 500000, the SPI speed is 5*1000*1000. Is That too high?
 Cansend test is all right, board B showed "can0  123  [0]".

In Makefile, CONFIG_CAN_CALC_BITTIMING=y, the caculated Tq is 166 ns,
prop_seg = 4, phase_seg1 = 5, phase_seg2 = 2. However, I found that people
always set them as follows in 5000000 bitrate: prop_seg = 7, phase_seg1 = 4,
phase_seg2 = 4. Is that does matter?

I tested many times with different parameters. Two clues are found, one has
been mentioned before is that if -L does not been set, whenever the error
appears, the length of the wrong frame is 8 bytes.
 The other clue is related to the first one,  if -L is set to 4 (or 2, or
6), such as
./cangen can0 -D i -L 4 -v -g 20
or even
./cangen can0  -D i -L 4 -v -g 1
Things are OK. But if -L is set to 8 as follows, error happens.
./dual_cangen can0 -L 8 -I 222 -D i -g 1
./dual_cangen can0 -L 8 -I 222 -D i -g 4
./dual_cangen can0 -L 8 -I 222 -D i -g 8
./dual_cangen can0 -L 8 -I 222 -D i -g 20
When set -g 20 -L 8, it is 8*50 = 400Bps = 0.4KBps. Error will happen in
this set.
When set -g 1 -L 4, it is 4*1000 = 4KBps. No error in this set.

Thanks for your helps!

Regards
Robert
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to