Digital Signal Processing Reference
In-Depth Information
mcbsp0_write(out_data & 0xfffe); //mask out LSB
}
int input_sample() //added for input
{
return mcbsp0_read();//read from McBSP0
}
•
Vectors_11.asm
Locate the
Vectors.asm
file in
c:\ti\
folder. Modify
Vectors.asm
as
below to handle interrupts. Save it as
Vectors_11.asm,
as shown
below. Twelve interrupts,
INT4
through
INT15
, are available, and
INT11
is selected within this vector file.
//*Vectors_11.asm Vector file for interrupt-driven program
.ref _c_int11; ISR used in C program
.ref _c_int00 ;entry address
.sect “vectors”;section for vectors
RESET_RST: mvkl .S2 _c_int00,B0;lower 16 bits —> B0
mvkh .S2_c_int00,B0 ;upper 16 bits —> B0
B
.S2 B0
;branch to entry address
NOP
;NOPs for remainder of FP
NOP
;to fill 0x20 Bytes
NOP
NOP
NOP
NMI_RST:
.loop 8
NOP
;fill with 8 NOPs
.endloop
RESV1: .loop 8
NOP
.endloop
RESV2: .loop 8
NOP
.endloop
INT4: .loop 8
NOP
.endloop