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.

Compiler/TMS320C6678: DEVSPEED register and CPU clock speed Issue

Part Number: TMS320C6678

Tool/software: TI C/C++ Compiler

"Multicore Fixed and Floating-Point Digital Signal Processor
TMS320C6678
3.3.21 Device Speed Register (DEVSPEED)
The Device Speed Register depicts the device speed grade. The Device Speed Register is shown below."

Hi all,

first quick question. What does the above DEVSPEED register exactly represent? Can I assume it as the CPU clock speed?

 If yes, changing the speed cpu rate by cfg file should affect it. Is this assumption correct?

It seems that, changing the BIOS.cpuFreq.lo = xx00000000; do not really affect the speed rate. 

Running the same piece of code at different rates on the EVM and measuring it via GPIO/oscilloscope  takes always the same time. That sounds very strange.

I suppose it is due to the EVM clock but I am not sure. In addition I have a similar behavior on my final COTS board: even if I change the rate I have not detected any time variation.

 Any suggestions ?

Thank you in advance.

BR,

Giorgio

  • Hello!
    The DEVSPEED register shows device's speed grade. In other words, it indicates capability of the device to run up to shown speed.
    To modify device's speed one have to reconfigure it's PLL. Routine making such a reconfiguration may read DEVSPEED register to make sure planned configuration does not exceed device capabilities.
    You may refer platform_init() in PDK examples, but be aware code there contains many hardcoded values, making it impossible to set frequencies above 1 GHz. We had to traverse trough source code and allow modification of all required multipliers and dividers to get our device to 1.2 GHz.
    You may want refer speed setting thread at e2e.ti.com/.../424517. That was for C6670, which is sibling of your device, so I almost sure all the troubles are about the same. By the way, the thread was not resolved until now.
  • Hi rrlagic,

    first of all thank you for replying to me. I have still some doubts about that. I would like to understand if the real CPU speed is related to the board hosting the C6678 or not. In many forum I have found the confirmation of the maximum speed, which is 1.4 GHz. So my purpose is bringing the speed to this upper-bound and verify that I am really running at 1.4GHz. I used the the .cfg file to configure the device and in addition I also set the speed rate via BIOS API (BIOS_setCpuFreq). Even if I set it to 1.4 (and the get function return to me 1.4), the DEVSPEED is still 1.25 GHz.

    Any further suggestions?

    BR,

    Giorgio   

  • Hi Giorgio,

    BIOS_setCpuFreq() does not affect HW registers related to CPU frequency. It tells the kernel what the CPU frequency is. The call does not actually change the frequency. Similarly BIOS_getCpuFreq() returns the frequency the kernel thinks (via configuration or BIOS_setCpuFreq) the CPU is running at.
    You can find description about what you should do to change the CPU frequency runtime at:
    e2e.ti.com/.../419359
    Also the linked below System clock manager guide should be useful for you:
    software-dl.ti.com/.../Clock.html

    BR
    Tsvetolin Shulev
  • Giorgio,

    You have to clearly understand, that DEVSPEED is read only register and it tells only particular device maximum rating. To add more, telling yours is C6678 is not enough, they come in 3 flavours: 1GHz, 1.25GHz and 1.4GHz. So once again, looking at DEVSPEED register you can programmatically detect particular device speed grade. As you report DEVSPEED reading is 1.25GHz it means your particular device is not capable of doing 1.4GHz.

    TI supporter already pointed you BIOS_setCpuFreq() does not really modify device's actual frequency. Be sure Clock_tickReconfig() does not either. If you want to change DSP frequency, have to reconfigure its PLL. You may refer platform_init() function from TI\pdk_C6678_1_1_2_6\packages\ti\platform\evmc6678l\platform_lib\src\platform.c as an example. If you are doing that on EVM, there is a probe point where you may confirm the frequency synthesized with a scope. 

  • Hi,
    thanks for your clarifications but I am still a bit confused. According to TI, all the c6678 should be "runnable" at 1.4 GHz (see for instance this> e2e.ti.com/.../656311).
    So my question is: is the real CPU speed rate the value of DEVSPEED? Can I trust it?
    Thank you.
  • I do hardly believe the statement you mention was interpreted correctly, while the link seems broken.
    Somehow device data manual is not that clear, still you can look at clause 9.2 Packaging Information of data manual and find a string in Device marking column like 1.25GHz, 1.4GHz or nothing. That's it. So for instance TMS320C6678ACYP is 1GHz device, TMS320C6678ACYP25 is 1.25GHz device and TMS320C6678ACYP4 is 1.4GHz device, all three of the same family, but different speed grades. Somehow, this information is not clearly shown on TI's website.
    I think, you ave to interpret DEVSPEED just as I explained, i.e. maximum rating of device in your hands.
  • Well, I found a thread your are referring at e2e.ti.com/.../2410835. Still I believe supporter had something other on his mind. Clearly there are 3 speed grades of C6678 and you can find speed grade of yours in DEVSPEED register.
  • Thanks a lot. By the way I report the links about the 1.4GHz
    HERE