Analog Devices ADSP-BF59x Blackfin Hardware Reference Manual page 451

Table of Contents

Advertisement

Two Wire Interface Controller
P4.H = HI(TWI_TX);
P4.L = LO(TWI_TX);
/***********************************************************
Remap the vector table pointer from the default __I10HANDLER
to the new _TWI_ISR interrupt service routine
***********************************************************/
R1.H = HI(_TWI_ISR);
R1.L = LO(_TWI_ISR);
[P0 + LO(EVT10)] = R1;
/* note that P0 points to the base of
the core MMR registers */
/***********************************************************
ENABLE TWI generate to interrupts at the system level
***********************************************************/
R1 = [P1 + LO(SIC_IMASK)];
BITSET(R1,BITPOS(IRQ_TWI));
[P1 + LO(SIC_IMASK)] = R1;
/***********************************************************
ENABLE TWI to generate interrupts at the core level
***********************************************************/
R1 = [P0 + LO(IMASK)];
BITSET(R1,BITPOS(EVT_IVG10));
[P0 + LO(IMASK)] = R1;
/***********************************************************
wait for interrupts
***********************************************************/
idle;
_main.END:
Listing 12-3. TWI Slave Interrupt Service Routine
/***********************************************************
ADSP-BF59x Blackfin Processor Hardware Reference
12-53

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents