[En-Nut-Discussion] Timeouts in Microseconds

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sat Apr 6 12:43:15 CEST 2013


>>>>> "Hugo" == Hugo Simon <hugo.simon at gmx.de> writes:

    Hugo> Hello, for a serial bus protocol I have to find out if the gap
    Hugo> between two bytes was more that 60 microseconds.  But the NutOS
    Hugo> timers run at milliseconds interval.  Can I somehow measure times
    Hugo> lower that milliseconds via NutOS calls? Or should I build an own
    Hugo> timer ISR for that? Which timer can I use without interfering with
    Hugo> NutOS?

Measuring microseconds is a hard task without  hardware support. Can you use
the capture facility. Otherwise use a pin toggle interrupt and have a
counter counting at the needed resolution and sample that timer. One Cortex
cpus, the systick timer is such a timer always running with high resolution.

Bye
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list