Skip to contentSkip to conversation

Advice on clock sources for xenomai rtdm driver

Xenomai-help Carlos Eduardo de Brito Novaes 2 participants 2 messages Jul 10, 2011 – Jul 11, 2011

lore
Share & tools
lore
#0 lore raw

Hello all.

I woud like to ask you some opinion about timers.
I am slowly working on a real time driver for a acquisition board. It can be configured for read up to 32 anaalog channels and has a internal timer that wil start the conversion on a programmed time (its a 8254 timer) or the PC ca send a command to start conversions to. Sadly, there is no interrupt generated by this board, so if using the internal timer the driver has to keep polling some io ports to check for data and if any, retrieve it.
If I can setup a (precise) timer to trigger an interrupt, so I can start the conversions and on a know time read back the data. But the interrupt rate would be about 1K or a bit more, so RTC would not be a good idea, I think. I also read about HPET but it seens to have issues with xenomai and also I read that for some reason, some interupts would be lost. Do you guys recommend me something? Should I stick with polling and set up some delays with usleep_range or there is a good timer on PC boards and weel supported with xenomai?

Sorry for the long post, and tanks.

Carlos Novaes.

#1 lore raw
Quoted 17 lines · Carlos Eduardo de Brito Novaes

Hello all.

I woud like to ask you some opinion about timers.
I am slowly working on a real time driver for a acquisition board. It can be configured for read up to 32 anaalog channels and has a internal timer that wil start the conversion on a programmed time (its a 8254 timer) or the PC ca send a command to start conversions to. Sadly, there is no interrupt generated by this board, so if using the internal timer the driver has to keep polling some io ports to check for data and if any, retrieve it.
If I can setup a (precise) timer to trigger an interrupt, so I can start the conversions and on a know time read back the data. But the interrupt rate would be about 1K or a bit more, so RTC would not be a good idea, I think. I also read about HPET but it seens to have issues with xenomai and also I read that for some reason, some interupts would be lost. Do you guys recommend me something? Should I stick with polling and set up some delays with usleep_range or there is a good timer on PC boards and weel supported with xenomai?

If you are writing an rtdm driver, why not using rtdm timers?
http://www.xenomai.org/documentation/xenomai-2.5/html/api/group__rtdmtimer.html

Signature · 1 line
                                                                Gilles.