cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with multiple interrupts from motor controler peripheral.

riaan1
Associate II
Posted on March 28, 2008 at 07:55

Problem with multiple interrupts from motor controler peripheral.

6 REPLIES 6
riaan1
Associate II
Posted on May 17, 2011 at 09:51

Hi

I use the motor control peripheral on the STR912 and have some problems with interrupts. I have three sources of interrupts enabled - automatic data transfer (2400Hz), tacho capture (totally asynchronous, approx 66Hz) and tacho overflow (doesn't normally happen). Regardless of how I manage pending interrupts, the processor stops servicing the MC interrupt after a few seconds.

I have tried :

a. Servicing only one pending interrupt for each call of the ISR.

b. Servicing all pending interrupts sequentially without ensuring that all pending interrupts are cleared before leaving the ISR.

c. Servicing all pending interrupts sequentially, ensuring that all are reset before leaving the ISR - i.e. using a 'while (MC->IPR)' clause in the ISR.

If I disable tacho interrupts (i.e. only ADT interrupt active for MC) the application seems to be running stable.

I am using an STR912FW44X6 (date code 619) on the MB460 eval board with the IAR 4.42 IDE. I am using my own driver code for all peripherals, except for the files '91x_vect.s' and '91x_it.c' from the latest ST library.

Any comments will be appreciated.

amira1
Associate II
Posted on May 17, 2011 at 09:51

Hello riaan,

You should also use the interrupt source file provided in the v2.0 library. In fact, you just write any value to VIC0, in the MC interrupt handler.

Best regards,

Amira.

riaan1
Associate II
Posted on May 17, 2011 at 09:51

I am using the file '91x_it.c' from v2.0 library. The MC interrupt function was modified to call my ISR as shown below.

//**************************************************************

void MC_IRQHandler(void)

{

MC_IRQFunc();

/*write any value to VIC0 VAR*/

VIC0->VAR = 0xFF;

}

//**************************************************************

Regards

michael
Associate II
Posted on May 17, 2011 at 09:51

Did you check that you don't run out of stack space? If you support nested interrupts, this may happen.

[ This message was edited by: michael.tamir on 26-03-2008 11:42 ]

riaan1
Associate II
Posted on May 17, 2011 at 09:51

Didn't check specifically for stak usage. As far as I know the latest ST library does not support nested interrupts, so chances are small that I am running out of stack space - will investigate.

Thanks

tybl
Associate II
Posted on May 17, 2011 at 09:51

I have a same problem with you!

:-Y