I use a TJA1050 module to expand My beaglebone black.The two picture up is my circuit. I use two resistors(10K and 4.7K) to convert 5V to 3.3V.
Now,the problem is that when I set can0 up , It could only run on lookback mode, I can get CAN message use (candump can0). It doesn't work on other mode. I can get nothing.
I use USB-CAN adapter to test.
I get this from DCAN1_RX pin. So I think the wiring of CAN bus is fine.
I think there is noly two possibilities. Frist there is some thing wrong with my work. And The second , My BBB is broken.
There is more info below.
debian@beaglebone:~$ sudo ip link set can0 type can bitrate 50000 loopback on
debian@beaglebone:~$ ip -details link show can0
5: can0: <NOARP,ECHO> mtu 16 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can <LOOPBACK> state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 50000 sample-point 0.875
tq 1250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
debian@beaglebone:~$ sudo ifconfig can0 up
debian@beaglebone:~$ ip -details link show can0
5: can0: <NOARP,UP,LOWER_UP,ECHO> mtu 16 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can <LOOPBACK> state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 50000 sample-point 0.875
tq 1250 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
c_can: tseg1 2..16 tseg2 1..8 sjw 1..4 brp 1..1024 brp-inc 1
clock 24000000
debian@beaglebone:~$ candump can0
can0 123 [8] 00 01 02 03 04 05 06 07
can0 123 [8] 00 01 02 03 04 05 06 07
can0 123 [8] 00 01 02 03 04 05 06 08
can0 123 [8] 00 01 02 03 04 05 06 08
debian@beaglebone:~$ ifconfig
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:208