module ti.sysbios.family.arm.da830.TimestampProvider

Provides.da830 specific timestamp APIs to xdc.runtime.Timestamp

Uses the iceCrusher Benchmark counters. [ more ... ]
C synopsis target-domain sourced in ti/sysbios/family/arm/da830/TimestampProvider.xdc
#include <ti/sysbios/family/arm/da830/TimestampProvider.h>
Functions common to all ITimestamp modules
Bits32 
Void 
Void 
Functions common to all target modules
Typedefs
typedef enum
typedef struct
Constants
extern const Assert_Id 
extern const Assert_Id 
extern const UInt 
Variables
TimestampProvider_iceRegs// ; // linked as extern ti_sysbios_family_arm_da830_TimestampProvider_iceRegs
 
DETAILS
Uses the iceCrusher Benchmark counters.

Calling Context

Function Hwi Swi Task Main Startup
get32 Y Y Y Y N
get64 Y Y Y Y N
getFreq Y Y Y Y N
Definitions:
  • Hwi: API is callable from a Hwi thread.
  • Swi: API is callable from a Swi thread.
  • Task: API is callable from a Task thread.
  • Main: API is callable during any of these phases:
    • In your module startup after this module is started (e.g. TimestampProvider_Module_startupDone() returns TRUE).
    • During xdc.runtime.Startup.lastFxns.
    • During main().
    • During BIOS.startupFxns.
  • Startup: API is callable during any of these phases:
    • During xdc.runtime.Startup.firstFxns.
    • In your module startup before this module is started (e.g. TimestampProvider_Module_startupDone() returns FALSE).
 
enum TimestampProvider_CountType

CountType

C synopsis target-domain
typedef enum TimestampProvider_CountType {
    TimestampProvider_CountType_CYCLES,
    // count cycles
    TimestampProvider_CountType_INSTRUCTIONS
    // count instructions
} TimestampProvider_CountType;
 
VALUES
CountType_CYCLES — Timestamp is in cycles.
CountType_INSTRUCTIONS — Timestamp is in instructions.
 
struct TimestampProvider_IceCrusherRegs
C synopsis target-domain
typedef struct TimestampProvider_IceCrusherRegs {
    UInt32 VER;
    // 0x00 Revision
    UInt32 DBGCFG;
    // 0x04 Debug Config
    UInt32 DBGCNTL;
    // 0x08 Debug Control & Status
    UInt32 RES_0C;
    // 0x0C Reserved
    UInt32 TRIGCNTL;
    // 0x10 Trigger Control
    UInt32 RSTCNTL;
    // 0x14 Reset Control
    UInt32 THRDIDCLM;
    // 0x18 Thread ID Claim
    UInt32 THRDID;
    // 0x1c Thread ID
    UInt32 INTCNTL;
    // 0x20 Interrupt Control
    UInt32 ETMCNTL;
    // 0x24 ETM Control
    UInt32 ETMPID;
    // 0x28 ETM Process ID
    UInt32 TEST;
    // 0x2C Test
    UInt32 SWBRKCTL;
    // 0x30 Software Breakpoint Control
    UInt32 SWBRKVAL;
    // 0x34 Software Breakpoint Value
    UInt32 RES_38;
    // 0x38 Reserved
    UInt32 RES_3C;
    // 0x3C Reserved
    UInt32 BCNT0CTRL;
    // 0x40 Benchmark Counter 0 Control
    UInt32 BCNT0;
    // 0x44 Benchmark Counter 0
    UInt32 RES_48;
    // 0x48 Reserved
    UInt32 RES_4C;
    // 0x4C Reserved
    UInt32 BCNT1CTRL;
    // 0x50 Benchmark Counter 1 Control
    UInt32 BCNT1;
    // 0x54 Benchmark Counter 1
    UInt32 RES_58[10];
    // 0x58 - 0x7C Reserved
    UInt32 HWBRK0CTL;
    // 0x80 Hardware Breakpoint 0 Control
    UInt32 HWBRK0ADR;
    // 0x84 Hardware Breakpoint 0 Address
    UInt32 HWBRK0ADRMASK;
    // 0x88 Hardware Breakpoint 0 Address Mask
    UInt32 RES_8C;
    // 0x8C Reserved
    UInt32 HWBRK1CTL;
    // 0x90 Hardware Breakpoint 1 Control
    UInt32 HWBRK1ADR;
    // 0x94 Hardware Breakpoint 1 Address
    UInt32 HWBRK1ADRMASK;
    // 0x98 Hardware Breakpoint 1 Address Mask
    UInt32 RES_9C;
    // 0x9C Reserved
    UInt32 HWBRK2CTL;
    // 0xA0 Hardware Breakpoint 2 Control
    UInt32 HWBRK2ADR;
    // 0xA4 Hardware Breakpoint 2 Address
    UInt32 HWBRK2ADRMASK;
    // 0xA8 Hardware Breakpoint 2 Address Mask
    UInt32 RES_AC;
    // 0xAC Reserved
    UInt32 HWBRK3CTL;
    // 0xB0 Hardware Breakpoint 3 Control
    UInt32 HWBRK3ADR;
    // 0xB4 Hardware Breakpoint 3 Address
    UInt32 HWBRK3ADRMASK;
    // 0xB8 Hardware Breakpoint 3 Address Mask
    UInt32 RES_BC[14];
    // 0xBC - 0xF0 Reserved
    UInt32 OS_LOCKSTS;
    // 0xF4 OS Lock Status
    UInt32 OS_LOCK;
    // 0xF8 OS Lock
    UInt32 DCON;
    // 0xFC DCON Register
} TimestampProvider_IceCrusherRegs;
 
 
config TimestampProvider_A_counterInUse  // module-wide

