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 trying to set the CPU frequency as 80 MHz for tm4c129encpdt processor and I have set it in .cfg file as below:
// Set the CPU freq to match the PLL (80MHz)
BIOS.cpuFreq.lo = 80000000;
Startup.resetFxn = "&init_CPU";
In reset function, system clock is set to 80 MHz as below:
void init_CPU(void)
{
// Setting freq to 80 MHz.
clockFreq = SysCtlClockFreqSet(SYSCTL_USE_PLL | SYSCTL_OSC_MAIN | SYSCTL_CFG_VCO_480 | SYSCTL_XTAL_25MHZ, 80000000);
…
}
Runtime scenario:
Init_CPU function is called from startup code and it is set to 80 MHz and later startup code calls below function and it is set back to 120 MHz.
Void ti_catalog_arm_cortexm4_tiva_ce_Boot_init()
{
ti_catalog_arm_cortexm4_tiva_ce_Boot_sysCtlClockFreqSet((ULong)
(-251656576), (ULong)(120000000));
}
This function is auto generated and is available under _Debug folder, which means that compiler is getting input as 120 MHz.
Is there any place other than .cfg file where we can set CPU frequency?
Regards
Srinivasa
Hello Srinivasa
Yes, i am able to reproduce the issue and then I looked up TI-RTOS and found the following thread
BIOS_setCpuFreq(&cpuFreq) doesnot change the clock frequency on EK_TM4C123 - Processors forum - Processors...
Now after some digging got the system frequency to work at 80MHz
BIOS-> System Overview (This will bring a block diagram)
Click on Boot and then use the following diagram as reference
Regards
Amit