cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,445 Views
Registered: ‎08-30-2011

Interrupt doesn´t work while loops are executiong

Hi!

I´m working with SDK and now I have a Problem with my interrupts.

When the Program is in a for- or while-loop, the Interrupts doesn´t work. Without the loop everithing is fine.

but I need that loop and I can´t imagine that a loop can prevent an interrupt...

the code looks similar to this:

 

while(!my_event);

 

my_event is a global char variable and initialized with 0. When an interrupt occurs the variable is set to 1, but at the moment I never set it to 1. So it´s an endless-loop at the moment. But why aren´t my Interrupts working? 

My Interrupt that doesn´t work is the Hard_Ethernet_Mac-interrupt.

 

My programm is running on SD_RAM from the ML507 board. 

In XPS I´ve seen, that the SD-Ram is in the interrupt controller. I tried to put it out of the interruptcontroller, but than nothing worked. So I changed it again.

Than I read another thread about optimation. I tried to declare the variable as volatile. In two different ways:

volatile char my_event = 0;

and

char volatile my_event = 0;

but it also doesn´t work.

 

I´m happy for everything what could help.

 

Regards Jan

0 Kudos
0 Replies