This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using DMTimer1_1ms in SYS/BIOS

Other Parts Discussed in Thread: SYSBIOS

Hi,

Is it possible to use DMTimer1_1ms for the SYS/BIOS Systick?
I don't know what Timer ID should be used in config file in order to use DMTimer1_1ms.

Currently we are using in the default mode and it seems DMTimer2 -(ID 5) is used
by the SYS/BIOS by default(1ms).

Target board: Beaglebone
SYS/BIOS:bios_6_40_01_15

Our application needs accurate data logging and we are using Systick (Clock_getTicks()) as a reference time,
but it is not accurate enough, on a average for every "1 second" time there is an extra delay of 7ms.
note:; this time is compared with the computer time.

Meanwhile we tried to check the DMTimer's accuracy without SYS/BIOS and it was
quite accurate (for every "1 second" there was an addition of 0.5ms).

We believe this additional delay or inaccuracy in the Systick is something related to the
SYS/BIOS (may be the interrupt latency?).
Could you please let me know if this is a know behaviour and if there is any solution.

Best Regards.
Prad

  • Hi Prad,

    Unfortunately, SYS/BIOS does not support using DMTimer1_1ms.  If it is a hard requirement, you can create your own Timer driver and use it as the Clock module source.  Details on how to do this are provided in the SYS/BIOS cdoc, specifically the ti.sysbios.knl.Clock module (SYS/BIOS cdoc).

    Regards,

    -- Emmanuel

  • Hi Emmanuel,

    Thank you for the response.

    Meanwhile, I would like to know how to get a accurate SYS/BIOS Systick.

    As mentioned above the timer(DMTimer2) used for the Systick has a delay of 0.5ms for every one second.
    Whereas the Systick output is 7ms for every one second.

    With our tests, we believe even if we use a accurate timer source, SYS/BIOS's Systick won't be accurate enough..
    I am curious to know the reason behind this delay or inaccuracy of Systick?

    Best Regards
    Prad

  • Hi Prad,

    What mechanism are you using to measure the timer time delay?  Are you measuring the time between two consecutive Hwi's?  Are you toggling a GPIO and seeing the output on an oscilloscope?  

    SYS/BIOS will add some delay from the time a timer Hwi is triggered to when a Hwi function is running (thread safety & context switching requirements).  But the delay should be in hundredths of microseconds not milliseconds.  Do you have any other high priority Tasks or Swi's running while you are performing your measurements?

    Regards,

    -- Emmanuel

  • Hi Emmanuel,

    Thank you for the reply.
    We were able to solve the issue for time being.

    We are using the Clock_getTicks() and comparing that data with the
    Computer's time (win32 time API).

    We were able to get nearly accurate systicks by changing the DMtimer's clock
    source from 32.768Khz(default) to faster clock CLK_MOSC(24MHz).
    Now the delay is reduced to 0.12ms for every one second.

    But we still don't understand the exact reason, for the delay with the default clock
    source 32.768Khz.

    Best Regards
    Prad