Xenomai provides a RTDM profile for CAN device drivers enabling real-time CAN communication. The driver exposes a real-time interface similar to the standard SocketCAN interface. Xenomai provides several user-space tools to enable simple interface testing. The following sections will provide the information needed to load the CAN driver, configure the interface, and communicate using the command line utilities provided with Xenomai.
Loading the driver
If a Linux driver has already been associated with the CAN interfaces it is required to unload the standard Linux driver or unbind that device for the driver.
If the standard Linux CAN driver is built as a module, the module can just be unloaded using rmmod.
root@somimx6-xenomai:/usr/demo# lsmodModule Size Used by can_raw 6668 0 can 28850 1 can_raw rt_fec 14450 0 rtnet 51349 1 rt_fec fec 37316 0 flexcan 9971 0 can_dev 11309 1 flexcan root@somimx6-xenomai:~# rmmod flexcan