beautypg.com

3 cangit – can general interrupt register – Rainbow Electronics ATmega64M1 User Manual

Page 185

background image

185

8209A–AVR–08/09

ATmega16M1/32M1/64M1

• Bit 2 – ENFG: Enable Flag

This flag does not generate an interrupt.

– 0 - CAN controller disable: because an enable/standby command is not immediately

effective, this status gives the true state of the chosen mode.

– 1 - CAN controller enable.

• Bit 1 – BOFF: Bus Off Mode

BOFF gives the information of the state of the CAN channel. Only entering in bus off mode gen-
erates the BOFFIT interrupt.

– 0 - no bus off mode.

– 1 - bus off mode.

• Bit 0 – ERRP: Error Passive Mode

ERRP gives the information of the state of the CAN channel. This flag does not generate an
interrupt.

– 0 - no error passive mode.

– 1 - error passive mode.

20.10.3

CANGIT – CAN General Interrupt Register

• Bit 7 – CANIT: General Interrupt Flag

This is a read only bit.

– 0 - no interrupt.

– 1 - CAN interrupt: image of all the CAN controller interrupts except for OVRTIM

interrupt. This bit can be used for polling method.

• Bit 6 – BOFFIT: Bus Off Interrupt Flag

Writing a logical one resets this interrupt flag. BOFFIT flag is only set when the CAN enters in
bus off mode (coming from error passive mode).

– 0 - no interrupt.

– 1 - bus off interrupt when the CAN enters in bus off mode.

• Bit 5 – OVRTIM: Overrun CAN Timer

Writing a logical one resets this interrupt flag. Entering in CAN timer overrun interrupt handler
also reset this interrupt flag

– 0 - no interrupt.

– 1 - CAN timer overrun interrupt: set when the CAN timer switches from 0xFFFF to 0.

• Bit 4 – BXOK: Frame Buffer Receive Interrupt

Writing a logical one resets this interrupt flag. BXOK flag can be cleared only if all CONMOB
fields of the MOb’s of the buffer have been re-written before.

Bit

7

6

5

4

3

2

1

0

CANIT

BOFFIT

OVRTIM

BXOK

SERG

CERG

FERG

AERG

CANGIT

Read/Write

R

R/W

R/W

R/W

R/W

R/W

R/W

R/W

Initial Value

0

0

0

0

0

0

0

0