Dear E2E!
I have created a simple DSP/BIOS project, as it is described in DSP/BIOS tutorial
"Lesson 1: Creating a Simple DSP/BIOS Application".
The project builds and loads without any errors.
But. Afrer "Run" it hangs at BIOS API Function TSK_sleep().
. ... it don't print message "...awake! Time is ...."
I can't understand, why... I'm will be very appreciative for any help.
I'm use a platform OMAL-L137EVM.
Work under CCS3.3 (it is shipped with EVM).
Use DSP/BIOS 5.33.
Studing the tutorial in: <DSP/BIOS Install dir>\packages\ti\bios\help\doc\
listing of clk.c:
//------------------
/*
* Copyright 2008 by Texas Instruments Incorporated.
* All rights reserved. Property of Texas Instruments Incorporated.
* Restricted rights to use, duplicate or disclose this code are
* granted through contract.
*
* @(#) DSP/BIOS_Examples 5,3,3 09-23-2008 (biosEx-j03)
*/
/*
* ======== clk.c =======
* In this example, a task goes to sleep # number of ticks and
* prints the time after it wakes up.
*
*/
#include <std.h>
#include <log.h>
#include <clk.h>
#include <tsk.h>
#include <gbl.h>
#include "clkcfg.h"
/*
* ======== main ========
*/
Void main()
{
LOG_printf(&trace, "clk example started.\n");
}
Void taskFxn(Arg value_arg)
{
Int value = ArgToInt (value_arg);
LgUns freq;
Float timeout, milliSecsPerIntr, cycles;
LOG_printf(&trace, "The time in task is: %d ticks", (Int)TSK_time());
/* get frequency of platform */
freq = GBL_getFrequency();
/* get cpu cycles per ltime interrupt */
cycles = CLK_cpuCyclesPerLtime();
/* computer milliseconds per ltime interrupt */
milliSecsPerIntr = cycles/(Float)freq;
/* compute timeout */
timeout = value/milliSecsPerIntr;
/*begin while loop ... it is a task to try*/
//while(TRUE)
//{
LOG_printf(&trace, "task going to sleep for %d ticks... ", (Int)timeout);
//TSK_sleep((LgUns)timeout);
TSK_sleep((Uns)1); // try with hand-defined delay ... program pass TS_sleep only when the argument is 0 ...
LOG_printf(&trace, "...awake! Time is: %d ticks", (Int)TSK_time());
//LOG_printf(&trace, "...awake! Time is: %d ticks", (Int)TSK_time());
//}
/*end of while loop ... it is a task to try*/
}
//------------------
listing of clk.tcf:
//------------------
utils.loadPlatform("ti.platforms.evm6747");
/* The following DSP/BIOS Features are enabled. */
bios.enableRealTimeAnalysis(prog);
bios.enableRtdx(prog);
bios.enableTskManager(prog);
bios.LOG.create("trace");
bios.LOG.instance("trace").bufLen = 128;
bios.MEM.NOMEMORYHEAPS = 0;
bios.MEM.NOMEMORYHEAPS = 1;
bios.MEM.NOMEMORYHEAPS = 0;
bios.MEM.instance("L3_CBA_RAM").createHeap = 1;
bios.MEM.BIOSOBJSEG = prog.get("L3_CBA_RAM");
bios.MEM.MALLOCSEG = prog.get("L3_CBA_RAM");
bios.TSK.create("myTask");
bios.TSK.instance("myTask").order = 1;
bios.TSK.instance("myTask").fxn = prog.extern("taskFxn");
bios.TSK.instance("myTask").arg0 = 10;
bios.TSK.create("myTask2");
bios.TSK.instance("myTask2").order = 2;
bios.TSK.instance("myTask2").fxn = prog.extern("taskFxn");
bios.TSK.instance("myTask2").arg0 = 25;
bios.TSK.instance("myTask").priority = 2;
bios.TSK.instance("myTask").priority = 1;
bios.TSK.instance("myTask2").priority = 2;
bios.TSK.instance("TSK_idle").order = 1;
bios.TSK.instance("myTask").order = 2;
bios.TSK.instance("myTask2").destroy();
bios.TSK.instance("myTask").arg0 = 1;
bios.MEM.USEMPC = 0;
bios.MEM.NOMEMORYHEAPS = 0;
bios.MEM.instance("SDRAM").createHeap = 1;
bios.MEM.BIOSOBJSEG = prog.get("SDRAM");
bios.MEM.MALLOCSEG = prog.get("SDRAM");
bios.MEM.NOMEMORYHEAPS = 1;
bios.MEM.NOMEMORYHEAPS = 0;
bios.MEM.instance("L3_CBA_RAM").createHeap = 1;
bios.MEM.instance("L3_CBA_RAM").heapSize = 0x00000080;
bios.MEM.BIOSOBJSEG = prog.get("L3_CBA_RAM");
bios.MEM.MALLOCSEG = prog.get("L3_CBA_RAM");
bios.MEM.instance("L3_CBA_RAM").heapSize = 0x00008000;
// !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT!
prog.gen();
//------------------