beautypg.com

2 operating modes, 1 disabled, 2 tx data & remote frame – Rainbow Electronics ATmega64C1 User Manual

Page 177: 3 rx data & remote frame

background image

177

7647A–AVR–02/08

ATmega32/64/M1/C1

16.5.2

Operating Modes

There is no default mode after RESET.
Every MOb has its own fields to control the operating mode. Before enabling the CAN periph-
eral, each MOb must be configured (ex: disabled mode - CONMOB=00).

16.5.2.1

Disabled

In this mode, the MOb is “free”.

16.5.2.2

Tx Data & Remote Frame

1.

Several fields must be initialized before sending:

– Identifier tag (IDT)

– Identifier extension (IDE)

– Remote transmission request (RTRTAG)

– Data length code (DLC)

– Reserved bit(s) tag (RBnTAG)

– Data bytes of message (MSG)

2.

The MOb is ready to send a data or a remote frame when the MOb configuration is set
(CONMOB).

3.

Then, the CAN channel scans all the MObs in Tx configuration, finds the MOb having
the highest priority and tries to send it.

4.

When the transmission is completed the TXOK flag is set (interrupt).

5.

All the parameters and data are available in the MOb until a new initialization.

16.5.2.3

Rx Data & Remote Frame

1.

Several fields must be initialized before receiving:

– Identifier tag (IDT)
– Identifier mask (IDMSK)
– Identifier extension (IDE)
– Identifier extension mask (IDEMSK)
– Remote transmission request (RTRTAG)
– Remote transmission request mask (RTRMSK)
– Data length code (DLC)
– Reserved bit(s) tag (RBnTAG)

Table 16-1.

MOb Configuration

MOb Configuration

Reply Valid

RTR Tag

Operating Mode

0

0

x

x

Disabled

0

1

x

0

Tx Data Frame

x

1

Tx Remote Frame

1

0

x

0

Rx Data Frame

0

1

Rx Remote Frame

1

Rx Remote Frame then, Tx Data Frame (reply)

1

1

x

x

Frame Buffer Receive Mode