Other Parts Discussed in Thread: SYSBIOS
i need to change cpu clock rate from 600 Mhz to 1000 Mhz ? can help me to solve this issue ?
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.
Other Parts Discussed in Thread: SYSBIOS
i need to change cpu clock rate from 600 Mhz to 1000 Mhz ? can help me to solve this issue ?
Hi,
I will forward this to the Industrial SDK team.
JJ,
In the .cfg file, there is something like BIOS.cpuFreq.lo = 600000000;====> This has to be changed to the real CPU speed as well. Note, the updating this number doesn't changing any PLL setting, the real CPU speed is programed by GEL file or code, but this number tells SYSBIOS what the CPU speed is and SYSBIOS calculates the timer clock based on it. The mismatch between real CPU speed and this setting makes the SYSBIOS timer inaccurate.
Regards, Eric
that great respond thanks, but i have deeply question.
"\ccsv6\ccs_base\emulation\boards\idk_am437x\gel\" in this path has multiple gel files two of them are AM437x_PLLconfig.gel and AM43xx_PLLconfig.gel and when startup system it uses AM43xx_PLLconfig.gel and this file contains some PLL functions to conf. the cpu clock like
MPU_PLL_Config( CLKIN, 0, 25, 1); //600MHz
what are input parameters have to pass to this function to get 1000MHZ ?
hint : CLKIN = 24MHZ
thanks in advance,
The latest industry SDK for AM437x is: SYSBIOSSDK-IND-SITARA 02_01_01_02
downloads.ti.com/.../index_FDS.html
Under sysbios_ind_sdk_2.1.1.2\sdk\os_drivers\source, there is osdrv_utils.c file but doesn't contain such function to get ARM frequency. A similar function is implemented at \sysbios_ind_sdk_2.1.1.2\sdk\board\source\board_support.c
int Board_getArmClockRate()
{
//Return ARM frequency
uint32_t clkin, dpllMult, dpllDiv;
#ifdef AM43XX_FAMILY_BUILD
uint32_t clksel = *((uint32_t*) (SOC_CM_WKUP_REG + PRCM_CM_CLKSEL_DPLL_MPU));
uint32_t ctrlStats = CTRL_STS;
#elif defined (AM335X_FAMILY_BUILD)
uint32_t clksel = *((uint32_t*) (SOC_CM_WKUP_REGS + CM_WKUP_CM_CLKSEL_DPLL_MPU));
uint32_t ctrlStats = CONTROL_STATUS;
#endif
dpllMult = (clksel >> 8 ) & 0x3FF;
dpllDiv = clksel & 0x7f;
uint32_t controlMod = CHIPDBBaseAddress(CHIPDB_MOD_ID_CONTROL_MODULE, 0u);
unsigned osclk_freq = *((uint32_t*)(controlMod + ctrlStats));;
osclk_freq = (osclk_freq & 0x00C00000)>>22;
/* Reference GetInputClockFrequency (GEL files) */
if(osclk_freq == 0)
#ifdef AM43XX_FAMILY_BUILD
clkin = 96;
#elif defined (AM335X_FAMILY_BUILD)
clkin = 19;
#endif
else if(osclk_freq == 1)
clkin = 24;
else if(osclk_freq == 2)
clkin = 25;
else if(osclk_freq == 3)
clkin = 26;
return ((dpllMult/(dpllDiv + 1)) * clkin);
}
The source code you referred to:
divider = (divider >> 8 ) & 0x3FF;
....
return (clkin*divider);
It messed up what multiplier is and what divider is, and it used the wrong formula.
Regards, Eric