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.

OMAPL138 DSP SYS/BIOS 6: Issue with Clock and Timer2 Configuration Setting

Other Parts Discussed in Thread: OMAPL138, SYSBIOS

Hi,

I am facing an issue with OMAPL138 DSP SYS/BIOS clock timer settings. I am using TImer2 for DSP Clock (Timer1&2 used by ARM).

The PLL Setting is done for ARM & DSP clock of 300MHz. SYSCLK1 and SYSCLK6 are 300MHz. PLL1_SYSCLK2 used for TIMER2/3 are  150MHz.
(Our OSC clock is 24MHz PLLM = 24 and POSTDIV = 1. gives SYSCLK1/6 = (24x25/2) = 300MHz ).

The kernel boot-up gives the message "Calibrating delay loop... 149.50 BogoMIPS (lpj=747520)", What it means? Is this BogoMIPS is Hlaf of CPU Clock?

When i check the DSP BIOS Frequency, It is giving 300MHz. I checked this by adding the below code snaps in my application:

BIOS_getCpuFreq(&getCpuFreq);
System_printf("Main: BIOS_getCpuFreq = 0x%d\n", getCpuFreq.lo);  

Output ==> Main: BIOS_getCpuFreq =0x300000000

Now i am facing some DSP processing Delay issues. If i put Task_Sleep(1000)  (ie 1sec sleep) in my DSP task, It is taking 20 -30 seconds (instead of 1 sec)

to come out from the sleep function. I am suspecting some Clock & TImer configuration mismatch between the actual settings and the BIOS configuration.

For further information on my system,

I am using following package versions for my DSP application:

    * bios_6_33_02_31
    * syslink_2_10_03_20
    * ipc_1_24_02_27
    * xdctools_3_23_01_43
    * CGT_C6000_7.2.2


I have the following clock & Timer configurations in my bios.cfg file.

var Clock       = xdc.useModule('ti.sysbios.knl.Clock');
Clock.tickSource = Clock.TickSource_TIMER;  // To used timer
Clock.timerId   = 2;               // this changes the default Timer used by BIOS to 2.
Clock.tickPeriod = 1000;       // 1000mS = 1ms (ticks in terms of microseconds )

var Timer       = xdc.useModule('ti.sysbios.timers.timer64.Timer');
Timer.intFreqs[2].lo = 149500000;    // Setting Timer to ~150Mhz ---> Timer2/3 uses PLL1_SYSCLK2.
Timer.intFreqs[2].hi = 0;
Timer.timerSettings[2].mode = Timer.Mode_CHAINED;
Timer.timerSettings[2].master = true;
Timer.timerSettings[2].ownerCoreId = 0;

I am setting Clock.tickPeriod value as 1000 in my config file. What will be the default value? and for my Timer2 Frequency setting of 150MHz, What value should be configured for  Clock.tickPeriod ?

Below is the Timer2 register dump taken after the DSP BIOS started up and Run.

Read at address  0x01F0C000 (0x40316000):   0x4472020C
Read at address  0x01F0C004 (0x401c3004):   0x00000000
Read at address  0x01F0C008 (0x4024b008):   0x00000000
Read at address  0x01F0C00C (0x4008c00c):  0x00000000
Read at address  0x01F0C010 (0x402b9010):   0x0001755E
Read at address  0x01F0C014 (0x4032f014):    0x00000000
Read at address  0x01F0C018 (0x401d8018):   0x000247FC
Read at address  0x01F0C01C (0x4024b01c):   0x00000000
Read at address  0x01F0C020 (0x400ff020):     0x00000090
Read at address  0x01F0C024 (0x400bf024):    0x0000000F
Read at address  0x01F0C028 (0x40277028):   0x00000000
Read at address  0x01F0C02C (0x402cd02c):   0x00000290
Read at address  0x01F0C030 (0x401b3030):   0x00000000
Read at address  0x01F0C034 (0x402c0034):   0x00000000
Read at address  0x01F0C038 (0x4023f038):    0x00000000
Read at address  0x01F0C03C (0x4022f03c):    0x00000000
Read at address  0x01F0C040 (0x4028d040):   0x00000000
Read at address  0x01F0C044 (0x4022d044):   0x00000002
Read at address  0x01F0C048 (0x402db048):   0x00000000
Read at address  0x01F0C04C (0x4016604c):   0x00000000

I have noticed the value of Timer2 Period Register (addr: 0x01F0C018)  = 0x000247FC. It Seems to be ok for me for the 149.5MHz input frequency. Please verify this.


Because of the delay issue with DSP,  i am facing issue with our current application design and my ARM-DSP integration is getting delayed.


Please guide me to resolve the above issue. Awaiting for your response.


--

Thanks and Regards,

Ansa Ahammed