Zynq+linux+ramdisk can commissioning

Source: Internet
Author: User

Due to the use of the RAMDisk file system, the IP tool version is too old to configure can, you need to self-compile IP, see reference 2

1.vivado Configuration PS

2. The device tree adds Can0, and the General Development Board has provided this configuration

[Email protected]  {compatible = "xlnx,zynq-can-1.0"; status = "Okay"; clocks = <0x1 0x13 0x1 0x24>;clock-names = "Can_clk", "PCLK"; reg = <0xe0008000 0x1000>;interrupts = <0x0 0x1c 0x4>;interrupt-parent = <0x3>;tx-fifo-depth = <0x40> ; rx-fifo-depth = <0x40>;};

3.kernel configuration, generally well-equipped, see reference 1

4. Testing

#ifconfig-acan0 Link encap:unspec HWaddrxx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xx-xxnoarp MTU: -Metric:1RX Packets:0Errors0Dropped0Overruns:0Frame0TX Packets:0Errors0Dropped0Overruns:0Carrier0Collisions:0Txqueuelen:TenRX Bytes:0(0.0B) TX Bytes:0(0.0B) Interrupt: Aeth0 Link encap:ethernet HWaddrxx: 0A: *:xx: on: Ainet Addr:192.168.0.120Bcast:192.168.0.255Mask:255.255.255.0Up broadcast RUNNING multicast MTU: theMetric:1RX Packets:397Errors0Dropped0Overruns:0Frame0TX Packets:242Errors0Dropped0Overruns:0Carrier0Collisions:0Txqueuelen: +RX Bytes:476490(465.3KiB) TX Bytes:18536(18.1KiB) Interrupt:148Base Address:0xb000lo Link encap:local Loopback Loopback MTU:65536Metric:1RX Packets:0Errors0Dropped0Overruns:0Frame0TX Packets:0Errors0Dropped0Overruns:0Carrier0Collisions:0Txqueuelen:0RX Bytes:0(0.0B) TX Bytes:0(0.0B

Set the baud rate of the can0, which is set at 100k
#./ip link Set Can0 type can bitrate100000
Enable Can0
#./ip Link Set can0 up
Display Can0 status information
#./ip-d-S Link show can0

z-turn#./IP Link set can0 type can bitrate100000xilinx_can e0008000.can can0:bitrate error0.0%Z-turn#./IP link Set can0 upZ-turn#./ip-d-s link show can02: Can0: <NOARP,UP,LOWER_UP,ECHO> MTU -Qdisc pfifo_fast State UNKNOWN mode default group default QlenTenLink/can promiscuity0can state ERROR-active (Berr-counter TX0Rx0) Restart-ms0bitrate99999Sample-point0.750TQ2500Prop-seg1Phase-seg11Phase-seg21Sjw1XILINX_CAN:TSEG11.. -Tseg21..8Sjw1..4Brp1.. theBrp-inc1Clock99999999Re-started bus-errors arbit-lost Error-warn error-pass bus-off0          0          0          0          0          0Numtxqueues1Numrxqueues1rx:bytes packets Errors dropped overrun Mcast0          0        0       0       0       0tx:bytes packets errors dropped carrier Collsns0          0        0       0       0       0

Not to be continued ...

Reference documents:

1.http://xilinx.eetrend.com/blog/12062

2.http://www.cnblogs.com/hujianhua/p/8446291.html

Zynq+linux+ramdisk can commissioning

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.