Template:AkDcanDriverArch

= DCAN driver Architecture =

DCAN driver architecture shown in the figure below, is mainly divided into three layers Viz user space, kernel space and hardware.



User Space
CAN utils are used as the application binaries for transfer/receive frames. These utils are very useful for debugging the driver.

Kernel Space
This layer mainly consists of the socketcan interface, network layer and DCAN driver.

Socketcan interface provides a socket interface to user space applications and which builds upon the Linux network layer. DCAN device driver for CAN controller hardware registers itself with the Linux network layer as a network device. So that CAN frames from the controller can be passed up to the network layer and on to the CAN protocol family module and vice-versa.

The protocol family module provides an API for transport protocol modules to register, so that any number of transport protocols can be loaded or unloaded dynamically.

In fact, the can core module alone does not provide any protocol and cannot be used without loading at least one additional protocol module. Multiple sockets can be opened at the same time, on different or the same protocol module and they can listen/send frames on different or the same CAN IDs.

Several sockets listening on the same interface for frames with the same CAN ID are all passed the same received matching CAN frames. An application wishing to communicate using a specific transport protocol, e.g. ISO-TP, just selects that protocol when opening the socket. Then can read and write application data byte streams, without having to deal with CAN-IDs, frames, etc.

Hardware
This layer mainly consisting of DCAN core and DCAN IO pins for packet Transmission or reception.

Files
{| ! S.No ! Location ! Description
 * - style="background: #DDFFDD;"
 * 1
 * drivers/net/can/d_can/d_can.c
 * DCAN driver core file
 * 2
 * drivers/net/can/d_can/d_can_platform.c
 * Platform DCAN bus driver
 * drivers/net/can/d_can/d_can_platform.c
 * Platform DCAN bus driver

Description
This template have DCAN driver architecture details

Parameters
This template takes no parameters

Example
To use this template simply add the following line to your wiki page.

Here's how it will look in your wiki page: