Hi,

I asked for help about the topic "5kHz timer interrupt" yesterday and got
very helpful comments. I think I didn't describe my question clearly, so I
have to ask help again:

I am using linux 2.4.6-rmk1-rayl1 on a Cirrus CDB89712 demo board, the
processor core is ARM720T. My object is to drive a beeper with frequency
2.5kHz, which means I need to implement a square wave generator by software.
The relevant resources on this processor are:

1. timer 1:  seems not to be used by linux kernel, but once I tried to use
it, the kernel is hung up.

2. timer 2: used by the kernel to generate the 10ms "heartbeat".  I can
increase the HZ defined in <linux/param.h> from 100 to 2500 and recompile
the kernel, but this may cause problems to processes whose functions rely on
HZ and jiffies.

3 .500Hz fixed square wave generator, far too low for my purpose.

I was suggested to increase the timer 2 interrupt to 5kHz,  then grab the
interrupt service routine and redirect it to different functions: one branch
deals with the original kernel 10ms "heartbeat"(when an additional counter
which counts the 5kHz interrupt overflows) , another generates 5kHz square
wave. But I wonder this may require to modify the kernel.  Is there a way to
do this without touch the kernel?

Or is there just a very simple way to generate 2.5kHz square wave(on this
specific platform)?

Any comments will be greatly appreciated.

Song

Software Developer
Iders Engineering Inc
600A Clifton St.
Winnipeg, Manitoba  R3G 2X6 Canada
http://www.iders.ca


_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to