Assert when configured benchmark counter is owned by CCS

C synopsis target-domain
extern const Assert_Id TimestampProvider_A_counterInUse;
 
 
config TimestampProvider_A_intControlInUse  // module-wide

Assert if interrupt control register is owned by CCS

C synopsis target-domain
extern const Assert_Id TimestampProvider_A_intControlInUse;
 
 
config TimestampProvider_benchmarkCounterId  // module-wide

ICECrusher Benchmark Counter id. 0 or 1. Default is 1

C synopsis target-domain
extern const UInt TimestampProvider_benchmarkCounterId;
 
 
config TimestampProvider_countType  // module-wide

Timestamp count type. Default is CYCLES. CountType_INSTRUCTIONS only supported on benchmarkCounterId 1!!!

C synopsis target-domain
extern const TimestampProvider_CountType TimestampProvider_countType;
 
 
extern TimestampProvider_iceRegs
C synopsis target-domain
TimestampProvider_IceCrusherRegs TimestampProvider_iceRegs; // linked as extern ti_sysbios_family_arm_da830_TimestampProvider_iceRegs
 
 
TimestampProvider_get32()  // module-wide

Return a 32-bit timestamp

C synopsis target-domain
Bits32 TimestampProvider_get32();
 
RETURNS
Returns a 32-bit timestamp value. Use getFreq to convert this value into units of real time.
Returns a 32-bit timestamp value. Use getFreq to convert this value into units of real time.
SEE
 
TimestampProvider_get64()  // module-wide

Return a 64-bit timestamp

C synopsis target-domain
Void TimestampProvider_get64(Types_Timestamp64 *result);
 
ARGUMENTS
result — pointer to 64-bit result
This parameter is a pointer to a structure representing a 64-bit wide timestamp value where the current timestamp is written.
If the underlying hardware does not support 64-bit resolution, the hi field of result is always set to 0; see xdc.runtime.Types.Timestamp64. So, it is possible for the lo field to wrap around without any change to the hi field. Use getFreq to convert this value into units of real time.
pointer to 64-bit result
This parameter is a pointer to a structure representing a 64-bit wide timestamp value where the current timestamp is written.
If the underlying hardware does not support 64-bit resolution, the hi field of result is always set to 0; see xdc.runtime.Types.Timestamp64. So, it is possible for the lo field to wrap around without any change to the hi field. Use getFreq to convert this value into units of real time.
SEE
 
