450 likes | 465 Views
Explore the development of a fault-tolerant network layer for reconfigurable embedded systems, focusing on the Controller Area Network (CAN) technology. Learn about the implementation of ENDURA design, benefits, and its support for dynamic reconfiguration. This thesis delves into CAN background, applications, hardware overview, and protocols. Discover the challenges and objectives of creating a reliable network driver and how the ENDURA network layer contributes to generic packet routing. Future enhancements and conclusions are also discussed.
E N D
A Controller Area Network Layer for Reconfigurable Embedded System Nithyananda Siva Jeganathan Masters Thesis Defense Department of Electrical and Computer Engineering University of Kentucky Lexington, KY October 3, 2007
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
Thesis Motivation • All safety-critical distributed systems need a reliable network for communication • The embedded network should also be fault-tolerant • Operate with limited services during faults and degrade gracefully in case of failures
Background • Reconfigurable distributed Apps. • Ideal platform for fault-tolerant systems • Faults will always occur • system should detect/isolate faults • Ardea is the reference framework • IDEAnix Framework • ENDURA network layer IDEAnix Framework (cont …)
ARDEA Background Direction Graph • ARDEA Architecture • Framework for dynamic reconfiguration using Direction Graphs (DGs) • Supports Graceful degradation • Relies on Broadcast network for sending data between nodes • IDEAnix Framework • Provides application layer with features for reconfiguration • Handles packet routing between nodes/ modules
Challenge • How to implement a reliable network driver that supports fault-tolerance? • How to make the implementation efficient? • What services to provide to make the network layer generic?
Thesis Objective • Embedded Network Driver for Use on Reconfigurable Architecture (ENDURA) • Network Interface task using Controller Area Network (CAN) • Broadcast type network with dynamic registering or unregistering of messages • ENDURA layer implementation is generic • Designed to match standard API calls • CAN layer can be replaced by any broadcast type network
Embedded Network Overview • Most embedded networks use ISO/OSI layer architecture • Data communication protocol • Node oriented communication • Message oriented communication • Medium Access Control (MAC) • CSMA/ CD • CSMA/ CA
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
CAN Background • CAN standard invented by Bosch GmbH for Automobiles in 1980s • CAN protocol standardized in Data Link layer and MAC layer • ISO standardized the protocols • ISO 11898-1:CAN type A (11 bit Msg Ids) • ISO 11898-2:CAN type B (29 bit Msg Ids) • ISO 11898-3 : Time Triggered CAN (TTCAN) • Maximum Payload of 8 bytes • Maximum Bandwidth 1 MBits/Sec for distance 40 meters
CAN Background • It is widely used in embedded networking • Many standardized Higher level protocols • CANOpen • DeviceNet • CANAerospace • Differential 2-wire signaling • EMI resistant • Fault detection/ Isolation techniques included
CAN Applications Overview • Small Vehicle Applications • Light Electric Vehicles (LEVs) • Marine Applications • SeaCAN architecture • NAUTILE • Space Applications • SMART-1 satellite of ESA • SOPIA • Galileo Projects
CAN Hardware • Variety of CAN hardware available in market • CAN Controllers • CAN transceivers • CAN cables • CAN Repeaters • CAN Connectors • There are at least 50 known manufacturers of CAN hardware
CAN Hardware • CAN Physical layer • ISO 11892- 2 two-wired balanced signaling • ISO 11893- 3 (two-wired) for lower speeds. • Fault tolerant • even if 1 wire is shorted to ground or cut can communicate • There is a single wire (plus ground) standard SAE j2411 for cars • Different Physical Layers as a rule, cannot interoperate • No. of Transceivers are available to make them work (sometimes)
CAN Hardware • CAN Transceivers • Used as an interface between CAN Bus and Controllers • Provides differential Tx capability to bus and differential Rx capability to CAN Controllers • CAN Cables • 9 pin D-sub (most common) • CAN Adaptors • Repeaters • Allow physical coupling of two or more segments of CAN Bus • Bridges • Networks different bit rates and protocols • Gateways • Enables access to other Communication networks • CANlinkII, Can@Net, CANmodem/CANOpen
CAN Controllers • CAN Protocol Controllers • Responsible for the protocol adherence of the bus • Responsible for Tx/Rx of Messages and RTRs • The number of Message objects available varies for manufacturers • Some companies: Bosch, Intel, Infineon • Bosch’s C_CAN processors are widely used • At least 30 known manufacturers of CAN controllers
Microcontrollers with CAN • Microcontrollers with CAN capabilities are the reason for widespread use of CAN • Some of the well known manufacturers • Silicon Laboratories (C_CAN chip) • Fujitsu Semiconductors (C_CAN chip) • OKI Semiconductors (C_CAN chip) • Intel Technologies (82527 chip) • Infineon Technologies
Silicon Laboratories • Implements CAN protocol using Bosch’s C_CAN protocol controller chip • 8051 based 8-bit Microcontroller • Has 32 Message Objects that can be configured for Rx/Tx • Supports speed upto 1 Mb/s • 9 pin D-sub connectors are used
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
CAN Protocol Overview • CAN is broadcast type network • All nodes receive all the messages • Message filtering option on processors • CAN bus is Wired-AND logic • Dominant bit is 0V & Recessive bit is +5V • If one node is transmitting 0, then the network is in that state (All other processors transmit a 1) • Acceptance Filtering is key to message Rx • Based on Message identifiers • Tx on network in Big-Endian format
CAN Protocol Overview • CAN bit-timing uses NRZ encoding • Neither CSMA/CD or CA is used in synchronization of bus • Bit-timing is crucial to synchronized packet transfer
CAN Packet Formats • CAN Data Frame • Normal packet transfer • 8 byte payload • CAN Remote Frame • Remote Request/ Response • Similar to ICMP messages • CAN Error Frame • CAN Overload Frame
ENDURA Design Details • The ENDURA layer is a generic network implementation for Reconfigurable architecture • ENDURA layer for CAN is modularized as: • Initialization module • Register module • Unregister module • Send Packet module • Receive Packet module • Translation module • Interrupt service routine module
ENDURA Module Details • Initialization module • Sets up Bit-timing register and BRP registers • Initializes CAN engine • Register module • Registers for a msg Id with Msg Obj • Only registered packets will be received • Also have option of Rx-ing all packets • Unregister module • Dynamically disassociate a node from receiving packets • Converse of Register module
ENDURA Module Details • Send Packet module • Sends packet with given message identifier • packets of Type A (11-bit) or Type B (29 bit) • Variable payload from 0 – 8 bytes can be sent • Receive Packet module • Works in conjunction with Register module • Messages stored in Msg. Object after acceptance filtering • Either sent to higher layers through Queue or Stored in Software Buffers
ENDURA Module Details • Interrupt Service Routine module • Services the RX_OK interrupt from CAN controller • Identifies the Msg. Obj. with new data • Stores in Software buffer • Translation Module • Translates a CAN 2.0A type to CAN 2.0B type • Translates a CAN 2.0B type to CAN 2.0A type • Care not to disturb CAN 2.0A type Msg. Ids
ENDURA Validation • ENDURA layer subjected to following tests: • CAN Conformance test • Performance Tests • Bandwidth Tests • Latency Tests • Endurance Tests • Sporadic packet Tests
ENDURA Performance Data • CAN Conformance test • All modules met the CAN protocol conformance • Performance Tests • Performance Tests • Endurance Test • No dropped packets at 10ms delay in packets • Pkts sent = 14,406,543 Pkts dropped = 0 • Sporadic Packet Tests • No packets dropped till packet rate of 10ms • Packets sent at 1000ms, 500ms, 100ms, 50ms, 10ms rate
ENDURA Performance Data • Performance Tests • Bandwidth Tests • Maximum Bandwidth measured with IDEAnix = 100 KBPS • Bottleneck due to OS context switching time • Latency in sending a packet through the CAN controller • Latency Tests • RX packet latency in ENDURA layer = 110 μSecs • RX packet latency in CAN application = 856 μSecs • TX packet latency in ENDURA layer = 924 μSecs • TX packet latency in CAN application = 9 mSeconds • Time taken by C_CAN processor to TX a pkt = 110 μSecs • Max Bandwidth that can be realized = 120 KBits/Sec
Bandwidth Test Data Packet Rate Vs Packets Rxd Packet Rate Vs Packets Drpd
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
Outline • Thesis Motivation and background • Objective and Problem statement • Embedded Network background • CAN Background • CAN Applications • CAN Hardware Overview • CAN Protocol Overview • ENDURA design • ENDURA Validation • Future enhancements • ENDURA Benefits • Conclusion
Future Enhancement • CAN Bandwidth can be improved • By improving the OS Time Tick from 10 ms • By varying the No. of OS ticks per sec from 100 • CAN Send Packet Latency can be improved • By routing the inter-module packets through the ENDURA layer instead of IDEAnix • This improves latency by 10 times • Implement CAN Gateway nodes capable of communicating to other embedded networks • CAN to Wireless Network gateway (for extending CAN network) • For forming Ad-hoc networks
ENDURA Benefits • Modularity of Reconfigurable architectures • Reusability of modules and dynamic addition of functionalities • Reduction of system complexity • Modules can be developed independently • Modules can be tested independently and integrated • Reduction in System design errors
Conclusion • Provides a fault-tolerant platform for communication between nodes • Generic implementation that can be swapped with other network implementations • Provides an infrastructure for reconfigurable architecture to perform dynamic reconfiguration • Realization of soft real-time distributed system made possible