Supporting CAN in i.MX RT uClinux BSP

Supporting CAN in i.MX RT uClinux BSP

This is an add-on product that installs on top of the Linux BSP for the NXP i.MX RT EVK board. It must be purchased separately from the Linux BSP product.

1. Overview

This project develops Linux CAN device driver in the Linux BSP for the i.MX RT processor.

2. Requirements

2.1. Detailed Requirements

The following are the requirements for this project:

  1. Provide a Linux demo project combining all the requirements in this project.

  2. Develop Linux CAN device driver for the i.MX RT CAN controller.

  3. Port CANSocket to the Linux i.MX RT BSP.

  4. Validate successful execution of the test suite from the SocketCAN package.

2.2. Detailed Non-Requirements

The following are the non-requirements for this project that may otherwise not be obvious:

  1. None

3. Design

3.1. Detailed Design

3.1.1.
Design: Demo project

This project will enable the required CAN functionality in Linux configuration ("embedded project") called rootfs, which resides in a projects/rootfs directory, relative to the top of the Linux i.MX RT installation.

3.1.2.
Design: Linux CAN Device Driver

The internal i.MX clocks necessary for the CAN interface will be enabled in the kernel. The i.MX RT flexcan interface network driver linux/drivers/net/can/flexcan.c will be enabled, and the respective changes will be added to the kernel .dts file.

The flexcan functionality will be enabled in the Linux kernel configuration as follows:

  • Go to Networking support -> CAN bus subsystem support -> CAN Device Drivers

  • Enable Platform CAN drivers with Netlink support (CONFIG_CAN_DEV) and Support for Freescale FLEXCAN based chips (CONFIG_CAN_FLEXCAN)

3.1.3.
Design: CANSocket

The CAN socket API, described in details in linux/Documentation/networking/can.txt, will be enabled using the Raw CAN Protocol (raw access with CAN-ID filtering) and Broadcast Manager CAN Protocol (with content filtering) configuration options in the Networking support -> CAN bus subsystem support configuration menu.

3.1.4.
Design: CANSocket Test Suite

The can-utils and can-tests packages will be used for verification of the functionality implemented in this project.

3.2. Effect on Related Products

This project makes the following updates in the related products:

  • None

3.3. Changes to User Documentation

This project updates the following user documents:

  • None

3.4. Alternative Design

The following alternative design approaches were considered by this project but then discarded for some reason:

  • None

4. Test Plan

4.1. Secure Download Area

The downloadable materials developed by this project are available from a secure Web page on the Emcraft Systems web site. Specifically, proceed to the following URL to download the software materials:

  • For the i.MX RT1024 BSP (release 3.0.5):

The page is protected as follows:

Login: CONTACT EMCRAFT

Password: CONTACT EMCRAFT

  • For the i.MX RT1024 BSP (release 3.2.0):

The page is protected as follows:

Login: CONTACT EMCRAFT

Password: CONTACT EMCRAFT

  • For the i.MX RT1050 BSP (release 3.0.4):

The page is protected as follows:

Login: CONTACT EMCRAFT

Password: CONTACT EMCRAFT

  • For the i.MX RT1050 BSP (release 3.1.0):