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.

CCS/AM5728: DSP default frequency

Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS

Tool/software: Code Composer Studio

 What is the default frequence of the DSP core runing with the defalut SYS/BIOS setup? And where to find this info?

Its seem nothing is realte to the freq setting in the project cfg file 

below is my sample project cfg file that change from the ipc sample project

=====================================================


//BWC, add Program var
/* root of the configuration object model */
var Program = xdc.useModule('xdc.cfg.Program');


/* ================ General configuration ================ */
var Memory = xdc.useModule('xdc.runtime.Memory');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var Log = xdc.useModule('xdc.runtime.Log');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var System = xdc.useModule('xdc.runtime.System');
SysStd = xdc.useModule('xdc.runtime.SysStd');

var Edma = xdc.loadPackage ("ti.sdo.edma3.drv.sample");
var drv = xdc.loadPackage ("ti.sdo.edma3.drv");
var rm = xdc.loadPackage ("ti.sdo.edma3.rm");
var Clock = xdc.useModule('ti.sysbios.knl.Clock');

System.SupportProxy = SysStd;
/* Add Shared Region module */
var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
//SharedRegion.cacheLineSize = 32;
//SharedRegion.numEntries = 4;
//SharedRegion.translate = true;
/* Create a default system heap using ti.bios.HeapMem. */
var heapMemParams1 = new HeapMem.Params;
heapMemParams1.size = 8192 * 25;
heapMemParams1.sectionName = "systemHeap";
Program.global.heap0 = HeapMem.create(heapMemParams1);

/* This is the default memory heap. */
Memory.defaultHeapInstance = Program.global.heap0;

Program.sectMap["systemHeap"] = Program.platform.stackMemory;

/*
* Enable Event Groups here and registering of ISR for specific GEM INTC is done
* using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
*/
var exception = xdc.useModule('ti.sysbios.family.c64p.Exception');
exception.enablePrint = true;

/* ================ BIOS configuration ================ */

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

/* Enable BIOS Task Scheduler */
BIOS.taskEnabled = true;

/* ================ Task configuration ================ */

/* No runtime stack checking is performed */
Task.checkStackFlag = false;


/* Reduce the number of task priorities */
Task.numPriorities = 4;

/*
var task0Params = new Task.Params();
task0Params.instance.name = "echo";
task0Params.stackSize = 0x1000;
Program.global.echo = Task.create("&gpio_test", task0Params);
*/


/* ================ Driver configuration ================ */

/* Load the Osal package */
var osType = "tirtos";
var Osal = xdc.loadPackage('ti.osal');
Osal.Settings.osType = osType;


/* Load the Board package and set the board name */
var Board = xdc.loadPackage('ti.board');
Board.Settings.boardName = "evmAM572x";

/* ================ Memory sections configuration ================ */
//BWC, comment next three lines
//Program.sectMap[".text"] = "EXT_RAM";
//Program.sectMap[".const"] = "EXT_RAM";
//Program.sectMap[".plt"] = "EXT_RAM";
/* Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1"; */
/* Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1"; */
/* allocate a config-params object */
var HeapParam = new HeapMem.Params;

/* optionally assign per-instance configs */
//HeapParam.size = 200000;
HeapParam.size = 0x100000;
//HeapParam.sectionName = "L2_SRAM"
//HeapParam.sectionName = "OCMC_RAM1"
/* create an instance-object */
Program.global.myHeap = HeapMem.create(HeapParam);

/*
var task0Params = new Task.Params();
task0Params.priority = 3;
task0Params.instance.name = "task_audio";
Program.global.task0 = Task.create("&Audio_echo_Task", task0Params);
*/

/*
* Copyright (c) 2013-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* * Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

/*
* ======== Dsp1.cfg ========
* Platform: DRA7XX_linux_elf
* Target: ti.targets.elf.C66
*/

/* root of the configuration object model */
var Program = xdc.useModule('xdc.cfg.Program');

/* application uses the following modules and packages */
xdc.useModule('xdc.runtime.Assert');
xdc.useModule('xdc.runtime.Diags');
xdc.useModule('xdc.runtime.Error');
xdc.useModule('xdc.runtime.Log');
xdc.useModule('xdc.runtime.Registry');

