cancel
Showing results for 
Search instead for 
Did you mean: 

interrupt problem

bleumers_j
Associate II
Posted on July 05, 2005 at 05:59

interrupt problem

5 REPLIES 5
bleumers_j
Associate II
Posted on June 29, 2005 at 06:52

Hi,

Strange problem with an ST72F264G2:

The program has worked completely, after minor changes it doesn't work anymore. This is what happens:

When i enable interrupts (_asm(''_rim'')), the main progam stops. Only other interrupts can be executed. So, it seems as if a lower priority ISR is stopped. But when i add all NULL in the interrupt_vector, all irq's are blocked, the problem stays.

Any ideas???

fggnrc
Associate II
Posted on June 29, 2005 at 07:33

Is there in your code an infinite loop?

I mean, code like

for ( ; ; )

{

/* Some code */

}

I suppose that your main is locked somewhere.

If it is true, then only the ISR will be running.

EtaPhi

franco
Associate II
Posted on June 29, 2005 at 12:02

Probably you don't reset some interrupt condition.You can try to disable all interrupts and the main program should work fine.

Adding all NULL in the interrupr_vector isn't the correct solution,I think...

bleumers_j
Associate II
Posted on June 29, 2005 at 12:05

I've posted this question to soon. Problem was a hardware error and no software error.

Greets.

emmanuel23
Associate II
Posted on July 05, 2005 at 05:59

hi joble,

just a warning about putting a null address in the vector table.

This is very dangerous because:

When the interrupt occurs, the core will jump to the given address (0 in this case) and try to interpret the value at this location (typically the value of an IO port register) as code.

A recommended way is to point to a minimal function that just returns (iret if in assembler).

The default vector table generated by STVD7 v3.2 for C projects follows this recommendation