Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1583

Can issue in RZ/A1H

$
0
0

Dear All,

I have configured CAN1(protocol) bus in my dts file system as shown  below

can1_pins: can1 {
pinmux = <RZA1_PINMUX(1, 4, 3)>, /* CAN1RX */
<RZA1_PINMUX(5,10, 5)>; /* CAN1TX */
};

/* Clock Source Select Options */
#define CLKR_CLKC 0 /* P1/2 */
#define CLKR_CLK_XINCAN 1 /* CAN_CLK pin */

&rza1_can {
pinctrl-names = "default";
pinctrl-0 = <&can1_pins>;

renesas,clock-select = <CLKR_CLKC>; /* Clock source select */
//renesas,clk-xincan-rate = <xx>; /* Set clock rate when CAN_CLK is used */
renesas,channel = <1>;
status = "okay";
};

build was find then i have flashed to RZ/A1H module and after the boot, below is the message for CAN

dmesg | grep can
[ 2.121085] pinctrl-rza1 fcfe3000.pin-controller: Parsed function and group can1 with 2 pins
[ 2.140862] rza1_can e803a000.can: device registered (clock: 33325000, ch: 1, k_tx: 4, k_rx: 3)
[ 3.612787] can: controller area network core (rev 20170425 abi 9)
[ 3.632962] can: raw protocol (rev 20170425)
[ 3.641525] can: broadcast manager protocol (rev 20170425 t)
[ 3.651443] can: netlink gateway (rev 20170425) max_hops=1

for configuring CAN i am using the below commands

ip link set can0 type can bitrate 125000

ip link set up can0

ifconfig can0

configuration response


$ ip link set can0 type can bitrate 125000
[ 94.626399] rza1_can e803a000.can can0: bitrate error 0.2%
$ ip link set up can0
[ 109.501316] IPv6: ADDRCONF(NETDEV_UP): can0: link is not ready
[ 109.508242] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
$ ifconfig can0
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)

cansend can0 123#1122334455667788
After sending the message via cansend command it will keep on sending the msg and showing can bus-off error as below.
cansend can0 123#1122334455667788
[ 359.734917] rza1_can e803a000.can can0: bus-off
[ 359.749308] rza1_can e803a000.can can0: bus-off
$ [ 359.763864] rza1_can e803a000.can can0: bus-off
[ 359.778237] rza1_can e803a000.can can0: bus-off
[ 359.792695] rza1_can e803a000.can can0: bus-off
[ 359.807151] rza1_can e803a000.can can0: bus-off
[ 359.821627] rza1_can e803a000.can can0: bus-off
[ 359.836119] rza1_can e803a000.can can0: bus-off
[ 359.850604] rza1_can e803a000.can can0: bus-off
[ 359.865088] rza1_can e803a000.can can0: bus-off
[ 359.879573] rza1_can e803a000.can can0: bus-off
[ 359.894072] rza1_can e803a000.can can0: bus-off
[ 359.908549] rza1_can e803a000.can can0: bus-off
[ 359.923036] rza1_can e803a000.can can0: bus-off
[ 359.937513] rza1_can e803a000.can can0: bus-off
[ 359.952001] rza1_can e803a000.can can0: bus-off
Can please help me out, wat configuration is missing or wat settings i have done wrong.
Thanks & regards
Mahesh R


Viewing all articles
Browse latest Browse all 1583

Trending Articles