cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with interrupts

sabrecat
Associate II
Posted on December 20, 2005 at 13:25

Need help with interrupts

4 REPLIES 4
sabrecat
Associate II
Posted on December 18, 2005 at 18:08

I'm trying to use a ST72321 MCU for a school project. The programming seems to OK, I can compile the program and run it in the STVD7 simulator.

But when I try to run it using my inDART programmer I can't get the interrupts to work. As far as I can see all flags are set and never cleared?

The specific interrupt function is a timer using the main clock:

In MAIN:

MCCSR = 0x0E; (longest timebase, interrupt on)

temp = MCCSR; (to clear OIF)

_asm(''rim'');

Call at interrupt vector address 0xFFF8

@interrupt void timerinterrupt (void)

{

temp = MCCSR;

time++;

}

Have I missed a register setting, or is it my hardware that is acting up?

laurent239955_stm1
Associate II
Posted on December 20, 2005 at 06:14

Hi,

It seems to me you did the right things !

Are you 100% sure that the problem is in the interrupt management ?

Do you know if the first interrupt occurs ?

Did you check the basic functionnalities of the CPU ? (clock)

Can you try to set an output depending what part of your code you are executing ?

BR

laurent

sabrecat
Associate II
Posted on December 20, 2005 at 11:39

I have checked functionallity both by using I/O ports connected to LEDs and by the more basic procedure of using breakpoints when running it through STVD7. I seem not to get any interrupts at all.

I wonder if it's SofTech's system that is acting up. I've gotten some really strange programming errors.

laurent239955_stm1
Associate II
Posted on December 20, 2005 at 13:25

Hi,

Then you can try to contact directly Softec :

mailto:support@softecmicro.com

I hope they can help you.

Best regards

Laurent