|
Re: QNX 8 : ClockPeriod() can no longer be used to set clock period
|
10/07/2024 9:54 AM
post122616
|
Re: QNX 8 : ClockPeriod() can no longer be used to set clock period
Hi Elad,
your clarification explains, why my latency/jitter tests, I made with every QNX version since 6.3, produces a very big
jitter under QNX 8.
e.g.:
For hard real time sampling controller software I use code like this:
loop:
...
TimerTimeout(CLOCK_MONOTONIC, _NTO_TIMEOUT_NANOSLEEP | TIMER_ABSTIME, NULL, &nsTime, NULL);
nsTime += nsec_sampling_period
...
goto loop
nsec_sampling_period has to be a multiple of the clock period of the system, to get rid of rounding jitters.
With this approach, I measure a worst case jitter < 10 us, sampling at the highest thread prio in the system.
BTW. on nowadays fast embedded systems a clock period of 100 us is no problem.
e.g. Our EtherCAT Stack is sometimes used with a 200us cycle for high speed motion controllers in the real world.
To get a low jitter < 10 us under QNX 8, I have to use a sampling period > ca. 3000 us at the moment.
How is it possible, to reduce this 1 ms default, you mentioned, to a lower value, e.g. 100 us ?
Thanks
Michael
|
|
|
|
Re: QNX 8 : ClockPeriod() can no longer be used to set clock period
|
10/10/2024 4:13 AM
post122620
|
Re: QNX 8 : ClockPeriod() can no longer be used to set clock period
Hello,
To be able to adjust the timer tolerance between 0 and the clock period, I read that I need to set the
PROCMGR_AID_HIGH_RESOLUTION_TIMER ability.
So, on my test board (Raspberry Pi4), I tried:
int ret = procmgr_ability(0, PROCMGR_AID_HIGH_RESOLUTION_TIMER);
But my process is getting an exception:
terminated SIGSEGV code=1 fltno=11 ip=00000058f817990c mapaddr=000000000006090c ref=0000003292315000
Did I missed something?
Thanks.
|
|
|