CAN SERIAL COMMUNICATIONS CONTROLLER

7.3.4Error Detection and Management Logic

The CAN controller has several error detection mechanisms, including cyclical redundancy checking (CRC) and bit coding rules (stuffing and destuffing). The CAN controller generates a CRC code for transmitted messages and checks the CRC code of incoming messages. The CRC polynomial has been optimized for control applications with short messages.

After five consecutive bits of equal value are transmitted, a bit with the opposite polarity is added to the bit stream. This bit is called a stuff bit; by adding a transition, a stuff bit aids in synchroni- zation. All message fields are stuffed except the CRC delimiter, the acknowledgment field, and the end-of-frame field.

Receiving nodes reject data from any message that is corrupted during transmission and send an error message via the CAN bus. Transmitting nodes monitor the CAN bus for error messages and automatically repeat a transmission if an error occurs. The following error types are detected:

stuff error — more than 5 equal bits in a sequence have occurred in a part of a received message where this is not allowed

form error — the fixed-format part of a received frame has the wrong format (for example, a reserved bit has the wrong value)

acknowledgment error — this device transmitted a message, but it was not acknowledged by another node on the CAN bus. (The transmit error counter stops incrementing after 128 acknowledgment errors, so this error type does not cause a bus-off state.)

bit 1 error — the CAN controller tried to send a recessive (logic 1) bit as part of a transmitted message (with the exception of the arbitration field), but the monitored CAN bus value was dominant (logic 0)

bit 0 error — the CAN controller tried to send a dominant (logic 0) bit as part of a transmitted message (with the exception of the arbitration field), but the monitored CAN bus value was recessive (logic 1)

CRC error — the CRC checksum received for an incoming message does not match the CRC value that the CAN controller calculated for the received data

The CAN status register indicates the type of the first transmission error that occurred on the CAN bus and whether an abnormal number of errors have occurred. Two counters (a receive error counter and a transmit error counter) track the number of errors. The status register’s warning bit is set when the receive or transmit error counter reaches 96; the bus-off bit is set when either counter reaches 256. If this occurs, the CAN controller isolates itself from the CAN bus (floats the TX pin). Software must clear the INIT bit in the control register (Figure 7-6 on page 7-13) to begin a bus-off recovery sequence.

7-9

Page 70
Image 70
Intel 87C196CB, 8XC196NT user manual Error Detection and Management Logic

8XC196NT, 87C196CB specifications

The Intel 87C196CB and 8XC196NT are microcontrollers from the C196 family, which was designed to meet the demands of embedded control technology. These microcontrollers are popular in various applications due to their robust architecture, extensive I/O capabilities, and specialized functionality, making them ideal for automotive, industrial, and communication systems.

The 87C196CB is distinguished by its 16-bit architecture, offering a balance of processing power and efficiency. It features a 16-bit data bus, which allows for fast data processing, and a 16-bit address bus, supporting up to 64KB of program memory. The microcontroller integrates on-chip memory, including 2KB of ROM and 128 bytes of RAM, which facilitates faster execution of programs and data handling.

One of the standout features of the 87C196CB is its versatility in I/O operations. It comes equipped with 32 general-purpose I/O lines that can be configured for various functions, including input, output, and interrupt handling. This flexibility enables developers to optimize the microcontroller for their specific application needs.

The 8XC196NT builds on the capabilities of its predecessor, offering advanced functionalities such as an enhanced instruction set and integrated peripherals. It includes additional features like timers, serial communication interfaces, and analog-to-digital converters, which expand its usability in complex embedded systems. The 8XC196NT supports multiple addressing modes, allowing for more efficient programming and memory management.

Both microcontrollers utilize innovative technologies that improve performance and power efficiency. The on-chip operating system support aids in real-time processing and multitasking, making them suitable for time-sensitive applications. Power management features are also incorporated, allowing these microcontrollers to operate in low-power modes, which is crucial for battery-operated devices.

The 87C196CB and 8XC196NT microcontrollers are characterized by their reliability and long service life, meeting the stringent demands of industrial applications. Their ability to perform tasks rapidly, combined with their diverse peripheral support, makes them popular choices among engineers and developers designing embedded systems. Overall, the Intel 87C196CB and 8XC196NT microcontrollers remain relevant in the rapidly evolving landscape of embedded technology, facilitating innovative solutions across various industries.