TimestampProvider_getFreq()  // module-wide

Get the timestamp timer's frequency (in Hz)

C synopsis target-domain
Void TimestampProvider_getFreq(Types_FreqHz *freq);
 
ARGUMENTS
freq — pointer to a 64-bit result
This parameter is a pointer to a structure representing a 64-bit wide frequency value where the timer's frequency (in Hz) is written; see xdc.runtime.Types.FreqHz. This function provides a way of converting timestamp values into units of real time.
pointer to a 64-bit result
This parameter is a pointer to a structure representing a 64-bit wide frequency value where the timer's frequency (in Hz) is written; see xdc.runtime.Types.FreqHz. This function provides a way of converting timestamp values into units of real time.
SEE
Module-Wide Built-Ins

C synopsis target-domain
Types_ModuleId TimestampProvider_Module_id();
// Get this module's unique id
 
Bool TimestampProvider_Module_startupDone();
// Test if this module has completed startup
 
IHeap_Handle TimestampProvider_Module_heap();
// The heap from which this module allocates memory
 
Bool TimestampProvider_Module_hasMask();
// Test whether this module has a diagnostics mask
 
Bits16 TimestampProvider_Module_getMask();
// Returns the diagnostics mask for this module
 
Void TimestampProvider_Module_setMask(Bits16 mask);
// Set the diagnostics mask for this module
 
Configuration settings sourced in ti/sysbios/family/arm/da830/TimestampProvider.xdc
var TimestampProvider = xdc.useModule('ti.sysbios.family.arm.da830.TimestampProvider');
module-wide constants & types
 
    var obj = new TimestampProvider.IceCrusherRegs// ;
        obj.VER// 0x00 Revision = UInt32  ...
        obj.DBGCFG// 0x04 Debug Config = UInt32  ...
        obj.DBGCNTL// 0x08 Debug Control & Status = UInt32  ...
        obj.RES_0C// 0x0C Reserved = UInt32  ...
        obj.TRIGCNTL// 0x10 Trigger Control = UInt32  ...
        obj.RSTCNTL// 0x14 Reset Control = UInt32  ...
        obj.THRDIDCLM// 0x18 Thread ID Claim = UInt32  ...
        obj.THRDID// 0x1c Thread ID = UInt32  ...
        obj.INTCNTL// 0x20 Interrupt Control = UInt32  ...
        obj.ETMCNTL// 0x24 ETM Control = UInt32  ...
        obj.ETMPID// 0x28 ETM Process ID = UInt32  ...
        obj.TEST// 0x2C Test = UInt32  ...
        obj.SWBRKCTL// 0x30 Software Breakpoint Control = UInt32  ...
        obj.SWBRKVAL// 0x34 Software Breakpoint Value = UInt32  ...
        obj.RES_38// 0x38 Reserved = UInt32  ...
        obj.RES_3C// 0x3C Reserved = UInt32  ...
        obj.BCNT0CTRL// 0x40 Benchmark Counter 0 Control = UInt32  ...
        obj.BCNT0// 0x44 Benchmark Counter 0 = UInt32  ...
        obj.RES_48// 0x48 Reserved = UInt32  ...
        obj.RES_4C// 0x4C Reserved = UInt32  ...
        obj.BCNT1CTRL// 0x50 Benchmark Counter 1 Control = UInt32  ...
        obj.BCNT1// 0x54 Benchmark Counter 1 = UInt32  ...
        obj.RES_58// 0x58 - 0x7C Reserved = UInt32[10]  ...
        obj.HWBRK0CTL// 0x80 Hardware Breakpoint 0 Control = UInt32  ...
        obj.HWBRK0ADR// 0x84 Hardware Breakpoint 0 Address = UInt32  ...
        obj.HWBRK0ADRMASK// 0x88 Hardware Breakpoint 0 Address Mask = UInt32  ...
        obj.RES_8C// 0x8C Reserved = UInt32  ...
        obj.HWBRK1CTL// 0x90 Hardware Breakpoint 1 Control = UInt32  ...
        obj.HWBRK1ADR// 0x94 Hardware Breakpoint 1 Address = UInt32  ...
        obj.HWBRK1ADRMASK// 0x98 Hardware Breakpoint 1 Address Mask = UInt32  ...
        obj.RES_9C// 0x9C Reserved = UInt32  ...
        obj.HWBRK2CTL// 0xA0 Hardware Breakpoint 2 Control = UInt32  ...
        obj.HWBRK2ADR// 0xA4 Hardware Breakpoint 2 Address = UInt32  ...
        obj.HWBRK2ADRMASK// 0xA8 Hardware Breakpoint 2 Address Mask = UInt32  ...
        obj.RES_AC// 0xAC Reserved = UInt32  ...
        obj.HWBRK3CTL// 0xB0 Hardware Breakpoint 3 Control = UInt32  ...
        obj.HWBRK3ADR// 0xB4 Hardware Breakpoint 3 Address = UInt32  ...
        obj.HWBRK3ADRMASK// 0xB8 Hardware Breakpoint 3 Address Mask = UInt32  ...
        obj.RES_BC// 0xBC - 0xF0 Reserved = UInt32[14]  ...
        obj.OS_LOCKSTS// 0xF4 OS Lock Status = UInt32  ...
        obj.OS_LOCK// 0xF8 OS Lock = UInt32  ...
        obj.DCON// 0xFC DCON Register = UInt32  ...
