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.
Hi
I am using SYS/BIOS6 with CCS 6.1 and am trying to change CPU clock frequency from 80Mhz to 40Mhz. However it does not seem to be working.
The code snippet is reproduced below:
cpuFreq.hi=0;
cpuFreq.lo=40000000;
BIOS_setCpuFreq(&cpuFreq);
BIOS_getCpuFreq(&cpuFreq1);
System_printf("%d %d",cpuFreq1.hi,cpuFreq1.lo);
System_flush();
while (1)
{
GPIO_toggle(LCD_DATA0_SCAN0);
}
The frequency observed on the GPIO above doesnot change. Even though cpuFreq1.lo being printed on the console by System_printf does.
Any Suggetions.
Regards
BIOS_setCpuFreq() 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. It does not actually read any HW registers to determine the frequency.
What device are you on? I can tell you the proper way to change the CPU frequency at runtime. Also, what version of SYS/BIOS are you using?
Todd
Thanks a lot Todd. I am using TM4C123GH6PM. I am using SYS/BIOS 6.41 . I was able to change the frequency setting using the XGCONF tool. However I will like to do it at runtime -like even changing the clock sources for the sake of power management. Are there any SYS/BIOS API's for this or may be ROM APIs?
Regards
Hi Nikhil,
Can you marked that as answer (by https://e2e.ti.com/support/embedded/tirtos/f/355/t/419359)?
Thanks,
Todd