Re: 1.3msec timer needed - best way ?

From: David Woodhouse (dwmw2@infradead.org)
Date: Thu May 04 2000 - 12:56:10 EDT

  • Next message: Rask Ingemann Lambertsen: "Re: [WARNING] devfs mount default changed"

    pbd@Op.Net said:
    > I need to write 2 bytes to a device every 1.3msec (+/- 0.3msec). I
    > know how to use the kernel timer system, and I know how to use the
    > RTC. But I don't know how I can do this on time, because its not a
    > multiple of 2, and the RTC requires this.

    > Does anyone have any ideas ?

    If you don't want to use RTLinux (why not?) you could just shift the system
    timer to use the RTC - you can happily change HZ to be a power of two, and
    then you're free to use the 8253 timer for whatever you like.

    Alternatively, you could use the approach that the PC speaker driver does -
    hook the 8253 timer, increase its frequency to whatever frequency you desire
    - preferably a precise multiple of HZ - then call the old timer tick routine
    once in each <n> times your new routine is triggered.

    --
    dwmw2
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Thu May 04 2000 - 15:03:11 EDT