On Monday, July 28, 2014 3:46:16 PM UTC-4, [email protected] wrote: > > I just want to clarify really quick. Is DCAN0 "connected" to pins P9_24 > and P9_26 and DCAN1 is for pins P9_19 and P9_20? >
Correct. > > On Monday, July 28, 2014 8:44:25 AM UTC-5, Alexander Hiam wrote: >> >> >> On Friday, July 25, 2014 8:53:14 PM UTC-4, [email protected] wrote: >>> >>> Hey everybody! Hopefully a few simple questions some more experienced >>> users can answer. I am attempting to read and send can CAN using the >>> DCAN1_RX and DCAN1_TX modes for pins P9_24 and P9_26. Here is the step by >>> step of what I do. >>> >>> 1. Echo the device tree overlay to /sys/devices/bone_capemgr.9/slots >>> (shown below) >>> 2. I then attempt to set up CAN interface with the following line of >>> code: >>> >>> ip link set can1 type can bitrate 500000 >>> >>> This gives me a response "cannot find device "can1"" yet when I switch >>> can1 to can0 in the code above, it is successful in configuring the CAN >>> interface. So is the CAN interface on pins P9_24 and P9_26 supposed to be >>> DCAN0 and not DCAN1? >>> >> >> CAN0 and CAN1 are labelled dcan1 and dcan2 accordingly in the Device >> Tree, so you want can1 in your overlay to use the can0 pins and can0 >> network interface. >> >> >>> >>> My second question regards what I have seen in other posts. Many posts >>> have said you need to reconfigure the kernel to get DCAN working on the >>> beaglebone ( >>> http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide#Detailed_Kernel_Configuration). >>> >>> Why is this necessary? Isn't a device tree overlay sufficient? >>> >>> Not true, the CAN0 module at least works fine with the Debian images. >> Some more info here: >> http://inspire.logicsupply.com/2014/06/cbb-serial-automotive-can-bus.html >> >> >>> I am running Debian Image 2014-04-23 and the kernel is 3.8.13-bone47. >>> >>> Thanks for any help (ps I will be gone for a day or two so I won't be >>> able to respond to any questions you may have for me until then). >>> >>> BB-DCAN1.dts >>> >>> /dts-v1/; >>> /plugin/; >>> >>> / { >>> compatible = "ti,beaglebone", "ti,beaglebone-black"; >>> >>> /* identification */ >>> part-number = "dcan1pinmux"; >>> >>> fragment@0 { >>> target = <&am33xx_pinmux>; >>> __overlay__ { >>> dcan1_pins_s0: dcan1_pins_s0 { >>> pinctrl-single,pins = < >>> 0x180 0x12 /* P9_26 DCAN1_TX, SLEWCTRL_FAST | >>> OUTPUT_PULLUP | MODE2 */ >>> 0x184 0x32 /* P9_24 DCAN1_RX, SLEWCTRL_FAST | >>> INPUT_PULLUP | MODE2 */ >>> >; >>> }; >>> }; >>> }; >>> >>> fragment@1 { >>> target = <&dcan1>; >>> __overlay__ { >>> #address-cells = <1>; >>> #size-cells = <0>; >>> >>> status = "okay"; >>> pinctrl-names = "default"; >>> pinctrl-0 = <&dcan1_pins_s0>; >>> }; >>> }; >>> }; >>> >>> >> That overlay looks right for CAN0. >> >> -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
