Hi, my interpretation of ISO 11898-1 is that it is indeed allowed to recover from bus off to error-active after 128*11 recessive bits AND "user request", where "user request" is SW or HW request. So the HW (CAN controller) is allowed to implement auto recovery feature (may even make auto recovery to the permanent and the only behavior).
>From the CAN point of view the bus off is a protection mechanism, the CAN controller goes to bus off because something is seriously wrong with itself, wires or other nodes. So it is very often not really good idea to make automatic recovery which is with other words simply ignoring that serious problems (well, the reception of 128*11 recessive bits is a good sign that the problem has gone, but still..). The application may want the CAN controller to signal the bus off and stay off the bus until the application decides to recover the communication. So if the CAN controller only supports auto recovery and cannot keep hands off from the bus, the option for the manual recovery in the socket CAN driver is to reset CAN controller in the bus off interrupt (I remember this was proposes by Sebastian, and I agree on this). Regards, Vladislav -----Original Message----- From: Wolfgang Grandegger [mailto:[email protected]] Sent: Thursday, September 03, 2009 2:50 PM To: Marc Kleine-Budde Cc: [email protected]; Heinz-Jürgen Oertel; Uwe Koppe; Gribov, Vladislav Subject: Re: at91_can bus off handling Marc Kleine-Budde wrote: > Marc Kleine-Budde wrote: >>> IIRC, the reaction on bus-off is configurable and auto-recovery is >>> disabled. Unlike the MPC5200, the MPC512x now also has a similar >>> configuration bit. There was some discussion recently on how to handle >>> chips with automatic bus-off recovery. >> Which thread do you mean? The at91 data sheet says it comes back from >> bus off after that 128-bit thing (i.e. idle bus). But I asked the >> support, though. > > the support says: > > [email protected] wrote: >>> Can this autorecovery-128-bits be disabled on the at91? >> For sure not as we would be out of spec. I doubt that but I do not really know the spec. I put a few CAN expert on CC who might be able to tell us if bus-off recovery should be done automatically (immediately) by the hardware. Wolfgang. _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
