C 164 CI CANInterface C 166 Core Data
- Slides: 22
C 164 CI - CAN-Interface C 166 -Core Data (C 164 CI-8 RM) or OTP CPU Instr. /Data 32 Data 16 Dual Port 64 K ROM 16 RAM 2 KByte (C 164 CI-8 EM) PLL-Oscillator prog. Multiplier: Watchdog 0. 5; 1; 1. 5; 2; 2. 5; 3; 4; 5 Interrupt Controller RTC 13 ext. IR 16 Interrupt Bus Peripheral Data 16 Port 4 10 -Bit USART Sync. GPT 1 CAPCOM 2 CAPCOM 6 Unit for PWM Generation Channel ADC T 2 (SPI) 8 -Channels ASC SSC T 3 BRG T 4 Port 3 Port 5 Timer 13 8/16 bit MUX only & XBUS Control Timer 8 External Bus Timer 7 16 XBUS (16 -bit NON MUX Data / Addresses) P 4. 6/ CAN Tx. D Full-CAN Interface V 2. 0 B active Port 0 P 4. 5/ CAN Rx. D PEC External Instr. /Data 1 Comp. Channel Port 8 3/6 CAPCOM Channels Port 1 6 8 12. 08. 2013 D 9 Embedded Systems 4 16 Page 1
Controller Area Network - CAN • CAN is a protocol for serial communication that supplies distributed realtime tasks with very high safety-requirements • • CAN is standardized ISO-DIS 11898 – ISO-DIS 11519 -2 23. 9. 2009 D (high speed applications) (low speed applications) Embedded Systems Seite 2
CAN - features • Low costs – Serial BUS for 2 -wire-lines – High number of CAN-nodes in the automotive sector and in industrial electronics • Reliability/Data Integrity – Sophisticated mechanisms for error detection and handling result in high reliability of the transmission Example: • 500 kbit/s, 25% bus-load, 2000 operating hours a year Result: Only one undetected error in 1000 years! – Defective messages are detected and repeated – Every bus-node will be informed in case of an error – Low susceptibility against electromagnetic interference • Flexibility – Nodes can be very easily added or removed (plug & play). – The number of nodes isn’t limited by the protocol 12. 08. 2013 D Embedded Systems Page 3
CAN - Features • High performance realtime-behaviour – Short messages: 0 to 8 bytes data per message. – Short time of latency between the request of a message and the start of the transmission – Prioritization of messages (Arbitration on Message Priority - AMP) – Multi Master protocol with CSMA/CD • High performance transmission rate – maximum transfer rate is 1 MBit/s at 40 m bus-length and still about 40 k. Bit/s at bus-length of 1000 m • Multi-Master-Operations – Every node can be the master – The bus-communication is not prevented by defective nodes – Defective nodes switch off from the bus by themselves • Flexible addressing mechanisms – Messages can be sent to only one or to several nodes – All modes receive simultaneously public data simultaneously 12. 08. 2013 D Embedded Systems Page 4
CAN: Typical application 12. 08. 2012 D Embedded Systems Page 5
Protocol layers of the CAN Process-Application Layer 7 1 Application Layer Data Link Layer Physical Layer 12. 08. 2013 Logical Link Control Error detection, error handling; Control of data-flow; Acceptance filtering. Medium Access Control Bit-Stuffing, Framing, Arbitration Physical Signalling (Bit –coding, -timing, -synchron. ) Physical Medium Attachment (Transmitter/Receiver-Spec. ) Medium Dependent Interface (Cable, Plug. . . ) D Management 2 CAL, CANopen (Ci. A) Device. Net SDS (Honeywell) etc. . . Embedded Systems CAN (ISO 11898) Bosch Page 6
Higher Protocol Layers • CAN Application Layer (CAL) – Layer-7 Standard defined by “CAN in Automation” (Ci. A) – Network-Management for initialisation, monitoring and configuration of nodes in standardised form – Takes into account all aspects for the realisation of open communication via CAN (provides the cooperation of producer specific systems) – Available implementations of CAL simplify the user getting sophisticated “Controller Area Networks” • CANopen – Applications are based on CAL. – CANopen dertermines the mode of communication, an applicationprofile defines the meaning of certain messages) for the considered application – aim: Changeabilty of the subsystems of dedicated applications • Further higher protocol layers (standards): – Automotive-sector: VOLCANO, OSEK – Industrial Automation: Device. Net (ODVA), SDS (Honeywell) 12. 08. 2013 D Embedded Systems Page 7
CAN Protocol Layers Process-Application Layer 7 1 Application Layer Data Link Layer Physical Layer 12. 08. 2012 Medium Access Control Bit-Stuffing, Framing, Arbitration Logical Link Control Error detection, error handling; Control of data-flow; Acceptance filtering. Physical Signalling (Bit –coding, -timing, -synchron. ) Physical Medium Attachment (Transmitter/Receiver-Spec. ) Medium Dependent Interface (Cable, Plug. . . ) D Management 2 CAL, CANopen (Ci. A) Device. Net SDS (Honeywell) etc. . . Embedded Systems CAN (ISO 11898) Bosch Page 8
Basic Characteristics of CAN • Asynchronous serial bus with linear bus-structure and identical nodes (Multi-Master-BUS) • Nodes won’t be addressed - the addresses are parts of the message and are related to those, just as the priority is a characteristic of the message • Two bus-states: dominant and recessive – the bus-activation is realized according to the "Wired-AND”mechanism: dominant bits (logical 0) overwrite recessive bits (logical 1) • Bus-access via CSMA/CD with NDA (Carrier Sense Multiple Access/ Collision Detection with Non-Destructive Arbitration): – Before transmission it is tested whether the bus is free – Each sender tests whether the bus level is consistent to its transmission level – In case of discrepancy transmission is stopped and switched to receiving mode 12. 08. 2013 D Embedded Systems Page 9
Basic Characteristics of CAN recessive NODE A dominant recessive NODE B dominant bus idle recessive CAN BUS dominant Node B transmits recessive level but reads back dominant level 12. 08. 2013 D Node B loses arbitration and switches to receive mode Embedded Systems Page 10
Typical Structure of CAN-Nodes Node A Node B z. B. ABS z. B. EMS Host-Controller z. B. 80 C 166 z. B. C 164 CR oder C 515 C CAN-Controller z. B. SAE 81 C 90 Application CAN (further nodes) CAN-Transceiver CAN_H CAN-BUS UDiff CAN_L 12. 08. 2013 D Embedded Systems Page 11
CAN data frames • There are two situations in communication: – One node is transmitting (’talker’), all other nodes are receiving (’listener’) – Nodes A requires (from an other node) anything and gets the answer • In ’Talk’-mode CAN-nodes use data frames – data frames consist of: • an identifier • the data, which should be transmitted • and a CRC-checksum Identifier Data Field (0. . 8 Bytes) CRC-Field – The Identifier specifies the content of the message (‘car velocity’ , ‘oil temperature’, etc. ) and the priority of the message – The data field contains the appropriate value (’ 36 m/s’, ’ 110°C’, etc. ). – The Cyclic Redundancy Check provides detection of transmission errors – All nodes receive the data frames, unaffected nodes ignore it Base Can Frame 12. 08. 2013 D Embedded Systems Page 12
CAN Remote Frames • In order to get information “Remote Frames” are used – A Remote Frame consists of the identifier and the CRC-checksum, no data are contained Identifier CRC-Field – The identifier refers to the information to be queried (’car velocity ', ’oil temperature', etc. ) and the priority of the message – Every node having available the required information (e. g. the sensor for the oil temperature) reacts with transmission of the appropriate ‘Data Frame’ (same identifier, the data field contains the required information). How hot is the oil ? Remote Frame; Identifier ’Oil_temp' Node A 115 °C ! Node B (oil temp. Sensor) ~~~~~ 115°C Data Frame; Identifier ’Oil_temp'; Contains required information 12. 08. 2013 D Embedded Systems Page 13
Standard CAN / Extended CAN • CAN Version 2. 0 A - Standard CAN: – The Standard-Frame contains an 11 Bit identifier – With that 211 (=2048) different “messages” can be addressed • CAN Version 2. 0 B (active) - Extended CAN: – The “Extended Frame” has got an identifier with a length of 29 Bit – Via that more than 536 Million (229) different “messages” can be addressed • CAN Version 2. 0 B (passive) : – Some Standard-CAN-Nodes are not able to receive “Extended Frames”, but they are tolerating them and ignore their “messages”. They don’t receive any data, as they don’t produce any errors. – These CAN-Nodes use CAN Version 2. 0 A, but they are also denoted as nodes Version 2. 0 B passive – They are used in networks, in which “Standard Frames” as well as “Extended Frames” are worked with 12. 08. 2013 D Embedded Systems Page 14
CAN-Contoller • Infineon C 164 CI: V 2. 0 B active • CAN-Controllers perform the management of the messages and its acceptance filtering autonomously: Full-CAN-Controller: – There a lot of Message-Objects with its appropriate identifier. – Only if a message with one of the specified identifiers is received, it will be saved and the execution of the program will be interrupted – In that way the load of the CPU can be kept low Message Object 1 Acceptance Filtering CAN Bus Message Object 2 . . Message Management Message Object n Full-CAN Controller 12. 08. 2013 D Embedded Systems low high CPU load Host CPU page 15
Characteristics of the C 164 CI CAN-Module • The characteristics are comparable with the common CAN-Controller AN 82527 • All requirements of “CAN spec. V 2. 0 B active” are met (Standard- und Extended-CAN) • Maximum CAN-transfer rate of 1 MBit/s • Full CAN Device: – 15 Message-Objects with appropriate identifiers and appropriate state- und control-Bits – Each Message-Object can be defined as transmit - or receive-object. 12. 08. 2013 D Embedded Systems page 16
Characteristics of the C 164 CI CAN-Module • Programmable mask-register for acceptance-Filtering – Global mask for incoming messages (Full-CAN-Objects) – Additional mask for message-object 15 (Basic -CAN-) Characteristic • Basis-CAN- Characteristic (of Message-Object 15) – Two receiver buffers – Separate global mask-register for acceptance-filtering • Connection to CPU (C 166 -Core) – The module is connected via the chip-internal XBUS (16 -Bit BUS-Width) – Interrupts directly to the CPU with all facilities of the interrupt handling • To connect with the CAN-BUS only physical level conversion via a Standard-CAN-Transceiver is needed 12. 08. 2013 D Embedded Systems page 17
Connection of the C 164 CI to the CAN-BUS C 164 CI Pa. b Connection to the application CAN-Bus Transceiver P 4. 5 CAN_Rx. D CAN_L CAN_H Receive CAN_H P 4. 6 CAN_Tx. D Transmit CAN_L Pc. d (Standby) z. B. P 8. 0 R(opt) • The CAN-Module uses 2 pins of Port 4 as interface to a BUSTransceiver (P 4. 5 - CAN_Rx. D, P 4. 6 - CAN_Tx. D). 12. 08. 2013 D Embedded Systems page 18
ACCEPTANCE FILTERING Global Mask (Part of General Registers) 1 1 1 1 0 Arbitration Register (LAR, Teil des Message Object) 1 0 0 1 0 1 1 1 Resultant valid Identifier "d" = don't care 1 0 0 1 d 1 1 d a) 1 0 0 1 0 1 1 1 b) 1 0 0 1 0 1 1 0 c) 1 0 0 1 1 0 d) 1 0 0 1 1 1 Because of the "don't care"Bits also messages with identifiers b). . d) are acceppted 12. . 08. 2013 D CAN CONTROLLER CAN MESSAGES Remark: If ‘data frames‘ from more than one Message Object are accepted, so the data frame is stored in the object with the lowest number. If ‘remote frames‘ from more than one Message Object are accepted, so the data of the Object with the lowest number are transmitted Embedded Systems page 19
Bit-Timing Duration of a Bit Sync. Segm. TSeg 1 TSeg 2 Sync. Segm. 1 Zeiteinheit Sample. Time • Transmission Time The Bit-Timing is derived from the system clock f. PERIPHERAL and is programmable up to the data rate of 1 MBaud (@ f CPU 16 MHz) SFRcan 12. 08. 2013 D Embedded Systems page 20
Register of the CAN-Controller SFRcan 12. 08. 2013 D Embedded Systems page 21
Message Object SFRcan CAN-SW 12. 08. 2012 D Embedded Systems page 22
- Cecati 166
- Opwekking 627
- Fas 167
- Soneto clxvi
- Zanjir metodi
- Nom-166-semarnat-2014
- Krs 164
- Kj 164
- Cs 164
- International phone number format
- Calcula a
- Art. 164 cp
- Psms164
- Ordre ens/164/2016
- Yajurveda chapter 40 verse 9 in hindi
- Concurrent validity example
- Inner core and outer core
- What is the crust
- What are the 3 main layers of the earth? *
- Core rigidity
- Enterpriselibrary.data.net core example
- Core data integration
- Uscdi