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.

RTOS/AM6548: How to use TI-BIOS TimestampProvider for R5F core?

Part Number: AM6548
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hello,

I want to use the TimestampProvider with TI-BIOS in the R5F core of AM65xx

What do I have to include in my bios.cfg file?

I already tried:

//var TimestampProvider = xdc.useModule('ti.sysbios.family.arm.v8a.TimestampProvider'); // only A53
//var TimestampProvider = xdc.useModule('ti.sysbios.family.arm.v7r.TimestampProvider'); // xdc.MODULE_NOT_FOUND
//var TimestampProvider = xdc.useModule('ti.sysbios.timers.dmtimer.TimestampProvider'); // unresolved ti_sysbios_family_arm_v8a_TimestampProvider_get32__E
//var TimestampProvider = xdc.useModule('ti.sysbios.timers.timer64.TimestampProvider'); // Error: Timers unsupported on device!

but nothing is working. TI-BIOS Help in CCSv8 lists a lot of possibilities, but not the right one.

Best regards,

Ruediger

  • Hi Ruediger,

    It seems the TimestampProvider module is not supported yet for Cortex R5F, check: ~/ti/bios_6_73_00_12/packages/ti/sysbios/family/arm/v7r. There is no TimestampProvider .c, .h, .xdc, .xs & .asm files.  For reference if you list ~/ti/bios_6_73_00_12/packages/ti/sysbios/family/arm/a15 you will see:

    Best Regards,
    Yordan

  • Yes, I found now another solution which seem to work:

    In the TIBIOS .cfg file I have nothing special and in the source code I use

    // Timestamp for R5F core
    #include <xdc/runtime/Timestamp.h>
    #define TIMESTAMP_GETFREQ(x) Timestamp_getFreq(x)
    #define TIMESTAMP_GET32() Timestamp_get32()

    Then when building the project, the file src/sysbios/a15_TimestampProvider_asm.obj  is created, but it seems to work with the R5F core.

    -> Timestamp_getFreq() delivers 400 MHz and the call to Timestamp_get32() the according timestamp.

    Further investigation 

    The content of C:\ti\bios_6_73_00_12\packages\ti\sysbios\family\arm\a15\TimestampProvider_asm.asm   is

    ti_sysbios_family_arm_a15_TimestampProvider_get32__E:
    .asmfunc
    mrc p15, #0, r0, c9, c13, #0

    bx lr
    .endasmfunc

    and I found in infocenter.arm.com/.../DDI0460C_cortexr5_trm.pdf

    6.3.7 c9, Cycle Count Register The PMCCNTR Register characteristics are: Purpose Counts clock cycles.
         MRC p15, 0, , c9, c13, 0 ; Read PMCCNTR Register 
         MCR p15, 0, , c9, c13, 0 ; Write PMCCNTR Register

    So this A15 code is compatible with R5F

    Best regards, Ruediger