Implementation of a BUS OFF recovery mechanism on a CAN bus driver
Description
This report presents the implementation of the BUS OFF recovery mechanism on a CAN bus driver. The CAN protocol defined in 1991 by Robert Bosh GmbH implements 5 error detection mechanisms: 1. Bit Monitoring; 2. Bit Stuffing; 3. Frame Check; 4. Acknowledgement Check; 5. Cyclic Redundancy Check. If a node in a CAN bus does not return a recessive bit on its reply for a given time, it will be put in BUS OFF status and will stop transmitting information to the bus, until the BUS OFF status get cleared either manually or automatically. The implementation of this mechanism is made on a Freescale’s MC9S12XEP100 and involves modifications to its MSCAN (Scalable Controller Area Network) module configuration bits to enable both the BUS OFF and the Automatic BUS OFF recovery. The implementation also includes functions that will recover the bus from this state, manually, after pressing a button. This document describes the details on the previously mentioned mechanisms.Consejo Nacional de Ciencia y Tecnología