Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] busoff issuues in can communication

Status
Not open for further replies.

debabrta kar

Member level 5
Member level 5
Joined
May 20, 2013
Messages
86
Helped
7
Reputation
16
Reaction score
5
Trophy points
1,288
Location
india
Visit site
Activity points
1,858
i am doing can protocol using at89s8252 mcu, ,mcp2515 and pca82c250....i have a doubt regarding bus-off condition in can...actually when a node goes bus off then how it get recoverd...please suggest here..thank you
 

hello again...

in CAN controller there is two kinda count which continously counts errors. They are Transmit error count and Receiver error count.
and node is normally in one of three state. and these states are
1.active error state
2.passsive error state
3.Buss off state
when count of TEC or REC are less than 127 then bus is in Active error state
when count of TEC or REC are higher than 127 then bus is in Passive error state
when count of TEC higher than 255 then bus is in Buss off state

- - - Updated - - -

Buss remain in Bus off state untill reset is not done. and after reset it goes out of bus off state.

In Bus Off State the given node is not allowed to Transmit or Receive any more FRAMES onto the Bus until the reason behind the excessive error generation has been identified and rectified
 
yes sir actually i am asking about the reset part....how the node will get reset .....i read from document that node will get reset after monitoring about 128*11 recessive bits ...but got confused in that part that who will send those bit and how ...please guide me thank you
 

Yes this will monitor the bus if bus is ideal for that much time. That is 128x11 recessive bit on bus.
And for that conditions bus should be ideal bcoz if any node start tx of any kinda of frame then this condition will not satisfied.
 
so if after a node goes to bus off if another node will start its transmission and bus remains busy and never goes to ideal state then that bus-off node will never come back to its original position....i think it is a big problem then in such case that node will never able to rejoin to the bus......please explain your answer sir..how it happens...and please also answer me is it the responsibility of the host mcu to keep the bus ideal by generating a delay of 128*11bit time....please guide me thank you
 

What CAN controller are you using? Not all CAN controller internals are exactly the same, though they tend to be very similar. Most of the ones I've used (discrete/external to MCU and embedded in MCU) can either by reset by an input reset signal, or, as in a number of embedded controllers in ARM chips, the BusOff error sets the RM (Reset Module) bit in the CAN MOde register for the CAn controller, which essentially disables it from transmitting or receiving anything. Your software can clear the RM bit, in which the CAN TX Counter counts down from 128 for each successive 11-bit long bus free condition it sees and then clears the BusOff status and tries to resume operation, or your software can write a '0' directly the the TXError register, which will clear the Busoff condition in only one 11-bit long bus free interval. The controller can then try to send messages again, and if the problem persists, you'll get another Busoff fault.
Your software should be able to handle and recover busoff fault conditions (and report them as your application requires) as a normal part of handling the possible communications faults on CAN bus.
 
yes as ftsolutions said there are such commands to reset can controller and as u r using controller MCP2515 have spi command 0xc0 to reset CAN controller so by reseting this u will get out off bus off condition.
 
dear ftsolutions sir, i am using can controller mcp2515 with at89s8252 mcu.....if i will not reset by sending comand from my mcu then is it possible that any bus-off node will automatically come out from its busoff state to original state by monitoring 128*11 recessive bits...if yes then please explain how it happens...thank you
 

Reading the DATA SHEET for the MCP2515 it shows in sections 6.7 on page 47 that "the MCP2515, after going bus-off will recover from a bus off condition to error active condition without any intervention by the MCU if the bus remains idle for 128 x 11 bit times. If this is not desired, the error interrupt service routine should address this."
**broken link removed**

This type of behavior is not the usual case for many CAN controllers, as a busoff condition is an error/fault condition, and so it is expected that some software action / intervention is desired so that the problem is announced, logged, recorded, or reported somehow for diagnostic purposes - someone may have to fix a wiring problem to restore the functionality. If the controller just resets itself automatically how would you know that something was wrong and that it couldn't communicate on the CAN bus? In some cases one does want the node to automatically recover and keep trying - so it can easily be done based on the software design for the particular application. But, with this particular controller you are using, the self-recovering functionality is built in, and if the user DOESN'T want it to recover that way, they have to write their software to explicitly prevent it. Sort of approaching things from a different angle. Perhaps the vendor decided for the use of this part, and with the I2C interface, that it would be more convenient for it to self-reset.

READ THE DATASHEETS for the part you are using. This is a case where a vendor has made their part operate differently from many other vendors, and so a universal answer isn't accurate.
 
Last edited:
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top