> > Thanks for the response. After the patch is applied the CNF: debug > line from "ip link set can0 type can bitrate 50000" always shows 0's. > As opposed to before the patch it would work only after the module was > loaded and after the failed "ip link set can0 up" command. >
I suspect there is something wrong on the CAN bus or the parameters of the 2 devices are not compatible. From the driver point of view the only reasons for having a bad baud rate are: 1) set bit timings called from the wrong context (not in config mode), but with the patch posted we should be able to clean out this possibility. 2) doing a hardware reset without programming the mcp251x afterwards. The reset can be done via an explicit command or via a pin. After a reset you should get an incredible high baud-rate as 2 Mbit/s with a 20 Mhz oscillator (but I'm not sure you can see this because the maximum is 1 Mbit/s). I really cannot think of other reasons the baud rate is wrong after the CNFs are programmed with those values. Of course general problems like a flaky SPI connection apply. But you can rule them out by a heavy cangen/candump testing in loopback mode. -- Christian Pellegrin, see http://www.evolware.org/chri/ "Real Programmers don't play tennis, or any other sport which requires you to change clothes. Mountain climbing is OK, and Real Programmers wear their climbing boots to work in case a mountain should suddenly spring up in the middle of the computer room." _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
