> On 09/19/2014 06:53 PM, Philippe Gerum wrote:
>> On 09/19/2014 06:11 PM, [email protected] wrote:
>>> Hello everyone,
>>> I'm currently working with Xenomai in my company's project using RTNet
>>> as
>>> realtime ethernet driver to communicate with Elmo card via EtherCAT
>>> protocol and SOEM as master library.
>>>
>>> I'm using Linux 3.8.13 patched with Xenomai 2.6.3.
>>>
>>> I'm debugging a simple test which is a cycle of send & receive data
>>> with a
>>> frequency of 1 kHz. The test runs fine for a quite long time (30 mins
>>> in
>>> average), but still throws runaway thread after a certain time.
>>>
>>> My loop is a periodic thread:
>>>
>>> rt_task_set_periodic(rt_task_self(), TM_NOW, 1000000);
>>> while(1){
>>> rt_task_wait_period();
>>> ec_send_processdata();     //SOEM function
>>> ec_receive_processdata();  //SOEM function
>>> }
>>>
>>> With SIGDEBUG & gdb, the error seems to start from clock_gettime (when
>>> ec_receive_processdata is called) with CLOCK_MONOTONIC, change to
>>> CLOCK_REALTIME reproduces the same issue. My processor is x86_64, I
>>> heard
>>> that the High Resolution Timer of Linux kernel is not supported for
>>> processor 64 bits, this could be the reason for such behavior?
>>>
>>
>> I never heard about the restriction you are referring to.
>>
>
> If you are referring to the deadlock issue when calling the regular
> glibc services such as gettimeofday/clock_gettime from rt mode, then
> this is not a 64bit specific issue. You need to call the clock_gettime()
> service from the Xenomai POSIX API, asking for CLOCK_HOST_REALTIME.
>
> --
> Philippe.
>

Hello,
I tried to call clock_gettime() with CLOCK_HOST_REALTIME, but my hardware
fall directly into error. If I understand correctly, CLOCK_HOST_REALTIME
is called from the POSIX skin, a.k.a secondary mode, while my application
need to run at primary mode, that's why it stops running right away. Using
CLOCK_MONOTONIC & CLOCK_REALTIME was fine. What is the main difference
between these timers?

Huy Cong VU



_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to