xdc.useModule('ti.sysbios.knl.Semaphore');
xdc.useModule('ti.sysbios.knl.Task');

/*
* ======== IPC Configuration ========
*/
xdc.useModule('ti.ipc.ipcmgr.IpcMgr');

/* load the configuration shared across cores */
Program.global.procName = "DSP1";
//BWC, no longer have shared folder
//var ipc_cfg = xdc.loadCapsule("../shared/ipc.cfg.xs");
var ipc_cfg = xdc.loadCapsule("ipc.cfg.xs");

var BIOS = xdc.useModule('ti.sysbios.BIOS');
//BWC comment, will call from main instead
//BIOS.addUserStartupFunction('&IpcMgr_ipcStartup');

/*
* ======== SYS/BIOS Configuration ========
*/
if (Program.build.profile == "debug") {
BIOS.libType = BIOS.LibType_Debug;
} else {
BIOS.libType = BIOS.LibType_Custom;
}

/* no rts heap */
Program.argSize = 100; /* minimum size */
//BWC increase stack size
//Program.stack = 0x1000;
Program.stack = 0x8000;

var Task = xdc.useModule('ti.sysbios.knl.Task');
Task.common$.namedInstance = true;

/* default memory heap */
var Memory = xdc.useModule('xdc.runtime.Memory');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
var heapMemParams = new HeapMem.Params();
heapMemParams.size = 0x8000;
Memory.defaultHeapInstance = HeapMem.create(heapMemParams);

/* create a heap for MessageQ messages */
var HeapBuf = xdc.useModule('ti.sysbios.heaps.HeapBuf');
var params = new HeapBuf.Params;
params.align = 8;
params.blockSize = 512;
params.numBlocks = 256;
var msgHeap = HeapBuf.create(params);

var MessageQ = xdc.useModule('ti.sdo.ipc.MessageQ');
MessageQ.registerHeapMeta(msgHeap, 0);

/* Setup MessageQ transport */
var VirtioSetup = xdc.useModule('ti.ipc.transports.TransportRpmsgSetup');
MessageQ.SetupTransportProxy = VirtioSetup;

/* Setup NameServer remote proxy */
var NameServer = xdc.useModule("ti.sdo.utils.NameServer");
var NsRemote = xdc.useModule("ti.ipc.namesrv.NameServerRemoteRpmsg");
NameServer.SetupProxy = NsRemote;

/* Enable Memory Translation module that operates on the BIOS Resource Table */
var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
Resource.loadSegment = "EXT_CODE";

/* Use SysMin because trace buffer address is required for Linux/QNX
* trace debug driver, plus provides better performance.
*/
var System = xdc.useModule('xdc.runtime.System');
var SysMin = xdc.useModule('ti.trace.SysMin');
System.SupportProxy = SysMin;
SysMin.bufSize = 0x8000;

Program.sectMap[".tracebuf"] = "TRACE_BUF";
Program.sectMap[".errorbuf"] = "EXC_DATA";
//Program.sectMap["BOARD_IO_DELAY_DATA"] = "OCMC_RAM1";
//Program.sectMap["BOARD_IO_DELAY_CODE"] = "OCMC_RAM1";

/* --------------------------- TICK --------------------------------------*/
//BWC comment out this whle tick section
// var Clock = xdc.useModule('ti.sysbios.knl.Clock');
// Clock.tickSource = Clock.TickSource_NULL;
// //Clock.tickSource = Clock.TickSource_USER;
// /* Configure BIOS clock source as GPTimer5 */
// //Clock.timerId = 0;
//
// var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
//
// /* Skip the Timer frequency verification check. Need to remove this later */
// Timer.checkFrequency = false;
//
// /* Match this to the SYS_CLK frequency sourcing the dmTimers.
// * Not needed once the SYS/BIOS family settings is updated. */
// Timer.intFreq.hi = 0;
// Timer.intFreq.lo = 19200000;
//
// //var timerParams = new Timer.Params();
// //timerParams.period = Clock.tickPeriod;
// //timerParams.periodType = Timer.PeriodType_MICROSECS;
// /* Switch off Software Reset to make the below settings effective */
// //timerParams.tiocpCfg.softreset = 0x0;
// /* Smart-idle wake-up-capable mode */
// //timerParams.tiocpCfg.idlemode = 0x3;
// /* Wake-up generation for Overflow */
// //timerParams.twer.ovf_wup_ena = 0x1;
// //Timer.create(Clock.timerId, Clock.doTick, timerParams);
//
// var Idle = xdc.useModule('ti.sysbios.knl.Idle');
// var Deh = xdc.useModule('ti.deh.Deh');
//
// /* Must be placed before pwr mgmt */
// Idle.addFunc('&ti_deh_Deh_idleBegin');
/*
* ======== Instrumentation Configuration ========
*/

