Figure 34 – Rainbow Electronics AT91CAP9S250A User Manual

Page 500

Advertising
background image

500

6264A–CAP–21-May-07

AT91CAP9S500A/AT91CAP9S250A

7.

If TWI has to be set in Slave mode, wait until TXCOMP flag is at 1 and then program the
Slave mode.

Note:

In the case where the arbitration is lost and TWI is addressed, TWI will not acknowledge even if it
is programmed in Slave mode as soon as ARBLST is set to 1. Then, the Master must repeat
SADR.

Figure 34-20. Programmer Sends Data While the Bus is Busy

Figure 34-21. Arbitration Cases

The flowchart shown in

Figure 34-22 on page 501

gives an example of read and write operations

in Multi-master mode.

TWCK

TWD

DATA sent by a master

STOP sent by the master

START sent by the TWI

DATA sent by the TWI

Bus is busy

Bus is free

A transfer is programmed

(DADR + W + START + Write THR)

Transfer is initiated

TWI DATA transfer

Transfer is kept

Bus is considered as free

TWCK

Bus is busy

Bus is free

A transfer is programmed

(DADR + W + START + Write THR)

Transfer is initiated

TWI DATA transfer

Transfer is kept

Bus is considered as free

Data from a Master

Data from TWI

S

0

S

0

0

1

1

1

ARBLST

S

0

S

0

0

1

1

1

TWD

S

0

0

1

1 1

1 1

Arbitration is lost

TWI stops sending data

P

S

0

1

P

0

1

1

1

1

Data from the master

Data from the TWI

Arbitration is lost

The master stops sending data

Transfer is stopped

Transfer is programmed again

(DADR + W + START + Write THR)

TWCK

TWD

Advertising