echo '' ;

Embedded Protocol – CAN

CAN, short for Controller Area Network, was developed by Robert Bosch. This protocol facilitates half-duplex communication. In active voice, it would be: “It operates as a multi-master protocol, allowing it to connect multiple nodes.” This protocol utilizes a two-wire configuration, consisting of CAN H (H-High) and CAN L (L-Low). In active voice, it would be: This two-wire bus interconnects all nodes within the network. The wires typically constitute a twisted pair with a nominal impedance of 120 Ω. CAN supports communication over relatively short distances, typically up to 40 meters at speeds of 1 Mbps

Protocol Frame Format

SOF11-BitIdentifierRTRIDEr0DLC0…8 bytesCRCACKEOFIFS

AcronymDescription
SOFStart Of Frame
11 Bit IdentifierEstablishes message priority; lower binary value indicates higher priority
RTRRemote Transmission Request
IDEIdentifier Extension
r0Reserved Bit
DLCData Length Code
0…8 BytesData Bytes
CRCCyclic Redundancy Check
ACKAcknowledgement
EOFEnd Of Frame
IFS7-Bit Interframe Space

Analyzer by Microchip 

Get Start

  1. Connect CAN_H, CAN_L, and Ground to the Microchip CAN Analyzer Hardware along with the testing hardware (Microcontroller).
  2. Open the Windows tool and navigate to Microchip CAN BUS Analyzer.
  3. Ensure that Normal Mode and Error Normal display a green background.
  4. Proceed to Setup Hard > Hardware Setup > Set CAN bit-rate control.
  5. Configure Logfile setup if you intend to log the CAN data.
  6. Click Rolling Trace to initiate the monitoring process.
  7. You can now observe the captured data within the tool interface.


USB to CAN Bus Adapter by VSCOM


Troubleshoot

If you’re not getting any data or can’t see any data in the tool?

TaskDescription
Check hardware connectionsEnsure all hardware connections are properly connected.
Verify CAN driver settingsConfirm that all CAN drivers are enabled.
Configure Interrupts using HALCoGen toolEnsure Interrupts are correctly configured in the HALCoGen tool for the TMS570LC4357 Controller.

Applications

ApplicationDescription
Automotive IndustryExtensively used for communication between electronic control units (ECUs) in vehicles, enabling functions like engine management, diagnostics, and ADAS.
Industrial AutomationEmployed in factory automation systems for communication between PLCs, sensors, actuators, and other devices, facilitating manufacturing processes.
Medical DevicesUtilized in medical equipment for communication between devices such as patient monitors, infusion pumps, and diagnostic equipment.
Aerospace and DefenseUsed for communication between avionics, navigation systems, flight control systems, and other electronics in aircraft, spacecraft, and military vehicles.
Marine and MaritimeEmployed in marine applications for communication between navigation systems, propulsion systems, and monitoring equipment on boats and ships.
Home AutomationIncreasingly used for communication between smart devices, home appliances, security systems, and environmental controls in residential settings.
Electric VehiclesIntegral to the communication network in electric and hybrid vehicles, enabling coordination between powertrain components and battery management systems.
Rail TransportationUtilized for communication between train control systems, signaling systems, passenger information systems, and onboard electronics in railway operations.

Advantage and Disadvantage

AdvantagesDisadvantages
High reliability and fault toleranceHigher cost compared to some other protocols
Real-time capability, suitable for time-critical applicationsRequires termination resistors and careful network design
Support for multi-master communicationLimited maximum cable length without additional hardware
Flexible data rates and message prioritizationMore complex implementation compared to simpler protocols
Built-in error detection and handling mechanismsPotential electromagnetic interference in noisy environments
Wide industry adoption and supportLimited support for longer-distance communication without additional hardware

CAN Interview Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from ArunEworld

Subscribe now to keep reading and get access to the full archive.

Continue reading