On 10/31/2011 11:13 AM, Tommy wrote: > Dear folks: > Hi,i met a bus off in S3C64XX SockCan,from lower-level spi > read/write,seems mcp2515 read/write is OK,but when i use cansend to send data > ,mcp2515 enter bus off mode,what should i go on debuging or verfy hardware is > no problem? please give me suggestions,i will read mcp2515 datasheet and > socketcan carefully in deep. > > Kernel booting log: > > Driver 'sd' needs updating - please use bus_type methods > drivers/spi/spi_s3c.c:s3c_spi_init:1149 > drivers/spi/spi_s3c.c:s3c_spi_probe:842 ID=0 > > mcp251x_read_reg > > mcp251x_spi_trans > > mcp251x_read_reg > > mcp251x_spi_trans > > mcp251x_read_reg > > mcp251x_spi_trans > mcp251x spi0.0: CANSTAT 0x80 CANCTRL 0x07 > > mcp251x_write_reg > > mcp251x_spi_trans > mcp251x spi0.0: probed > > Samsung SoC SPI Driver loaded for Bus SPI-0 with 1 Slaves attached > Max,Min-Speed [33250000, 129882]Hz > Irq=80 IOmem=[0x7f00bfff-0x7f00b000] DMA=[Rx-33, Tx-34] > usbmon: debugfs is not available > > > here is debug step: > > > 2)ifconfig can0 up > > 3)./cansend can0 111#1122334455667788
I suggest you try to first receive a canframe from another proven working station. Or even better, first build a working CAN network, then attach your mcp2515 and listen. > > > debug log: > [root@Tommy canbustest]# ./ip link set can0 type can bitrate 125000 > triple-sampl > ing on try without the "triple-sampling on" regards, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
