Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-30964

Investigate to Fix the TAI by the LUT or Xenomai

    XMLWordPrintable

    Details

    • Story Points:
      1
    • Sprint:
      TSSW Sprint - Mar 14 - Mar 28, TSSW Sprint - Mar 28 - Apr 11
    • Team:
      Telescope and Site
    • Urgent?:
      No

      Description

      Investigate to fix the problem of CLOCK_TAI by using the look-up table or updating and building the Xenomai dual kernel. This will affect the low-level controller of hexapod and rotator.

      The story point here contains the DM-34359.

        Attachments

          Issue Links

            Activity

            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            In the EtherCat training, the lecturer suggested to leave the dual-kernel and use the linux real-time module directly by rebuilding the kernel. I think this is a good option to move forward. But this means part of code needs to be rewrite to replace the xenomai functions with the Linux native functions in RT module.

            Maybe use the CLOCK_MONOTONIC for hardware control. The CLOCK_TAI is only for the top-level of application.

            Show
            ttsai Te-Wei Tsai added a comment - - edited In the EtherCat training, the lecturer suggested to leave the dual-kernel and use the linux real-time module directly by rebuilding the kernel. I think this is a good option to move forward. But this means part of code needs to be rewrite to replace the xenomai functions with the Linux native functions in RT module. Maybe use the CLOCK_MONOTONIC for hardware control. The CLOCK_TAI is only for the top-level of application.
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            The rtalloc.c calls the native/heap.h in xenomai. --> call rt_heap_create(),
            rt_heap_alloc(), rt_heap_free(), and rt_heap_delete().

            The sys.c calls the alchemy/timer.h in Xenomai. --> call rt_timer_read() and use CLOCK_HOST_REALTIME.

            Show
            ttsai Te-Wei Tsai added a comment - - edited The rtalloc.c calls the native/heap.h in xenomai. --> call rt_heap_create() , rt_heap_alloc() , rt_heap_free() , and rt_heap_delete() . The sys.c calls the alchemy/timer.h in Xenomai. --> call rt_timer_read() and use CLOCK_HOST_REALTIME .
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            Xenomai does not support CLOCK_TAI yet:

            https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__cobalt__api__time.html#details

            The Linux kernel on summit is:

            [rotatoruser@rot-pxi-controller ~]$ uname -a
            Linux rot-pxi-controller.cp.lsst.org 3.18.20-ipipe #4 SMP Thu Apr 20 17:05:55 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux
            

            It should have the support of CLOCK_TAI already in linux kernel part:
            https://bugzilla.redhat.com/show_bug.cgi?id=1448822

            [root@b64863ee65c8 /]# grep -nr "CLOCK_TAI" /usr/xenomai/include/
            [root@b64863ee65c8 /]# grep -nr "CLOCK_TAI" /usr/include/        
            /usr/include/linux/time.h:58:#define CLOCK_TAI			11
            /usr/include/bits/time.h:81:#   define CLOCK_TAI			11
            

            Basically, the easiest way to use the CLOCK_TAI is to leave the Xenomai.

            Show
            ttsai Te-Wei Tsai added a comment - - edited Xenomai does not support CLOCK_TAI  yet: https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__cobalt__api__time.html#details The Linux kernel on summit is: [rotatoruser@rot-pxi-controller ~]$ uname -a Linux rot-pxi-controller.cp.lsst.org 3.18.20-ipipe #4 SMP Thu Apr 20 17:05:55 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux It should have the support of CLOCK_TAI already in linux kernel part: https://bugzilla.redhat.com/show_bug.cgi?id=1448822 [root@b64863ee65c8 /]# grep -nr "CLOCK_TAI" /usr/xenomai/include/ [root@b64863ee65c8 /]# grep -nr "CLOCK_TAI" /usr/include/ /usr/include/linux/time.h:58:#define CLOCK_TAI 11 /usr/include/bits/time.h:81:# define CLOCK_TAI 11 Basically, the easiest way to use the CLOCK_TAI is to leave the Xenomai.
            Show
            ttsai Te-Wei Tsai added a comment - - edited Review Getting Started with RTLinux . Watch A Checklist for Writing Linux Real-Time Applications .
            Hide
            ttsai Te-Wei Tsai added a comment -

            Create the DM-34369 for the following actin.

            Show
            ttsai Te-Wei Tsai added a comment - Create the DM-34369 for the following actin.
            Hide
            ttsai Te-Wei Tsai added a comment -

            Please help to review the ticket based on the comment. Thanks!

            Show
            ttsai Te-Wei Tsai added a comment - Please help to review the ticket based on the comment. Thanks!

              People

              Assignee:
              ttsai Te-Wei Tsai
              Reporter:
              ttsai Te-Wei Tsai
              Reviewers:
              Russell Owen
              Watchers:
              Russell Owen, Te-Wei Tsai, Tiago Ribeiro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.