You are on page 1of 6

Scientific Journal of Control Engineering

February 2013, Volume 3 Issue 1, PP.21-26

CAN Bus Extension of the Dynamic Display


Module of a Millimeter Anti-Collision Radar
Liyu Tian#, Chen Zheng, Chenglin Xiu, Fangfang Fan, Jun Zhou
School of Information and Electronics, Beijing Institute of Technology, Beijing 100081, China
#

Email: tianliyu@bit.edu.cn

Abstract
The dynamic display module, an essential part for auto anti-collision radar system, depends on the CAN bus to realize the
communication with the front end of the auto anti-collision radar system as a component of the automotive electronics system. This
article describes an embedded system approach based on ARM11 (with S3C6410 as the main control chip) as the core of hardware
platforms, with Linux operating system as the software platform for the auto anti-collision radar dynamic display module. We expand
the MCP2515 CAN bus-based architecture on the traditional SPI subsystem, and realize the data communications of auto electronic
system in the embedded systems. We also present the specific hardware circuit design and implementation of our embedded system
platform based on Linux.
Keywords: Auto Anti-Collision Radar; Dynamic Display Module; CAN Bus; S3C6410 Embedded Platform

CAN *

100081

CAN ARM11 S3C6410


Linux SPI
MCP2515 CAN
Linux
CAN S3C6410

[1,2]
[3-5]

CAN (Controller Area Network, CAN)


Bosch (ECU)
*

2009A090100024 20103A277

- 21 http://www.sj-ce.org

CAN

CAN
S3C6410 Linux S3C6410

S3C6410 CAN SPI MCP2515 CAN


CAN

CAN CAN
1

1 CAN

SPI CAN

1.1 SPI
1.1.1

SPI

SPI
4 3
2.6.38 Linux SPI SPI
[6][7]
s3c6410 SPI SPI

1.1.2

Linux SPI

Linux SPI SPI SPI


(1) SPI
SPI Linux platform 2.6.38 Linux
SPI SPI
- 22 http://www.sj-ce.org

s3c64xx_device_spi s3c64xx_spi_driver 2.6.38


Linux SPI SPI
SPI
Linux SPI
(2) SPI
S3C6410 SPI
Linux SPI SPI

spi_device SPI SPI


SPI spi_board_info
spi_board_info
spi_board_info
struct spi_board_info {
char

modalias[SPI_NAME_SIZE];

const void
void

*platform_data;

*controller_data;

int

irq;

u32

max_speed_hz;

u16

bus_num;

u16

chip_select;

u8

mode;

};
spi_driver SPI
spi_driver
struct spi_driver {
const struct spi_device_id *id_table;
int

(*probe)(struct spi_device *spi);

int

(*remove)(struct spi_device *spi);

void

(*shutdown)(struct spi_device *spi);

int

(*suspend)(struct spi_device *spi, pm_message_t mesg);

int

(*resume)(struct spi_device *spi);

struct

device_driver driver;

};

1.2

CAN
CAN

CAN
ARM S3C6410 CAN S3C6410 CAN
CAN
PCB SPI
CAN MCP2515 CAN [8]
- 23 http://www.sj-ce.org

MCP2515 Microchip (Controller Area Network, CAN)


CAN V2.0B CAN SPI
MCP2515
(MCU)MCP2515 MCU
SPI MCP2515 2

2 CAN MCP2515

CAN

2.1 CAN
MCP2515 CAN (SPI)

SCK SI MCP2515 MCP2515
SCK SO CS CS
MCP2515 / CS

MCP2515 SPI S3C6410


1 MCP2515 S3C6410 MCP2515 CAN
MCP2515
2 MCP2515 Linux
2.1.1

CAN

CAN MCP2515 S3C6410 3


RXCAN TXCAN CAN SPIMOSISPIMISOSPICLKSPICSINIT
S3C6410 SPI
MCP2515
CAN MCP2515 CAN TxCAN RxCAN
- 24 http://www.sj-ce.org

CAN MCP2551 CAN


[10]

3 CAN MCP2515

4 MCP2551

CAN

2.1.2

1.1 MCP2515 SPI


spi_device spi_driver
Linux SPI MCP2515 spi_device MCP2515
spi_board_info S3C6410 linux [11]
MCP2515 spi_device
static struct spi_board_info spi_board_info[] = {
{
.modalias = "mcp2515",
.platform_data = &mcp251x_info,
.irq = IRQ_EINT13,
.max_speed_hz = 2*1000*1000,
.chip_select = 0,
}
MCP2515 0 SPI
chip_select 0 SPI max_speed_hz irq

MCP2515 spi_driver MCP2515


static struct spi_driver MCP2515_driver = {
.probe = MCP2515_probe,
.remove = MCP2515_probe,
.driver = {
.name = "MCP2515",
- 25 http://www.sj-ce.org

.owner = THIS_MODULE,
},
};
MCP2515_probe() MCP2515 MCP2515_remove()
MCP2515 spi_driver MCP2515 spi_driver
SPI CAN MCP2515
spi_driver_register() spi_driver_unregister
spi

CAN S3C6410 Linux CAN

CAN S3C6410 SPI


CAN MCP2515MCP2515 CAN MCP2515
Linux SPI SPI
MCP2515

REFERENCES
[1] . [J]. , , 2003(10) 170
[2] , [J]. , 2006(9)
[3] . [D]. 2008, :
[4] . [D]. , , 2002
[5] . [D]. , , 2006
[6] . ARM Linux [M]. : , 2008. 210-301
[7] , . XScale Linux[M]. : , 2007: 77-89
[8] MCP2515.pdf-Stand-Alone CAN Controller With SPI Interface, MCP2515 , http://www.alldatasheet.cn/down/
microchip/34.html
[9] . CAN MCP2515-I/SO SPI [J]. , 2009 26
[10] . MCP2515 SPI CAN [J]. , 2010 15
[11] , , . MCP2515 CAN [J]. , PKU, 2005 7

1978-

1988-

2003 3

DSP FPGA

2011

ASIC

2011

Email: tianliyu@bit.edu.cn

Email: mz3721@126.com

- 26 http://www.sj-ce.org

You might also like