cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with st7 interrupts

vlad_r
Associate II
Posted on August 24, 2005 at 09:23

Problem with st7 interrupts

4 REPLIES 4
vlad_r
Associate II
Posted on August 22, 2005 at 11:15

I am new to st7. I work with st72521 & indart-stx with metrowerk compiler. I wrote code for Real Time clock interrupt. Fcpu 8Mhz

MCCSR=0x0E;

ITSPR0=0xD7;

My inerrupt function is:

#pragma TRAP_PROC SAVE_REGS

void Real_Cl()

{

;

;

}

At the end of PRM file I put: VECTOR ADDRESS 0xFFF8 Real_Cl

I can't enter this interrupt. I also tried to activate port A interrupt.

At the end of PRM file I put: VECTOR ADDRESS 0xFFF6 Int_PA.

I used demo board swithes to enter this interrupt with no result.

PortA defined as interrupt input: PAOR=0x0F

What wrong do you see?

pbrea
Associate II
Posted on August 22, 2005 at 11:20

Hi,

use #pragma TRAP PROC without SAVE REGS

Bye

vlad_r
Associate II
Posted on August 22, 2005 at 11:40

Thank you,

the result is the same. The flag - MCCSR bit0 is set.

Buy.

vlad_r
Associate II
Posted on August 24, 2005 at 09:23

I wrote C code for Timer A interrupt. Each interrupt entrance I change PortD value according to changing of x in the same interrupt. x is the global volatile unsigned char. The code works well.

The same code but,

when I try to change value of PortD in main() acoording to the same x using simple if(x) - the code doesn't work.

I opened project in Code Warrior IDE using ST7 New Project Wizard & added only VECTOR ADDRESS for Timer A in .prm.

[ This message was edited by: vldxl on 24-08-2005 12:53 ]

[ This message was edited by: vldxl on 24-08-2005 12:55 ]