module-wide config parameters
        msg: "A_counterInUse: Benchmark counter already claimed."
    };
        msg: "A_intCOntrolInUse: iceCrusher Int Control Register already claimed."
    };
 
 
 
enum TimestampProvider.CountType

CountType

Configuration settings
values of type TimestampProvider.CountType
    const TimestampProvider.CountType_CYCLES;
    // count cycles
    const TimestampProvider.CountType_INSTRUCTIONS;
    // count instructions
 
VALUES
CountType_CYCLES — Timestamp is in cycles.
CountType_INSTRUCTIONS — Timestamp is in instructions.
C SYNOPSIS
 
struct TimestampProvider.IceCrusherRegs
Configuration settings
var obj = new TimestampProvider.IceCrusherRegs;
 
    obj.VER = UInt32  ...
    // 0x00 Revision
    obj.DBGCFG = UInt32  ...
    // 0x04 Debug Config
    obj.DBGCNTL = UInt32  ...
    // 0x08 Debug Control & Status
    obj.RES_0C = UInt32  ...
    // 0x0C Reserved
    obj.TRIGCNTL = UInt32  ...
    // 0x10 Trigger Control
    obj.RSTCNTL = UInt32  ...
    // 0x14 Reset Control
    obj.THRDIDCLM = UInt32  ...
    // 0x18 Thread ID Claim
    obj.THRDID = UInt32  ...
    // 0x1c Thread ID
    obj.INTCNTL = UInt32  ...
    // 0x20 Interrupt Control
    obj.ETMCNTL = UInt32  ...
    // 0x24 ETM Control
    obj.ETMPID = UInt32  ...
    // 0x28 ETM Process ID
    obj.TEST = UInt32  ...
    // 0x2C Test
    obj.SWBRKCTL = UInt32  ...
    // 0x30 Software Breakpoint Control
    obj.SWBRKVAL = UInt32  ...
    // 0x34 Software Breakpoint Value
    obj.RES_38 = UInt32  ...
    // 0x38 Reserved
    obj.RES_3C = UInt32  ...
    // 0x3C Reserved
    obj.BCNT0CTRL = UInt32  ...
    // 0x40 Benchmark Counter 0 Control
    obj.BCNT0 = UInt32  ...
    // 0x44 Benchmark Counter 0
    obj.RES_48 = UInt32  ...
    // 0x48 Reserved
    obj.RES_4C = UInt32  ...
    // 0x4C Reserved
    obj.BCNT1CTRL = UInt32  ...
    // 0x50 Benchmark Counter 1 Control
    obj.BCNT1 = UInt32  ...
    // 0x54 Benchmark Counter 1
    obj.RES_58 = UInt32[10]  ...
    // 0x58 - 0x7C Reserved
    obj.HWBRK0CTL = UInt32  ...
    // 0x80 Hardware Breakpoint 0 Control
    obj.HWBRK0ADR = UInt32  ...
    // 0x84 Hardware Breakpoint 0 Address
    obj.HWBRK0ADRMASK = UInt32  ...
    // 0x88 Hardware Breakpoint 0 Address Mask
    obj.RES_8C = UInt32  ...
    // 0x8C Reserved
    obj.HWBRK1CTL = UInt32  ...
    // 0x90 Hardware Breakpoint 1 Control
    obj.HWBRK1ADR = UInt32  ...
    // 0x94 Hardware Breakpoint 1 Address
    obj.HWBRK1ADRMASK = UInt32  ...
    // 0x98 Hardware Breakpoint 1 Address Mask
    obj.RES_9C = UInt32  ...
    // 0x9C Reserved
    obj.HWBRK2CTL = UInt32  ...
    // 0xA0 Hardware Breakpoint 2 Control
    obj.HWBRK2ADR = UInt32  ...
    // 0xA4 Hardware Breakpoint 2 Address
    obj.HWBRK2ADRMASK = UInt32  ...
    // 0xA8 Hardware Breakpoint 2 Address Mask
    obj.RES_AC = UInt32  ...
    // 0xAC Reserved
    obj.HWBRK3CTL = UInt32  ...
    // 0xB0 Hardware Breakpoint 3 Control
    obj.HWBRK3ADR = UInt32  ...
    // 0xB4 Hardware Breakpoint 3 Address
    obj.HWBRK3ADRMASK = UInt32  ...
    // 0xB8 Hardware Breakpoint 3 Address Mask
    obj.RES_BC = UInt32[14]  ...
    // 0xBC - 0xF0 Reserved
    obj.OS_LOCKSTS = UInt32  ...
    // 0xF4 OS Lock Status
    obj.OS_LOCK = UInt32  ...
    // 0xF8 OS Lock
    obj.DCON = UInt32  ...
    // 0xFC DCON Register
 
