Escolar Documentos
Profissional Documentos
Cultura Documentos
22/01/2013
CAN
CAN Agenda
What is CAN ? Why CAN ? CAN Protocol CAN Higher Layer Protocols CAN Applications AT91 CAN Microcontrollers Roadmap
22/01/2013
CAN
What is CAN ?
The CAN is an ISO standard (ISO 11898) for serial communication Today CAN has gained widespread use: Industrial Automation Automotive, etc. The CAN standard includes: Physical layer Data-link layer Some message types Arbitration rules for bus access Methods for fault detection and fault confinement
22/01/2013
CAN
Why CAN ?
Mature Standard CAN protocol more than 16 years Numerous CAN products and tools on the market Hardware implementation of the protocol Combination of error handling and fault confinement with high transmission speed (up to 1Mb/s) Simple Transmission Medium Twisted pair of wires is the standard, but also just one wire will work Other links works, too: Opto - or radio links Excellent Error Handling CRC error detection mechanism Fault Confinement Built-in feature to prevent faulty node to block system Most used protocol in industrial and automotive world
4
22/01/2013
Protocol - CAN
CAN Protocol
22/01/2013
Protocol - CAN
6. Presentation Layer
CAN Layers
1. Physical Layer
22/01/2013
Protocol - CAN
Controller
CAN Bus is a simple 2-wire differential serial bus CAN Bus is terminated on each side by a 120 Ohm resistor
22/01/2013
7
CAN Bus
TXD
CAN_H
Protocol - CAN
HLP - CAN
22/01/2013
HLP - CAN
HLP Definition
CAN protocol defines only the physical and a low data link layer ! The HLP defines: Start-up behavior Definition of message identifiers for the different nodes Flow control Transportation of messages > 8bytes Definition of contents of Data Frames Status reporting in the system
HLP - CAN
CAN Kingdom
CAN Kingdom is more than a HLP (Meta Protocol): Introduced by KVASER, Sweden A King (system designer) takes the full responsibility of the system The King is represented by the Capital (supervising node)s CAN Kingdom provides simple unique identification of system nodes Applications Machine Automation Advantages Designed for safety critical applications Real time performance Scalability Integration of DeviceNet modules in CAN Kingdom possible
22/01/2013
11
Applications - CAN
CAN Applications
22/01/2013
12
Applications - CAN
22/01/2013
AT91SAM7 - CAN
22/01/2013
14
AT91SAM7 - CAN
22/01/2013
16
22/01/2013
17
Mailbox Organisation
Mailbox x
CAN_MMRx Eight 32-bit registers by mailbox Mailbox x Mode Register Mailbox x Acceptance Mask Register Mailbox x ID Register Mailbox x Family ID Register Mailbox x Status Register Mailbox x Data Low Register Mailbox x Data High Register Mailbox x Control Register CAN_MAMx CAN_MIDx CAN_MFIDx CAN_MSRx CAN_MDLx CAN_MDHx CAN_MCRx
Mailbox Priority
Mailbox Mode Register
PRIOR
16
Reception Modes: In this modes, the mailbox with the lowest number is serviced first. Transmission Modes: Mailbox with the highest priority PRIOR lowest value. When several mailboxes try to transmit a message at the same time, the mailbox with the highest priority is services first. If at least two mailboxes have the same priority (same PRIOR value), the mailbox with the lowest number is serviced first.
22/01/2013
19
22/01/2013
20
CAN
THANK YOU !
22/01/2013
21