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.

RTOS/AM5746: Changing MPU frequency on demand

Guru 24520 points
Part Number: AM5746
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hi TI Experts,

Please let me confirm the following question.

[Question]
Would you please teach me the way to change the MPUs frequency on demand against for process load in case of using the TI-RTOS? Also, could customer change the frequency which they would like to set?

Best regards.
Kaka

  • The RTOS team have been notified. They will respond here.
  • Part Number: AM5746

    Tool/software: TI-RTOS

    Hi TI Experts,

    Would you please teach me the way to disable the CPU core on demand in case of using the TI-RTOS? Does it only process by stopping the clock for core with using any APIs?

    Our customer would like to stop the unnecessay core which nothing to do.

    Best regards.
    Kaka

  • Kaka,

    Please stop generating new threads on subjects you have already raised. Please try to consolidate your queries on the same subject BEFORE posting.
  • Hi,

    Changing the MPU frequency also requires the change of voltage supply on the run time based on the system load, the customer can use the PM library in the Processor SDK RTOS of AM57x.

    In our TI EVM, the PMIC controls the voltage supply and is accessed by I2C. So you need both I2C and PM library for this purpose. The CPU can run at several different speed/voltages: OPP_NOM, OPP_OD and OPP_HIGH. You can refer to pdk_am57xx_1_0_11\packages\ti\drv\pm\examples\pmrtos\src

    Look for the implementation of the API:
    Power_setPerformanceLevel();

    There is a training for use of PM LLD that may be useful as well.
    pdk_am57xx_1_0_11\packages\ti\drv\pm\docs\training

    Regards, Eric
  • Hi,

    For disable one MPU in RTOS, current RTOS driver example only use the first ARM core. If you have user cases running SYSBIOS with SMP enabled, please check this wiki: processors.wiki.ti.com/.../BIOS

    There are several E2E threads discussed for disabling the second MPU (mostly in Linux context), but the same also apply to TI RTOS how to disable the clock to it:

    e2e.ti.com/.../465747
    e2e.ti.com/.../653017

    Regards, Eric
  • Hi Eric,

    Thank you for your response.
    I could understand that AM57x series need to change the supply power against for CPU frequency. Also the documents which you introduced is good to understand how to run the Power management. By the way, do you have any information to use the custom cpu frequceny like 500MHz or 300MHz and so on for A15 core?

    Best regards.
    Kaka
  • Hi Eric,

    Thank you for your response about this topic.
    I confirmed the E2E thread which you have shown, but the case is not for TI-RTOS as you said.
    According to those thread, to disable the core, customer needs to set some registers .
    PM_CPU1_PWRSTCTRL[1:0] POWERSTATE bit field to 0x0 (OFF state)
    PM_CPU1_PWRSTCTRL[7] FORCED_OFF bit to 0x1
    Does TI-RTOS provide the API to do set those registers?

    Best regards.
    Kaka
  • Hi,

    If you want to run the A15 at any other frequency like 300MHz, 500MHz, a good approach is write code similar to GEL file or SBL to set different PLL_M, PLL_D, PLL_OD:

    GEL: ccs_8_0_0\ccsv8\ccs_base\emulation\boards\am572x\gel\AM572x_prcm_config.gel

    dpll_a15_opp_config(uint32_t OPP, uint32_t DEVICE_TYPE)
    {
    uint32_t dpll_m, dpll_n, divm2, dcc_en;
    dcc_en = 0;

    GEL_TextOut("\tCortex A15 DPLL OPP %d clock config is in progress...\n",,,,, OPP);

    if(OPP_HIGH == OPP)
    {
    //1500MHz at 20MHz sys_clk
    dpll_m = 600;
    dpll_n = 7;
    divm2 = 1;
    dcc_en = 1;
    }
    else if(OPP_OD == OPP)
    {
    //1176MHz at 20MHz sys_clk
    dpll_m = 294;
    dpll_n = 4;
    divm2 = 1;
    }
    else //default to OPP_NOM
    {
    //1000MHz at 20MHz sys_clk
    dpll_m = 500;
    dpll_n = 9;
    divm2 = 1;
    }

    SBL/Board: pdk_am57xx_1_0_11\packages\ti\board\src\evmAM572x\evmAM572x_pll.c
    Board_STATUS Board_PLLInit(Uint32 opp)

    Regards, Eric
  • Hi,

    "Does TI-RTOS provide the API to do set those registers?" See PMLIB:
    /**
    * \brief Enter CPU1 into FORCE_OFF mode.
    *
    * This function can be used by the application to enter CPU1
    * into FORCE_OFF mode when no binary is loaded for CPU1.
    *
    *
    * \return none
    */
    void PMLIBCpu1ForcedOff(void);

    Regards, Eric
  • Part Number: AM5746

    Tool/software: TI-RTOS

    Hi TI Experts,

    Please let me confirm the following question related to E2E thread.

    [Question]
    When customer are using the TI-RTOS system, how to change the CPU frequency for each core after running application?
    Do you have any code to change the CPU frequency on SYSBIOS API?

    I have asked your team the timing at SBL but I would like to know it after running application.
    Best regards.
    Kaka

  • Hi,

    The way to change CPU frequency is provided earlier by using PM library:

    In our TI EVM, the PMIC controls the voltage supply and is accessed by I2C. So you need both I2C and PM library for this purpose. The CPU can run at several different speed/voltages: OPP_NOM, OPP_OD and OPP_HIGH. You can refer to pdk_am57xx_1_0_11\packages\ti\drv\pm\examples\pmrtos\src

    Look for the implementation of the API:
    Power_setPerformanceLevel();

    There are only several specified operating points you can change, not any arbitrary frequency.

    The SYSBIOS doesn't manage detailed chip power, there is no SYSBIOS API for this.

    Regards, Eric
  • Hi Eric,

    Thank you for your response.
    I could understand that customer should use the above API which you described before changing the CPU frequency.
    There are three operation points as below.
    1. Power_PERFLEVEL_OD
    2. Power_PERFLEVEL_HIGH
    3. Power_PERFLEVEL_LOW

    If customer would like to use the 300MHz for A15, they can use the Power_PERFLEVEL_LOW for PMIC. Is my understanding correct?
    Also would you please teach me the way to change the frequency from 1GHz to 300MHz in case of using TI-RTOS? Do you have any API to do it?

    By the way, does the code on pm_main.c change the CPU frequency?
    It seems that the supplied power is changed but the CPU frequency is not changed.

    Best regards.
    Kaka
  • Hi,

    From AM57x datasheet, you can find the Voltage And Core Clock Specifications section, for the several OPP points: NOM, OD and High, there maximum CPU frequency and voltage requirement.

    Basically you need a higher voltage to run a higher frequency. For 300MHz, you can use the same voltage supply as OPP_NOM 1000MHz.

    Also would you please teach me the way to change the frequency from 1GHz to 300MHz in case of using TI-RTOS? Do you have any API to do it? =====> No, the issue is that for a given Power_PERFLEVEL_LOW/NOM/OD/HIGH, there is a 1:1 corresponding A15 frequency for this, this doesn't have the 300/500 MHz you requested.

    You need to develop this based on PM. The flow like define a new performance level of 300MHz:
    Power_PERFLEVEL_300MHz, =========>call the Power_setPerformanceLevel()======>PMLIBClkRateSet, you supply a new set of PLL for A15 @300MHz.

    Regards, Eric
  • Hi Eric,

    Thank you for your response.
    I checked the PM library, it seems that there is some compile switch as below.
    SOC_TDA2EX
    SOC_TDA2XX
    SOC_TDA2PX
    SOC_TDA3XX

    In case of using the AM574x, which option should customer select?

    Best regards.
    Kaka
  • Hi,

    You need to use SOC_AM574x.

    Regards, Eric