[En-Nut-Discussion] What if NutSleep() Time is below 62.5ms(1 Clock Tick)
Ole Reinhardt
ole.reinhardt at kernelconcepts.de
Thu Apr 26 12:59:24 CEST 2007
Hello,
> I have to send 128Bytes of data when PC requests it from
Microocntroller.
> I need to know how can i calclate the time of sending 128 Bytes of
Data.(do i need oscilloscope?) I need this because i want my other
thread to sleep for just that amount of milli seconds.
> I think i can use NutThreadYield() as well.
> what will happen if i specify NutSleep(30), which(30ms) is less than
1 Clock Tick (62.5ms).
What in detail you write as application? I can't see a reason to sleep
in one thread when sending data in another one.
Normaly a 128 Byte packet should be send in one chunk so the time needed
to send the data depends on the linespeed of your ethernet (10 MBit with
ethernut 1.3, 10 or 100 MBit for newer versions). This only holds for
the physical layer.
The time, the logical layer needs to send the data depends on a lot of
factors. Like ack response time from pc and so on.
You could use NutGetMillis to calculate the time needed or start a timer
before sending the data and read back the value when the transmission is
completed.
Best regards,
Ole Reinhardt
--
kernel concepts GbR Tel: +49-271-771091-14
Inh. Faerber & Kirchner Fax: +49-271-771091-19
Sieghütter Hauptweg 48 Mobil: +49-177-7420433
D-57072 Siegen UstID: DE 205 648 898
More information about the En-Nut-Discussion
mailing list