Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

msec Interval task

I need to control some peripherals at a regular interval ( usec resolution). From what I've read, it looks like an ISR is the only way to go. Are there any examples of reasonably (i.e., an adequate interval interrupt is available) portable solutions to this problem? I fear a good portion of my code will end up in kernel space, with the userland portion simply IOCTL'ing commands/data in/out.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by mikewest@Oct 11 2005, 11:56 PM

    i need to control some peripherals at a regular interval ( usec resolution). from what i've read, it looks like an isr is the only way to go. are there any examples of reasonably (i.e., an adequate interval interrupt is available) portable solutions to this problem? i fear a good portion of my code will end up in kernel space, with the userland portion simply ioctl'ing commands/data in/out.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10315)

    --- quote end ---

    --- Quote End ---

    It&#39;s probably best to add your own timer in SOPCBuilder so you won&#39;t mess with any of the system timers. It&#39;s fairly easy to write your own kernel module with an ISR. I wrote mine with the help of lwn linux device drivers. third edition (http://lwn.net/kernel/ldd3/).

    Hope this helps.