15.08.2013 Views

DESIGN OF A CUSTOM ASIC INCORPORATING CAN™ AND 1 ...

DESIGN OF A CUSTOM ASIC INCORPORATING CAN™ AND 1 ...

DESIGN OF A CUSTOM ASIC INCORPORATING CAN™ AND 1 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

that buffer is given to the CPU and RBS is immediately set again. The first receive<br />

buffer is then available for the next incoming message from the CAN Module.<br />

5.3.6 CAN Module Interrupt Register (CINT)<br />

The CAN Module has only one interrupt vector assigned to it. The Interrupt Register,<br />

shown in Figure 5.19, can be read to determine the source of a CAN interrupt. The five<br />

interrupt sources include: Wake Up, Data Overrun (a third message being received before either<br />

of the Receive Buffers have been released), Error (either read or write error counter reaching a<br />

pre-determined level), Transmission Complete, and Receive Interrupt [96]. All bits of this<br />

register are read only; all are cleared by a read of this register. However, this register must be<br />

read in the interrupt handling routine in order to enable further interrupts.<br />

Figure 5.19 CAN Interrupt Register.<br />

WIF: Wake-Up Interrupt Flag. If the CAN module detects bus activity while it is in<br />

the SLEEP state, it clears the SLEEP in the CCOM register; the WIF bit will then be set.<br />

WIF is cleared by reading the CAN Interrupt Register (CINT), or by an external reset.<br />

OIF: Overrun Interrupt Flag. When OIE (bit 4 of CCNTRL register) is set this bit will<br />

be set when a data overrun condition is detected. Like all the bits in this register, OIF is<br />

cleared by reading the register, or when an external reset request is set.<br />

EIF: Error Interrupt Flag. When EIE (bit 3 of CCNTRL register) is set then this bit will<br />

be set by a change in the error or bus status bits in the CAN module status register.<br />

152

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!