This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

D_CAN in AM335x_EVM

In AM335x_EVM i am trying to access DCAN1 from userspace ..for that i have done these changes in DTS file ..

dcan1_default: dcan1_default_pins {
            pinctrl-single,pins = <
                0x168 (PIN_OUTPUT_PULLDOWN | MUX_MODE2) /* uart0_ctsn.d_can1_tx */
                0x16c (PIN_INPUT_PULLUP | MUX_MODE2) /* uart0_rtsn.d_can1_rx */
            >;
        };

&dcan1 {
    pinctrl-names = "default";
    pinctrl-0 = <&dcan1_default>;
    status = "okay";
};

Then i am using

#ip link set can0 type can bitrate 500000

#ip link set can0 up

and opened socket and trying to write data using below

nbytes = write(s, &frame, sizeof(struct can_frame));
    printf("Wrote %d bytes\n", nbytes);

It returns nbytes = 16 but i am not getting data on the CAN pins....

Note: I am in profile 1 only...

When i used loopback mode i am able to receive from another socket..

#ip link set can0 type can bitrate 50000 triple-sampling on loopback on


Can u tell me, if i am wrong somewhere.??.......

Thank you in advance,

Regards,

Ganesh