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.

Clock function doesn't work on DM8148

Other Parts Discussed in Thread: SYSBIOS

Hi

   I conct to dsp on EVM8148 as http://processors.wiki.ti.com/index.php/Connecting_to_DSP_on_C6A8168,_DM8168,_DM8148 said. I create a SYS/BIOS Clock example by CCS4.2.

/*
 *  ======== clock.c ========
 *  The clock example shows how to use the ti.sysbios.knl.Clock module to
 *  create one-shot and periodic Clock Instances. Clock Instances are
 *  essentially functions that run after a certain number of Clock ticks.
 */   

#include <xdc/std.h>
#include <xdc/runtime/System.h>

#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Clock.h>

Void clk0Fxn(UArg arg0);
Void clk1Fxn(UArg arg0);
       
/*
 *  ======== main ========
 */
Void main()
{
    Clock_Handle clk2;      
    Clock_Params clkParams;

    /* Create a periodic Clock Instance with period = 5 system time units */
    Clock_Params_init(&clkParams);
    clkParams.period = 5;
    clkParams.startFlag = TRUE;
    Clock_create(clk0Fxn, 5, &clkParams, NULL);
   
    /* Create an one-shot Clock Instance with timeout = 11 system time units */
    clkParams.period = 0;
    clkParams.startFlag = FALSE;
    clk2 = Clock_create(clk1Fxn, 11, &clkParams, NULL);

    Clock_start(clk2);
               
    BIOS_start();
}

/*
 *  ======== clk0Fxn =======
 */
Void clk0Fxn(UArg arg0)
{
    UInt32 time;
   
    time = Clock_getTicks();
    System_printf("System time in clk0Fxn = %lu\n", (ULong)time);
}

/*
 *  ======== clk1Fxn =======
 */
Void clk1Fxn(UArg arg0)
{
    UInt32 time;
   
    time = Clock_getTicks();
    System_printf("System time in clk1Fxn = %lu\n", (ULong)time);
    System_printf("Calling BIOS_exit() from clk1Fxn\n");
    BIOS_exit(0);
}

The program only go into the clk0Fxn but not go into clk1Fxn and clk0Fxn again.Did any more GEL Scripts I should run.

The program works fine on my evm6748.

Thanks for your reply!