TWR-LS1021A High Resolution Timer Support & RT-preempt

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TWR-LS1021A High Resolution Timer Support & RT-preempt

Jump to solution
1,606 Views
thomast
Contributor I

Hi,

I tried to figure out the realtime capability of the board using cyclictest. But I was not able to enable the High Resolution Timers with the QorIQ-SDK-V1.7-20141218-yocto. I enabled the kernel config for "High Resolution Timer Support" & "Fully Preemptible Kernel" support. Also I tried various other kernel settings, but every now kernel offers a resolution of 1ms, see below. Do you have a hint what to check next?

Best regards

Thomas

root@ls1021atwr:~# cat /proc/timer_list

Timer List Version: v0.7

HRTIMER_MAX_CLOCK_BASES: 4

now at 349411724560 nsecs

cpu: 0

clock 0:

  .base:       80d5b5a8

  .index:      0

  .resolution: 1000000 nsecs

  .get_time:   ktime_get

  .offset:     0 nsecs

active timers:

#0: def_rt_bandwidth, sched_rt_period_timer, S:01, start_bandwidth_timer, ksoftirqd/0/3

# expires at 350000000000-350000000000 nsecs [in 588275440 to 588275440 nsecs]

#1: <bf87dac8>, hrtimer_wakeup, S:01, hrtimer_start_range_ns, init/1

# expires at 353437111520-353442111517 nsecs [in 4025386960 to 4030386957 nsecs]

#2: <b8c8c968>, it_real_fn, S:01, hrtimer_start, syslogd/1129

# expires at 357656081120-357656081120 nsecs [in 8244356560 to 8244356560 nsecs]

clock 1:

  .base:       80d5b5e8

  .index:      1

  .resolution: 1000000 nsecs

  .get_time:   ktime_get_real

  .offset:     0 nsecs

...

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,212 Views
lunminliang
NXP Employee
NXP Employee

Hi,

For the PREEMPT_RT, this feature is not support in SDK v1.7 for LS1021A, see below, the part 1.6 Feature Support:

Freescale Technical Information Center

As some functions are still under test, the team will try to support this feature in SDK v1.8. (not for sure so far )

So please use default PREEMPT configuration for ls1021a, and enable 'High Resolution Timer' to have a test.

If still not work, please share the kernel .config file.


Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
1,213 Views
lunminliang
NXP Employee
NXP Employee

Hi,

For the PREEMPT_RT, this feature is not support in SDK v1.7 for LS1021A, see below, the part 1.6 Feature Support:

Freescale Technical Information Center

As some functions are still under test, the team will try to support this feature in SDK v1.8. (not for sure so far )

So please use default PREEMPT configuration for ls1021a, and enable 'High Resolution Timer' to have a test.

If still not work, please share the kernel .config file.


Have a great day,
Lunmin

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,212 Views
stefannickl
Contributor II

Hi Lunmin,

I've run into a similar issue, albeit with the standard Linux 4.4.19-rt27 kernel, also patched to support the TQ Systems platform for the LS1021A.

Following http://elinux.org/High_Resolution_Timers, I'm not getting high-resolution timers and only ~10ms resolution (=jiffy period).

So far I've tried PREEMPT_RT_FULL, PREEMPT__LL and PREEMPT_LAZY, each time cyclictest warns about unavailable high resolution timers and gives a 1-10ms result.

Do you have any advice how this could be solved?

You mentioned that this is a work in progress, can you please provide an update?

Maybe you could also comment on the "sdk" situation in general. I'm aware of the git repositories at http://git.freescale.com/git/cgit.cgi/, but according to the FAE the platform work by Freescale/NXP is now pushed to mainline instead, and the BSP by TQ Systems is also based on the standard kernel.

Best regards,

Stefan

0 Kudos