C SYNOPSIS
 
config TimestampProvider.A_counterInUse  // module-wide

Assert when configured benchmark counter is owned by CCS

Configuration settings
TimestampProvider.A_counterInUse = Assert.Desc {
    msg: "A_counterInUse: Benchmark counter already claimed."
};
 
C SYNOPSIS
 
config TimestampProvider.A_intControlInUse  // module-wide

Assert if interrupt control register is owned by CCS

Configuration settings
TimestampProvider.A_intControlInUse = Assert.Desc {
    msg: "A_intCOntrolInUse: iceCrusher Int Control Register already claimed."
};
 
C SYNOPSIS
 
config TimestampProvider.benchmarkCounterId  // module-wide

ICECrusher Benchmark Counter id. 0 or 1. Default is 1

Configuration settings
TimestampProvider.benchmarkCounterId = UInt 1;
 
C SYNOPSIS
 
config TimestampProvider.countType  // module-wide

Timestamp count type. Default is CYCLES. CountType_INSTRUCTIONS only supported on benchmarkCounterId 1!!!

Configuration settings
 
C SYNOPSIS
 
metaonly config TimestampProvider.common$  // module-wide

Common module configuration parameters

Configuration settings
TimestampProvider.common$ = Types.Common$ undefined;
 
DETAILS
All modules have this configuration parameter. Its name contains the '$' character to ensure it does not conflict with configuration parameters declared by the module. This allows new configuration parameters to be added in the future without any chance of breaking existing modules.
generated on Thu, 25 May 2017 22:09:47 GMT