Sign in

username:

password:



Not a member?

Search c54x



Search tips

Subscribe to c54x



c54x by Keywords

5409 | 5416 | AD5 | ADC | BIOS | Boot | Booting | Bootloader | C540 | C5402 | C5409 | C5416 | CCS | Codec | DMA | Dmad | DSK | DSKPlus | Dsplib | EVM | FFT | FIR | Flash | GPIO | HPI | Initialization | Interrupt | JTAG | LOG_printf | MCBSP | RFFT | RTDX | Sampling | STLM | UART | VC540

Discussion Groups

Discussion Groups | TMS320C54x | intr_hook problems

Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).

  

Post a new Thread

intr_hook problems - andrewpasquale - Aug 12 9:12:00 2002



hello all,
i am using the header file intr.h to allow me to use my own interrupt
service routines. I think i am following the convention specified in
intr.h but the code will always give the error " expected a
declaration" on each call to intr.h

.....
INTR_INIT
INTR_HOOK( 16,my_int0)
INTR_HOOK( 18,my_int2)
..
interrupt void my_int0()
{
}
interrupt void my_int2()
{
}
...

Is this the correct way to do it? the intr.h file has it as such,
...
#define INT0_TRAP 16
#define INT1_TRAP 17
#define INT2_TRAP 18
...
/******************************************************************/
/* INTR_INIT - sets interrupt vector pointer */
/******************************************************************/
#define INTR_INIT\
{PMST &= 0x7f; PMST |= ( ( (unsigned int)&_vectors ) & 0xff80u); }

/******************************************************************/
/* INTR_HOOK(isr, isrfunc) - sets interrupt service routine vec */
/* isr - interrupt trap number (see TRAP instruction) */
/* isrfunc - address of interrupt service routine */
/******************************************************************/
#define INTR_HOOK(trap_no, isrfunc) \
{ isr_jump_table[trap_no] = (ISRFUNC)isrfunc; }

I need to use this method since im using codec API and the
drv5402.lib file which uses its own vector table.

any help would be greatly apprectiated,
Andrew Pasquale

"PS if i did a stupid mistake, explitives will not offend."




(You need to be a member of c54x -- send a blank email to c54x-subscribe@yahoogroups.com )