Hi forum,
I am getting super frustrated by not being able to run the OS Clock module run properly on the DSP1 of a AM5728.
I am trying to use GPTimer14 (Id:13) that is configured in the Linux Device Tree as belonging to DSP1.
Therefore I made a simple project that replicates the problem which contains the .cfg, a makefile and one .c file.
Basically, I launch a task that should sleep for 1000ms and print something every time sleep expires.
Additionally, I defined the Clock as USER type and I am calling Clock_tick() myself from a custom function but this is never called because the Clock tick is stuck at zero.
static int n = 0; Void myTimerTick(UArg arg) { Clock_tick(); n++; if(n%1000 == 0) { Log_print1(Diags_INFO, "Clock_tick() %d\n", n); } } /* * ======== main ======== */ Int main(Int argc, Char* argv[]) { Error_Block eb; Task_Params taskParams; Log_print0(Diags_ENTRY, "--> main:"); /* must initialize the error block before using it */ Error_init(&eb); /* create main thread (interrupts not enabled in main on BIOS) */ Task_Params_init(&taskParams); taskParams.instance->name = "task"; taskParams.arg0 = (UArg)argc; taskParams.arg1 = (UArg)argv; taskParams.stackSize = 0x1000; Task_create(main_task, &taskParams, &eb); if (Error_check(&eb)) { System_abort("main: failed to create application startup thread"); } /* start scheduler, this never returns */ BIOS_start(); /* should never get here */ Log_print0(Diags_EXIT, "<-- main:"); return (0); } /* * ======== main_task ======== */ Void main_task(UArg arg0, UArg arg1) { Log_print0(Diags_ENTRY, "--> main_task:"); while(1) { Task_sleep(1000); Log_print0(Diags_INFO, "System_sleep() returned %d\n"); } Log_print0(Diags_EXIT, "<-- main_task:"); }
I should add that I confirm that my GPTimer14 is properly working (base: 0x4882A000, TCLR=0x3, TCRR-increments when debugger stepping).
Please provide some RTOS or DRA7xx expert advice on this as I couldn't find any solution myself.
Best regards