Skip to contentSkip to conversation

timer Q : request callback 2 ms after interrupt to drop RTS on RS485

DISCUSSION Philippe De Muyter 1 participant 1 message Dec 15, 2010

lore
Share & tools
lore
#0 lore raw

Hello linux timer experts

I need to arm a timer to expire about 1.5 ms after an interrupt.

How can I do that ?

Thanks in advance

Philippe

More context for the interested ones : I need to deactivate the RTS signal on a serial line, but I get only TxREADY interrupts, not TxEMPTY ones. Knowing the hardware and baud rate involved I know how much time is needed to flush the last bytes and bits and I need to drop RTS as soon as the last bit is sent.
Of course, in the timer callback I'll do a small amount of busy waiting to be sure TxEMPTY state is reached.

Signature · 2 lines
Philippe De Muyter  phdm at macqel dot be  Tel +32 27029044
Macq Electronique SA  rue de l'Aeronef 2  B-1140 Bruxelles  Fax +32 27029077