
ADSP-BF50x Blackfin Processor Hardware Reference
16-59
Two-Wire Interface Controller
.GLOBAL _TWI_ISR;
.section L1_code;
_TWI_ISR:
/***********************************************************
read the source of the interrupt
***********************************************************/
R1 = W[P1 + LO(TWI_INT_STAT)](z);
/***********************************************************
Slave Transfer Initiated
***********************************************************/
CC = BITTST(R1, BITPOS(SINIT));
if ! CC JUMP RECEIVE;
R0 = SINIT (Z);
W[P1 + LO(TWI_INT_STAT)] = R0;
/* clear interrupt source bit */
ssync;
/***********************************************************
Receive service
***********************************************************/
RECEIVE:
CC = BITTST(R1, BITPOS(RCVSERV));
if ! CC JUMP TRANSMIT;
R0 = W[P1 + LO(TWI_RCV_DATA8)] (Z);
/* read data */
B[P2++] = R0;
/* store bytes into a buffer pointed to by P2 */
R0 = RCVSERV(Z);
W[P1 + LO(TWI_INT_STAT)] = R0;
/*clear interrupt source bit */
ssync;
JUMP _TWI_ISR.END; /* exit */
/***********************************************************
Transmit service
Summary of Contents for EZ-KIT Lite ADSP-BF506F
Page 50: ...Contents l ADSP BF50x Blackfin Processor Hardware Reference ...
Page 92: ...Development Tools 1 30 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 110: ...Interface Overview 3 12 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 236: ...Internal Flash Memory Control Registers 6 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 650: ...Programming Examples 15 56 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 804: ...Programming Examples 17 92 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1194: ...Programming Examples 24 90 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1256: ...ACM Registers A 50 ADSP BF50x Blackfin Processor Hardware Reference ...
Page 1264: ...Boundary Scan Architecture B 8 ADSP BF50x Blackfin Processor Hardware Reference ...