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.

BIOS_getCpuFreq() on C6678

Other Parts Discussed in Thread: SYSBIOS, TMS320C6678

Hi,

I have a problem with the SYSBIOS function BIOS_getCpuFreq() as the frequency value it returns is incorrect in my software.

I work with the C6678 DSP. In my software I use the BIOS_getCpuFreq() function call which always returns 1000MHz.

BIOS_getCpuFreq (&cpuFreq); 

returns

cpuFreq.hi = 0

cpuFreq.lo = 1000000000

I have ran the DSP CPU core at 3 different frequencies 800MHz, 1000MHz and 1200MHz by modifying the PLL settings as in Table 2-24 of the TMS320C6678 Data Manual (http://www.ti.com/lit/ds/sprs691d/sprs691d.pdf). By probing the DSP SYSCLKOUT with an oscilloscope, I have found the CPU frequency indeed gets set to the correct frequency.

Could you let me know what settings I should modify in SYS BIOS so that BIOS_getCpuFreq () will return the correct frequency?

My SYS BIOS version is 6.33.6.50 and the XDC tools version is 3.23.4.60.

Thanks.

Luke

  • Hi Luke,

    BIOS_getCpuFreq() returns the statically configured frequency value. It does not check the PLL settings to compute the CPU frequency at runtime. By default, the frequency value returned is read from the platform. You can override the frequency by adding the following to your *.cfg script:

    var BIOS = xdc.useModule('ti.sysbios.BIOS');

    BIOS.cpuFreq.lo = 1200000000;

    BIOS.cpuFreq.hi = 0;

    Best,

    ashish

  • Thanks Ashish. I tried your suggestion and BIOS_getCpuFreq() does return the frequency that I set in the *.cfg script.

    But, I am just curious to know from where does BIOS_getCpuFreq() pick up the default value of 1000MHz.

    To change the PLL setting I modify the contents of the file below.

    "C:\ti\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\include\platform_internal.h"

    Thanks.

    Luke


  • Hi Luke,

    BIOS reads the CPU frequency from the XDCTools platform. I am assuming you are using ti.platforms.evm6678. If yes, then you can check xdctools_3_25_03_72\packages\ti\platforms\evm6678\Platform.xdc file and you should find the CPU freq is set to 1000MHz.

    Best,

    Ashish