Questions tagged [can-bus]

Controller Area Network (CAN) bus is a networking technology typically used in cars and other vehicles. It supports deterministic priority arbitration with multiple transmitting nodes.

The CAN bus is a serial bus that allows multiple masters and uses a broadcast model. A message start with an ID, can contain up to eight data bytes (64 data bytes for CAN FD) and uses non-return-to-zero encoding. Each node can receive, but only one can send at each point in time. It uses CSMA/CA algorithm for bus access. The lower the (numerical) ID, the higher the priority. Short networks (below 40 m) can achieve bit rates up to 1 Mbit/s.

A distinguishing feature of CAN is that when two nodes with different message identifiers attempt to transmit at the same time, there are no collisions (CSMA/CA). The higher priority message will go through without any need for the sender to re-transmit it. This ensures that a CAN system can never get into a live lock state in which two nodes would continually re-send the same two messages, and continually collide with each other.

A newer version/generation called CAN FD was recently developed. It supports higher clocking of the data portion of the message, allowing up to 64 bytes of payload.

Tag usage:

  • Use this tag for all questions related to CAN or CAN FD software/firmware: drivers, controllers, communication, frames etc. Please note that hardware questions are off-topic and should be asked at https://electronics.stackexchange.com instead.
  • It is recommended to combine the tag with , to draw more attention to the question from the right kind of people.
  • If you are using a particular programming language (say, ), you should add that tag as well.
  • If the question is about higher layer protocols such as CANopen, J1939 or DeviceNet, the tag should be combined with the applicable higher layer protocol tag.

Links:

1162 questions
0
votes
1 answer

CAN Protocol stacks for linux

Can anybody suggest me the list of CAN Protocol stacks for linux?? I am using freescale imx286 processor which supports CAN Bus and I am using Flex CAN driver. On top of this i have to use one CAN protocal stack like CANOpen.
0
votes
0 answers

iOS , OBD2 dongle , BLE

I'm developing an iOS app for OBD2 dongle using BLE, but i have trouble sending commands to the dongle (for instance the command 'O' opens communication channel between obd2 and my iOS app), could anyone help me with this ?
Skander Fathallah
  • 503
  • 1
  • 5
  • 10
0
votes
1 answer

Output of awk to variable is blank, but print is not

Lets say I have a directory that has the following files: thing_one thing_two thing_three I want to get an array of the second field if each file name is split on the underscore in csh. I have to use csh. Ex. one two three. I get the correct…
0
votes
2 answers

MCP25625 doesnt send CAN messages

Im using MCP25625 which is MCP2515+integrated MCP2551 and trying to send messages in a loop. For some reson I dont see any signal at all on CANH, CANL lines. SPI communication works correctly I use software reset procedure There is clear 20Mhz…
0
votes
1 answer

MCP2515 & ATMEGA328 SPI peculiarity

I am facing a CAN bus communication problem to which I don't know the reason. I have MCP2515 as a SPI->CAN interface connected to the MCP2551 (in the past) and now the TI's HVD256. Currently, the components are connected as depicted in the schema.…
Blume
  • 1
  • 1
0
votes
2 answers

Bus arbitration on CAN bus

Hello I have a question concerning communication/arbitration on a CAN bus. Say more than one masters on the CAN bus want to send simultaneously which means that the one with the lowest message identifier will win arbitration in the end and starts…
FloHe
  • 313
  • 1
  • 3
  • 10
0
votes
1 answer

Tool chain for proprietary communication protocol

I (the company rather) have a protocol implementation which uses the CAN hardware (CAN Transceiver). The protocol itself is not a standard CAN protocol stack. Is it possible to use any of the off the shelf CAN-bus monitors for debugging and…
0
votes
1 answer

How NVIC function working NVIC_EnableIRQ(CAN1_RX0_IRQn);

so my friend asked me to write my own implementation for above function NVIC_Enable_IRQ(CAN1_RX0_IRQn); to enable can reception interrupt. initially i thought its impossible to right such implementation .. could anybody please explain me like the…
naumaan
  • 55
  • 11
0
votes
1 answer

Is Extended Signal Multiplexing supported by Autosar 4.0?

in CAN netwotrks for Autosar 4.0 complient SW. can Extended Signal Multiplexingbe supported?
Isyola
  • 130
  • 1
  • 8
0
votes
2 answers

Why pointer of type CAN_TypeDef is being used in following code?

I am trying to understand the code, my worry is why in below code "CAN_TypeDef" is being used, can I simply use pointer of type integer,what will be the adverse consequences of integer pointer ? The below code belongs to CAN(controller area network)…
naumaan
  • 55
  • 11
0
votes
1 answer

LIN Protocol Transceiver Behaviour during the GotoSleep Command

I am using LIN Protocol for Parking Brake functionality. baud rate : 10.4Kbps 1) I am sending the go to sleep command in $3C frame, after 50ms sending 0v to NSLP to put LIN Transceiver into sleep Mode but it is taking 9s for INHIBIT pin to go low …
0
votes
1 answer

MCP2515 Baudrate Issue

I have to fight that problem for a long time now. There are 2 MCP2515 CAN Interface Chips connected to each other. The one is controlled by Arduino, the other one by STM32 board. Scheme: (-> := send) Arduino->MCP2515->MCP2515->STM32 If I set the…
ionman
  • 51
  • 2
  • 10
0
votes
1 answer

Detection of dominant bit during Intermission on CAN bus

Hi i just start reading CAN protocol and i just stuck here with these. On CAN bus overload frame comes only with 2 conditions when internally receiver is not good enough to take next frame when dominant bit detected during INTERMISSION. SO at…
0
votes
3 answers

CAPL Scripting - CAN C communication (Stop transmitting one message from DBC)

I am working on a CAPL script that has to allow all messages to transmit on a CAN C channel and stop transmitting one particular message from the database file. Can anyone help with the method/function/code I can use?
Nandita
  • 3
  • 1
  • 3
0
votes
0 answers

Send CAN Message

I'm trying to use my smartphone to move my cars windows up and down. I recorded the CAN traffic two times by using AT MA. First time I just turned the ignition on. The second time I pushed the buttons for the electric windows. I guess the PIDs for…
stefan
  • 1,336
  • 3
  • 21
  • 46