DSPRelated.com
Forums

Re: Interrupt concept DSP56801EVm

Started by Mariano Filippa May 3, 2004
It's been a while since I don't program the DSP, but I'll give it a try.

First, check this >>> asm(bfset #0012,X:IPR);
Is it decimal 12 or hex 12 ??
IPR = b xxxx xxxx xx11 x11x for both IRQ A and B enabled and edge sensitive
(user's manual p. 4-4) Check this setting.

Second: where is your #pragma interrupt ??
In your ISR you should have a #pragma interrupt [called|warn|saveall[warn]]
Check your Targeting Manual for the sintax.

I assume you have your interrup vector correct, otherwise check them.
There should be a JSR to your ISR.

That's all. I hope I'm not forgetting anything. Please anybody correct me if
I'm wrong.
First fix this, then try again with the MOVE instructions.

Regards,
Mariano

----- Original Message -----
From: "praveen" <>
To: <>
Sent: Saturday, May 01, 2004 7:12 PM
Subject: Interrupt concept DSP56801EVm

Hi

I saw your email ID in the motorola Group. I am trying to run a small interrupt program using IRQA(DSP56F801)but
the interrupt action is not occuring when i press IRQA button . The following is the code
void main()
{

int x,y;
// STEP 1 : To take care I1 and I0 Bits
asm(bfset #$0100,sr);
asm(bfclr #$0200,sr);

// STEP 2 : Enable Both IRQA and IRQB

asm(bfset #0012,X:IPR);

// STEP 3 :
// ISR definition

declareISR(x ,y);
declareISR((int)0xE9C8,(int)0x0010);
declareISR((int)&isrint,(int)0x0011);
while(1); }

///////// This is in another C file and i have declared the header
files also.
int k; declareISR(int,int)

{ asm(MOVE Y1,R0);
asm(NOP);
asm(MOVE Y0,P:(R0)+);
} isrint()
{

k;
asm(RTI); }

One more thing i found that the instruction
asm(MOVE Y1,R0);
asm(MOVE Y0,P:(R0)+);

is not working properly . But it works properly in the simulator.
i.e when i see the program memory after the execution of these
instruction there is no change in the memory contents as per the
instruction.is there is any register ( I think OMR) should be changed.
Please help me with this one. Thanking you
Praveen