/* system logger */
var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
var LoggerSysParams = new LoggerSys.Params();
var Defaults = xdc.useModule('xdc.runtime.Defaults');
Defaults.common$.logger = LoggerSys.create(LoggerSysParams);

/* enable runtime Diags_setMask() for non-XDC spec'd modules */
var Diags = xdc.useModule('xdc.runtime.Diags');
Diags.setMaskEnabled = true;

/* override diags mask for selected modules */
xdc.useModule('xdc.runtime.Main');
Diags.setMaskMeta("xdc.runtime.Main",
Diags.ENTRY | Diags.EXIT | Diags.INFO, Diags.RUNTIME_ON);

var Registry = xdc.useModule('xdc.runtime.Registry');
Registry.common$.diags_ENTRY = Diags.RUNTIME_OFF;
Registry.common$.diags_EXIT = Diags.RUNTIME_OFF;
Registry.common$.diags_INFO = Diags.RUNTIME_OFF;
Registry.common$.diags_USER1 = Diags.RUNTIME_OFF;
Registry.common$.diags_LIFECYCLE = Diags.RUNTIME_OFF;
Registry.common$.diags_STATUS = Diags.RUNTIME_OFF;

var Main = xdc.useModule('xdc.runtime.Main');
Main.common$.diags_ASSERT = Diags.ALWAYS_ON;
Main.common$.diags_INTERNAL = Diags.ALWAYS_ON;


//BWC, added to use custom resource table
/* Override the default resource table with my own */
//var Resource = xdc.useModule('ti.ipc.remoteproc.Resource');
Resource.customTable = true;

  • The RTOS team have been notified. They will respond here.
  • Hi,

    The SYSBIOS itself doesn't setup the DSP PLL and has no knowledge about the DSP CPU speed. If you use the GEL file, the default DSP speed is 600MHz, this is for OPP_NOM.

    If you used any SYSBIOS timestamp for benchmarking, you need add below into .cfg file to let SYSBIOS know how fast CPU runs:
    BIOS.cpuFreq.lo = 600000000;

    Regards, Eric
  • Thanks for help!
    I hand found some useful info in the fourm, that DSP speed is set up in uboot by default ,it can be set up to 750 Mhz.
    will BIOS.cpuFreq.lo = 750000000; work?
  • Hi,

    DSP can run up to 750MHz, this requires higher voltage supply to the core. So, if you just run it for a short time (e.g. for some testing, benchmarking purpose), it is fine for you:
    1. use the GEL file to set DSP to OPP_HIGH, that is 750MHz, and
    2. BIOS.cpuFreq.lo = 750000000 to let SYSBIOS knowing the CPU speed.

    In the long term (e.g, production environment), you have to raise the voltage if you run that at 750 MHz to avoid damage to the chip:
    1. use the TI SBL to set DSP to 750MHz (the SBL code has PMIC control that raise the voltage for this purpose), and
    2. BIOS.cpuFreq.lo = 750000000 to let SYSBIOS knowing the CPU speed.

    Regards, Eric
  • Thank's for help.I had change the DSP to 700mhz frequency by editing device tree

  • Hi

       1. use the TI SBL to set DSP to 750MHz (the SBL code has PMIC control that raise the voltage for this purpose), and
       2. BIOS.cpuFreq.lo = 750000000 to let SYSBIOS knowing the CPU speed.

      What will happen if the values in 1 & 2 are not equal ?

  • Hi,

    If value 1&2 doesn't equal, the CPU still run at the speed of 1 setting by SBL. The 2 is used for SYSBIOS to calculate timestamp if you use any timestamp function from SYSBIOS, it will be inaccurate.

    Regards, Eric