ADSP-BF50x Blackfin Processor Hardware Reference
16-53
Two-Wire Interface Controller
check that master transfer has completed
MCOMP is set when Count reaches zero
***********************************************************/
M_COMP:
R1 = W[P1 + LO(TWI_INT_STAT)](z);
CC = BITTST (R1, bitpos(MCOMP));
if ! CC jump M_COMP;
M_COMP.END:
W[P1 + LO(TWI_INT_STAT)] = R1;
/* load the pointer with the address of the transmit buffer */
P2.H = TX_file;
P2.L = TX_file;
/***********************************************************
Pre-load the tx FIFO with the first two bytes: this is
necessary to avoid the generation of the Buffer Read Error
(BUFRDERR) which occurs whenever a transmit transfer is
initiated while the transmit buffer is empty
***********************************************************/
R3 = W[P2++](Z);
W[P1 + LO(TWI_XMT_DATA16)] = R3;
/***********************************************************
Initiating the Write operation
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 Standard
4. direction of transfer:
MDIR = 1 for reads, MDIR = 0 for writes
5. Master Enable MEN. Setting this bit will kick off the transfer
***********************************************************/
R1 = TWICount(0xFE) | FAST | MEN;
W[P1 + LO(TWI_MASTER_CTL)] = R1;
Содержание EZ-KIT Lite ADSP-BF506F
Страница 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 132: ...Unique Information for the ADSP BF50x Processor 4 22 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 342: ...Unique Information for the ADSP BF50x Processor 7 106 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 484: ...Unique Information for the ADSP BF50x Processor 10 60 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 493: ...ADSP BF50x Blackfin Processor Hardware Reference 11 9 Core Timer Unique Information for the ADSP BF50x Processor None ...
Страница 494: ...Unique Information for the ADSP BF50x Processor 11 10 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 506: ...Unique Information for the ADSP BF50x Processor 12 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 544: ...Unique Information for the ADSP BF50x Processor 13 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 712: ...Unique Information for the ADSP BF50x Processor 16 62 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 972: ...Unique Information for the ADSP BF50x Processor 20 38 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Страница 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...