Wolfram Sang wrote: >> This works as well: >> >> /* >> * The MSCAN on the MPC5200 does recover from bus-off >> * automatically. To avoid that we stop the chip. >> */ >> #if 0 >> mscan_stop(dev); >> priv->can.state = CAN_STATE_BUS_OFF; >> #else >> /* Light way stop */ >> out_8(®s->cantier, 0); >> out_8(®s->canrier, 0); >> out_8(®s->canctl0, in_8(®s->canctl0) | > > Don't we need CAN_STATE_BUS_OFF here, too?
No, it's just needed after mscan_stop() as that call sets the state to "STOPPED". We may call "mscan_stop()", though, when the device is restarted to avoid starting the device when it's not yet completely stopped. But that's a minor issue. Wolfgang. _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
