cancel
Showing results for 
Search instead for 
Did you mean: 

TIM2 -> FIQ on STR750?

rbennett2
Associate II
Posted on June 25, 2007 at 15:21

TIM2 -> FIQ on STR750?

3 REPLIES 3
rbennett2
Associate II
Posted on June 22, 2007 at 17:26

Processor: STM750 (ARM7)

Compiler: IAR

I'm programming firmware for a stepper motor. Currently, the time between steps is controlled by a timer that sends a pulse to the stepper motor every time it expires. An IRQ interrupt allows the timer to be reloaded and other things to be done every step.

The problem is that when the RTOS switches tasks, it disables interrupts for as long as 28 microseconds. This causes the motor interrupt to be delayed sometimes until interrupts are reenabled. This interrupt MUST NOT be delayed for any length of time!

I thought that the answer to this problem would be to set up the timer to trigger a fast interrupt (FIQ), since they have a higher priority than IRQs. So I need to set up Timer 2 to generate an FIQ. But I don't know much about setting up a timer other than the basic stuff, and I don't know how to get it to trigger a FIQ. Is there a code snippet somewhere that shows how it's done?

jgoril
Associate II
Posted on June 25, 2007 at 11:25

Hi. Probably, I will disappoint you...

Only external interrupt line INT0 (EXTIT) and watchdog global interrupt WATCHDOG can be used with FIQ line (see STR75x Family Reference Manual, p.104/436).

rbennett2
Associate II
Posted on June 25, 2007 at 15:21

I'm using EXTIT line 0 (TIM2_OC1). I've gotten it to the point where the timer generates an FIQ the first time but after reloading the timer in the FIQ handler, it never generates successive FIQs. Everything appears to be enabled but no FIQ.