Processor: STM750 (ARM7)
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 FreeRTOS 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 tried setting up Timer 2 to generate an FIQ. But when I run the program, the FIQ is always active because the FIQ Pending bit won’t clear (interrupt signal always on?). An oscilloscope shows no activity on the GPIO line defined as the output from the timer.
Can anyone tell me how to simply set up a timer to generate an FIQ? I can’t find any documentation anywhere on this subject, and ST’s documentation doesn’t tell an ARM newbie like me what to do.