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.

Change DSP clock in IPNC 3.0 on DM8148

Expert 2220 points
Other Parts Discussed in Thread: SYSBIOS

Hello,

I am trying to chage the DSP clock rate on the DM8148 EVM. I am using IPNC 3.0. I have seen a variety of posts about various ways to do it and have had no luck so far. Here is what I have tried.

Method 1 - Change gem_ick in kernel

clkp = clk_get(NULL, "gem_ick");
if(!IS_ERR(clkp))
   ret = clk_enable(clkp);
else {
   pr_err("unable to get clock\n");
}
if(ret)
   pr_err("unable to enable clock\n");

rrate = clk_get_rate(clkp);
printk("dsp clock running at %uHz\n", rrate);

rrate = clk_round_rate(clkp, 600000000);
ret = clk_set_rate(clkp, rrate);
if (ret)
pr_err("Failed to set the requested rate %lu and dsp running at %lu", rrate, clk_get_rate(clkp));

This resulted in 

Failed to set the requested rate 200000000 and dsp running at 200000000

The rounding function rounds the 600MHz down to 200 MHz and then fails to set this frequency. Additionally I saw no change in processing speed.

Method 2 - DSP main function

I noticed that one of the first lines of main for the DSP sets the clock frequency:

void main(void)
{

    Utils_setCpuFrequency(SYSTEM_DSP_FREQ);

    System_start(C6XDSP_main);

}

I changed SYSTEM_DSP_FREQ to 600*1000*1000 instead of 500*1000*1000. On run the DSP printed:

[c6xdsp ] ***** SYSTEM : Frequency <ORG> - 500000000, <NEW> - 600000000

[c6xdsp ]


But I did not observe any change in processing speed.

What is the best way to adjust the clock in IPNC 3.0?

Thanks,

Ben


  • I found where the dsp clock gets set up in uboot in clocks_ti814x.h and changed it there. It now seems to be working.

    What does Utils_setCpuFrequency(SYSTEM_DSP_FREQ)  in the DSP actually do?

  •  Utils_setCpuFrequency(SYSTEM_DSP_FREQ) informs sysbios of the operating frequency of the core. This info is required by the OS so that all ms ticks and sleeps are calibrated correctly. This funtion does _not_ set the actual core frequency.Frequency should be set in uboot by changing clocks_ti814x.h as you have already done

  • Ben,

    Try following file:

    /ti_tools/ipnc_psp_04_04_XX_XX/u-boot/arch/arm/include/asm/arch-ti81xx/clocks_ti814x.h

    You can change the DSP_M (multiplier) or DSP_M2 for changing the clocks. If you search the uboot with DSP_M you will also find the actual equation used for computation.

    Regards

    Rajat