Programming Model
21-20
ADSP-214xx SHARC Processor Hardware Reference
Slave Mode
When enabled, slave mode supports both receive and transmit data trans-
fers. It is not possible to enable only one data transfer direction and not
acknowledge (NAK) the other. This is reflected in the following setup.
1. Program the
TWISADDR
register. The appropriate 7 bits are used in
determining a match during the address phase of the transfer.
2. Program the
TXTWI8
or
TXTWI16
register. These are the initial data
values to be transmitted in the event the slave is addressed as a
transmitter. This is an optional step. If no data is written and the
slave is addressed and a transmit is required, the
TWI_CLOCK
is
stretched and an interrupt is generated.
3. Program the
TWIFIFOCTL
register. Indicate if transmit (or receive)
FIFO buffer interrupts should occur with each byte transmitted
(received) or with each 2 bytes transmitted (received).
4. Program the
TWIIMASK
register. Enable bits associated with the
desired interrupt sources. As an example, programming the value
0x000F results in an interrupt output to the processor when a valid
address match is detected, a valid slave transfer completes, a slave
transfer has an error, or a subsequent transfer has begun but the
previous transfer has not been serviced.
5. Program the
TWISCTL
register. This prepares and enables slave
mode operation. As an example, programming the value 0x0005
enables slave mode operation, requires 7-bit addressing, and indi-
cates that data in the transmit FIFO buffer is intended for slave
mode transmission.
shows what the interaction between the TWI controller and
the processor might look like when the slave is addressed as a receiver.
www.BDTIC.com/ADI
Содержание SHARC ADSP-214 Series
Страница 60: ...Contents lx ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 72: ...Notation Conventions lxxii ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 130: ...Programming Model 2 52 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 264: ...Programming Models 3 134 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 290: ...Programming Model 4 26 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 296: ...Programming Model 5 6 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 396: ...Effect Latency 7 28 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 520: ...Programming Model 10 62 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 616: ...Debug Features 14 22 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 656: ...Programming Model 15 40 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 714: ...Programming Model 19 10 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 1132: ...Register Listing A 306 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...
Страница 1192: ...Index I 34 ADSP 214xx SHARC Processor Hardware Reference www BDTIC com ADI...