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/PROCESSOR-SDK-AM437X: CPU frequency

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: AM4376, TPS65218

Tool/software: TI C/C++ Compiler

I am now using AM4376 based by the TI-RTOS(ccs Version: 9.1.0.00010,  sdk_rtos_am437x_6_01_00_08), but I do not know  what frequency my AM4376 runs on. 

In the .cfg file, I notise that the BIOS.cpuFreq.lo=600000000. does it mean that the cpu is running on 600MHz?

is the BIOS.cpuFreq.lo 1000000000, if we want it running on 1GHz?

  • Hi zhuangbin,

    TI RTOS doesn`t setup the device clocks, the device clock initiation is the responsibility of the initialization code (GEL file in debug environment and bootloader in production environment). You can change "BIOS.cpuFreq.lo" value to 1000MHz, but this will only impact Timer clock ticks, MPU PLL settings will NOT be updated. Please refer to below pointers for details:

    http://software-dl.ti.com/processor-sdk-rtos/esd/docs/latest/rtos/index_how_to_guides.html#how-to-get-accurate-clock-ticks-from-the-clock-module

    https://e2e.ti.com/support/processors/f/791/t/663211

    https://e2e.ti.com/support/processors/f/791/t/434330

    Regards,
    Pavel

  • Hi Pavel,

    I had seen the 663211 and 434330. its content has been basically understood. now I know that I have to change the PLL setting in the bootloader code and the  PMIC voltage setting.

    How do you do it? Can you provide a complete routine?

  • zhuangbin,

    You can change AM437x EVM MPU_DPLL settings from:

    1. GEL file

    ccs910/ccs/ccs_base/emulation/boards/evmam437x/gel/AM43xx_PLLconfig.gel   -> MPU_PLL_Config()

    The status can be checked by below GEL function:

    ccs910/ccs/ccs_base/emulation/boards/evmam437x/gel/AM437x_Status.gel --> MPU_PLL_settings()


    2. PDK

    pdk_am437x_x/packages/ti/starterware/bootloader/src/am43xx/sbl_am43xx_platform_pll.c  ---> SblPlatformPllMpuInit()


    Note that OPP_NOM (600 Mhz ) MPU PLL Lon this device is the default EVM power configuration used with the PMIC. If you need to change the PLL to 800 (OPP_Turbo) and 1GHz (OPP_Nitro) then you need to increase the PMIC voltage setting as described in the data sheet so the SOC can operate at those performance points.

    In software this can be done using PM LLD driver that we provide in the Processor SDK RTOS . PM LLD send s I2C commands to change the PMIC voltage settings. Refer to the pmrtos_measurement application and clock and divider settings is provided in the spreadsheet AM437x_ClockRate_SetConfig_Generator.xlsm at the location :
    <PDK_INSTALL_PATH>\packages\ti\drv\pm\src\pmlib\prcm\V4

    Regards,
    Pavel

  • Hi,

    I have known that change it at GEL as follow:

    MPU_PLL_Config(  CLKIN, 0, 25, 1);    //600MHz

    to

    MPU_PLL_Config(  CLKIN, 2, 125, 1);    //1000MHz

    is it correct?

    but, I still don't know how to change it in bootloader. I can't find where the OPP_NOM is set. can you tell me how to do it?

    and, I have found where to set the voltage in: C:\ti\pdk_am437x_1_0_16\packages\ti\starterware\bootloader\src\am43xx\sbl_am43xx_platform.c

    the code is:

    PMICDeviceTps65218RegWrite(DEVICE_ID_PMIC_TPS65218, 0, DCDC3_CONTROL_REG, DCDC3_OUTPUT_1_35V);

    but I do not know what voltage I have to change to?

  • Hi,

    I have researched the code of pm_measurement_main.c, and I find that the function Power_setPerformanceLevel() can be used to set the CPU frequency at run time.this function call the PMLIBClkRateSet() to set the clock rate of the given module(The API makes sure when the frequency of a CPU is changed such that the OPP shifts, the PMIC is also programmed to change the voltage to correspond to this OPP shift).

    Can I use this function change the cpu frequency at run time?Is my understanding correct?

    if I want change it at the phase of bootloader, What should I do?

  • user5371084 said:
    MPU_PLL_Config(  CLKIN, 0, 25, 1);    //600MHz

    to

    MPU_PLL_Config(  CLKIN, 2, 125, 1);    //1000MHz

    is it correct?

    In the case where CLKIN=24MHz, yes, this is correct.

    user5371084 said:

    but, I still don't know how to change it in bootloader. I can't find where the OPP_NOM is set. can you tell me how to do it?

    and, I have found where to set the voltage in: C:\ti\pdk_am437x_1_0_16\packages\ti\starterware\bootloader\src\am43xx\sbl_am43xx_platform.c

    the code is:

    PMICDeviceTps65218RegWrite(DEVICE_ID_PMIC_TPS65218, 0, DCDC3_CONTROL_REG, DCDC3_OUTPUT_1_35V);

    but I do not know what voltage I have to change to?

    You can use PMAppOppConfig() function from file {PDK}/packages/ti/starterware/examples/pm/pm_app.c You need to pass PM_APP_OPP_NITRO. Check for example below OPP100 usage:

    {PDK}/packages/ti/starterware/examples/pm/am43xx/am43xx_pm_app.c

    PMAppOppConfig(PM_APP_OPP_100);

    /* Set the voltage for the VDD_MPU */
        PMICSetRailVoltage(PMIC_DEVICE_RAIL_TYPE_MPU, pPmAppOpp->voltage);

     

    PMICDeviceTps65218RegWrite(DEVICE_ID_PMIC_TPS65218, 0, DCDC3_CONTROL_REG, DCDC3_OUTPUT_1_35V);

    This function sets DCDC3 to 1.35V, which is used for VDDS_DDR (DDR3 IO supply).

    Regards,
    Pavel

     

  • user5371084 said:

    I have researched the code of pm_measurement_main.c, and I find that the function Power_setPerformanceLevel() can be used to set the CPU frequency at run time.this function call the PMLIBClkRateSet() to set the clock rate of the given module(The API makes sure when the frequency of a CPU is changed such that the OPP shifts, the PMIC is also programmed to change the voltage to correspond to this OPP shift).

    Can I use this function change the cpu frequency at run time?Is my understanding correct?

    Yes, you can use it. Check below e2e thread for details:

    https://e2e.ti.com/support/processors/f/791/t/727308

    user5371084 said:
    if I want change it at the phase of bootloader, What should I do?

    You can use PMAppOppConfig() function from file {PDK}/packages/ti/starterware/examples/pm/pm_app.c You need to pass PM_APP_OPP_NITRO. Check for example below OPP100 usage:

    {PDK}/packages/ti/starterware/examples/pm/am43xx/am43xx_pm_app.c

    PMAppOppConfig(PM_APP_OPP_100);

    /* Set the voltage for the VDD_MPU */
        PMICSetRailVoltage(PMIC_DEVICE_RAIL_TYPE_MPU, pPmAppOpp->voltage);

    You need to implement this in {PDK}/packages/ti/starterware/src/am43xx/sbl_am43xx_platform.c

    Regards,
    Pavel

  • Yes,

    I think that I have seen.

    Thank you very much!