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.

xdc.runtime.Timestamp which timer is used by default?

Other Parts Discussed in Thread: SYSBIOS

Hi,

according to the sys/bios help - xdc.runtime.TimestampNull will be used if this line is added to the cfg file:

var Timestamp = xdc.useModule('xdc.runtime.Timestamp');

Although the docs state that this will always return 0 for a call to 

It actually seems to return valid values. My question is - for a C6670 which of the dsp timers is being used?
And is a valid xdc.runtime.ITimestampClient provided by default?
bios 6.32.04.49
xdctools 3.22.01.21
Thanks
  • It seems that the SYS/BIOS help is incorrect. Can you show me this reference?

    When a NON SYS/BIOS project is built, I believe that TimestampNull will be used.

    When SYS/BIOS is brought into a project with this line in the user's config script:

        var BIOS = xdc.useModule('ti.sysbios.BIOS');

    SYS/BIOS wires up an appropriate TimestampProvider delegate for the xdc.runtime.Timestamp module.

    In the C6670 case, the TimestampProvider delegate is

        ti.sysbios.family.c64p.TimestampProvider

    This TimestampProvider uses the C64+ core's internal 64 bit TSCH/TSCL counter as the timestamp source.

    Alan

  • Ian,

    Most current C6x devices use the Timestamp Counter registers built into the C6x core for this service and not one of the timers. This is a free-running counter that can be accessed via the TSCL and TSCH registers.

    You can find the specific software package for your device via the documentation in the ti.sysbios.family package:

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_32_04_49/exports/bios_6_32_04_49/docs/cdoc/index.html#ti/sysbios/family/package.html

    Click on the SYS/BIOS Delegates Usage link and then find your device. You will see the specific HW interrupt (Hwi), Cache, Timer and Timestamp modules named. In this case, it is ti.sysbios.family.c64p.TimestampProvider . You can find the source code for this in the <sysbios_install_dir>/packages/ti/sysbios/family/c64p directory.

    Mark

  • Thanks Mark.

    I eventually found the timestamp module for c64p and guessed this was being used. Stepping through the code confirmed this.

    As for the docs - I was looking at the bios6.chm : 

    SYS/BIOS 6.32.04.49 GA Release Notes

    Section was module xdc.runtime.Timestamp:

    This module provides xdc.runtime.ITimestampClient APIs for the xdc Runtime Support Library. Calls to these APIs are forwarded to a platform specific xdc.runtime.ITimestampProvider implementation.
    A user can attach their own ITimestampProvider module using the following config file command:
      xdc.runtime.Timestamp.SupportProxy = xdc.useModule("usersTimestampProvider");
    
    If no such SupportProxy initialization is done, the xdc.runtime.TimestampNull ITimestampProvider implementation, which provides null stubs for the APIs, will be attached by default.
    I f this was a doc in the xdctools area - I could understand the above statement. But not in sys/bios documentation.
    Thanks all. And seasons greetings :)