ADSP-BF537 Blackfin Processor Hardware Reference
11-47
Two Wire Interface Controller
Programming Examples
The following sections include programming examples for general setup,
slave mode, and master mode, as well as guidance for repeated start
conditions.
Master Mode Setup
shows how to initiate polled receive and transmit transfers in
master mode.
Listing 11-1. Master Mode Receive/Transmit Transfer
/***********************************************************
macro for the Count field of the TWI_MASTER_CTL register
x can be any value between 0 and 0xFE (254). a value of
0xFF disables the counter
***********************************************************/
#define TWICount(x) (DCNT & ((x) << 6))
.section L1_data_b;
.byte TX_file[file_size] = "DATA.hex";
.BYTE RX_CHECK[file_size];
Figure 11-28. TWI FIFO Receive Data Double Byte Register
15 14
13 12
11 10
9
8
7
6
5
4
3
2
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
TWI FIFO Receive Data Double Byte Register (TWI_RCV_DATA16)
All bits are WO.
RCVDATA16[15:0] (Receive
FIFO 16-Bit Data)
Reset = 0x0000
0xFFC0 148C
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 ...