Apply the CAN patches to the linux source code: 0002-mvf-fixed-flexcan-driver-and-added-support-for-flexc.patch and 0003-pcm052-added-flexcan-support-for-the-phyCORE-Vybrid.patch
Rebuild the kernel:
- Root filesystem
The root filesystem must include iproute2 and can-utils. Use the menuconfig command in the Timesys Factory to select them:
Build these packages:
Test the CAN Interface:
We recommend using PCAN-USB and PCAN-View Software to test the CAN interface.
Download the device driver for PCAN-USB here: http://www.peak-system.com/PCAN-USB.199.0.html?&L=1
Open PCAN-View, install from here: http://www.peak-system.com/PCAN-View.242.0.html?&L=1 (set to 1Mbit/s)
- Open PCAN view on your host computer and configure the bitrate. In this example it is set to 1Mbit/s.
Setup the CAN interface on the Vybrid, from the Linux target console run:
Make sure that the bitrate set here matches the one set on your host computer in PCAN-View.
Transmit a message to the host computer. Type the following from the target console:
You should see the following in the 'Receive' section of PCAN-View:
Receive a message from the host computer. Type the following from the target console:
On PCAN-View 'Transmit':
Right Click -> New Message
Create a message
Double Click the message in the 'Transmit' window
When running candump - should see the message in target console
CAN Not Working?
See this message: "ip: either "dev" is duplicate, or "type" is garbage"
Solution: Run "which ip", if it states "/bin/ip" - make sure you are using the correct filesystem (iproute2) -- should result in "/sbin/ip"