ADSP-BF537 Blackfin Processor Hardware Reference
11-49
Two Wire Interface Controller
R1 = RCVSERV | XMTSERV | MERR | MCOMP (z);
W[P1 + LO(TWI_INT_MASK)] = R1;
/***********************************************************
The address needs to be shifted one place to the right
e.g., 1010 001x becomes 0101 0001 (0x51) the TWI controller
will actually send out 1010 001x where x is either a 0 for
writes or 1 for reads
***********************************************************/
R6 = 0xBF;
R6 = R6 >> 1;
TWI_INIT.END: W[P1 + LO(TWI_MASTER_ADDR)] = R6;
/******************** END OF TWI INIT **********************/
/***********************************************************
Starting the Read transfer
Program the Master Control register with:
1. the number of bytes to transfer: TWICount(x)
2. Repeated Start (RESTART): optional
3. speed mode: FAST or SLOW
4. direction of transfer:
MDIR = 1 for reads, MDIR = 0 for writes
5. Master Enable MEN. This will kick off the master transfer
***********************************************************/
R1 = TWICount(0x2) | FAST | MDIR | MEN;
W[P1 + LO(TWI_MASTER_CTL)] = R1;
ssync;
/***********************************************************
Poll the FIFO Status register to know when
2 bytes have been shifted into the RX FIFO
***********************************************************/
Rx_stat:
Summary of Contents for Blackfin ADSP-BF537
Page 42: ...Contents xlii ADSP BF537 Blackfin Processor Hardware Reference ...
Page 90: ...Development Tools 1 32 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 138: ...Programming Examples 4 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 340: ...SDC Programming Examples 6 84 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 606: ...Programming Examples 9 94 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 660: ...Programming Examples 10 54 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 720: ...Electrical Specifications 11 60 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 840: ...Programming Examples 13 42 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 876: ...Programming Examples 14 36 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 938: ...Programming Examples 15 62 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 958: ...Programming Examples 17 12 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 986: ...Programming Examples 18 28 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1162: ...G 26 ADSP BF537 Blackfin Processor Hardware Reference ...
Page 1218: ...Index I 56 ADSP BF537 Blackfin Processor Hardware Reference ...