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.

How to specify the timer id when use the timestamp and TimestampProvider?

Other Parts Discussed in Thread: SYSBIOS

Hi,

In this post,

http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/276243.aspx

I understand that Timer 8 thru 15 are global timers for C6678.

And I use the SYSBIOS6.34.02.18

Now I want to use timestamp or TimestampProvider to measure the delta_time between send by (core0) and receive(core1-7).

How Can I specify the timer id for the timestamp and TimestampProvider?

And Could you teach me what is the difference between timestamp and TimestampProvider?

Thanks!

 

  • Yi,

    the Timestamp module on the C6678 just uses the baseline clock (TSCL and TSCH).

  • Hi,

    A couple of things I should point out

    1.  SYSBIOS does not have suppor for using the Timer64 with timestamp.  Timestamp is done via the TSCL/TSCH registers

    2.  I see 2 alternatives that you can do.

    2A. You specify who the "owner" of the Shared Timer is via config.  For example:

        var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer');
        // sets core 1 to init and release Timer 4.
        Timer.timerSettings[4].ownerCoreId = 1;

    Then at runtime, you can create create the shared timer on the cores that plan on using it.  Only the "owner" core will initialize and realse the timer.  I suggest you give it the biggest period possible since you only need it for time and not interrupts.

    2B.  Same as 2A for the "owner" core, but for the other cores you can try just reading the Timer register instead of actually creating a Timer.

    Find the base address of the Timer.  The count register is the 4th word.
    For example:  Assuming Timer8.  Base address is 0x02280000.  TIM12 count is offset 0x10 and TIM34 count is offset 0x14

        UInt32 count12;
        volatile Bits32 *timer8count12 = (volatile Bits32 *)(0x02280010);
        count12 = timer8count12;

    I have not myself tested this code, but I think it should work.

    Judah