Analog Devices ADSP-BF506F Hardware Reference Manual page 703

Adsp-bf50x blackfin processor
Hide thumbs Also See for ADSP-BF506F:
Table of Contents

Advertisement

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:
/* 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;
ADSP-BF50x Blackfin Processor Hardware Reference
W[P1 + LO(TWI_INT_STAT)] = R1;
Two-Wire Interface Controller
16-53

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADSP-BF506F and is the answer not in the manual?

This manual is also suitable for:

Adsp-bf504Adsp-bf504f

Table of Contents