The timer fiq handler is not working yet, and I need some help.
The timer handler toggles a GPIO pin and should be visible in the logic
analyzer screen. Nothing happens. The irq version of this timer works
correctly and shows the signal modulation on the logic analyzer. The fiq
version is not (yet ;) ) working.
I am writing to ask for help hoping that it is not excessive to expect
someone to give an eye to the code and possibly try to reproduce the
sutuation. Attached are the files that compose the fiq timer test along with
the Makefile and the output of the timer install and remove. Ant suggestion
If you need more information from me, please let me know.
Output from make:
make: Entering directory
warning: label ‘error1’ defined but not used
warning: unused variable ‘i’
warning: unused variable ‘ret’
warning: unused variable ‘fiq_len’
Building modules, stage 2.
MODPOST 1 modules
make: Leaving directory
Output from insmod:
root@...:~# insmod fiq-timer1-hw.ko
gptimer test: starting module
base_gpio = 0xfb058000, base_intcps = 0xfa200000
Back from timer_get_fclk()
Back from get_rate()
Back from write_counter 0()
Back from set_match 30()
Back from set_int_enable()
fiq-timer3: enable_fiq: will set mem = 0xfa200198
fiq-timer3: MIR irq=38 = 0x1dffa7
fiq-timer3: ~31 = 0xffffffe0
fiq-timer3: (irq & ~31) = 0x20
fiq-timer3: (irq - (irq & ~31) ) = 0x6
fiq-timer3: ( 1 << (irq - (irq & ~31)) = 0x40
fiq-timer3: ~( 1 << (irq - (irq & ~31)) = 0xffffffbf
fiq-timer3: nuevo mir1 = 0x1dffa7
Back from enable_fiq_loc()
Back from timer_start()
gptimer test: GP Timer initialized and started (13000000 Hz, IRQ 38)
Output from rmmod:
root@...:~# rmmod fiq-timer1-hw.ko
gptimer test: cleanup called
> Thank you Dave,
> I created the patch for Kbuild and then for arch/arm/include/asm/fiq.h to
> #define FIQ_START 0x100
> Then I did bitbake -clean and bitbake - rebuild of the linux-omap3-2.6.33
> The module loads without complaining for the fiq symbols.
> Though the timer handler is not being called. I will work on debugging
> tomorrow and post the results as soon as I get any.
> Elias Crespin
> ecrespin wrote:
>> I have a working dmtimer based interrupt timer handler, based on Adam J
>> Kunen's code published http://www.kunen.org/uC/beagle/omap_dmtimer.html
>> here . I use it to send time synchronized commands to a stepper motor
>> driver connected to the Overo through the SPI1 interface. This way the
>> software can control the direction, speed and moment in time of the
>> motor's movement. It works nicely and in general very smoothly. I
>> attached a simplified version (without all the spi stuff) of the timer
>> I am using an Overo Air with linux 2.6.33 from sakoman, generated with
>> bitbake overo-console-image and then modified with bitbake -c rebuild
>> The problem:
>> If I generate load in the Overo while moving the motor (i.e. send a tcp
>> request to the overo or find a file on all of the Overo's file system)
>> the motor flickers and the smoothness of the motor's movement is
>> affected.My requirement is to be able to have the motor run smoothly even
>> under these load conditions on the Overo.
>> I have solved this in the past on the Verdex platform by using a FIQ
>> based timer to give the timer interrupt the highest priority and avoid
>> being left waiting for processor which is what generates the flickering.
>> It worked very well. This code was based on the pxaRC code published
>> http://www.pabr.org/pxarc/doc/pxarc.en.html here by Pascal.
>> That is why I am going for a FIQ timer on the Overo and I am stuck. I
>> studied the fiq based drivers in spi_s3c24xx.c and mx1_camera.c in the
>> overo linux sources. They seem good references for what I want to do with
>> timer, nevertheless, this examples require the fiq module to be
>> configured into the kernel which I will need for my fiq timer as well. By
>> looking at the Makefiles, the kernel option to install the fiq module is
>> CONFIG_FIQ, but I can not find it or set it. I tried appending it into
>> defconfig or through bitbake -c menuconfig linux-omap3-2.6.33 and the
>> option does not appear or is never set and thus the fiq module does not
>> get compiled.
>> Is someone in the forum able to give me steps on how to activate the fiq
>> kernel option ? Does someone have a copy of fiq based timer code that is
>> willing to share with all of us ?
>> Thank you very much
>> http://old.nabble.com/file/p29235157/timer3.c timer3.c
-- Elias Crespin
View this message in context: http://old.nabble.com/timer-FIQ-and-CONFIG_FIQ-tp29235157p29256697.html
Sent from the Gumstix mailing list archive at Nabble.com.