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.

How to confirm CPU frequency

Other Parts Discussed in Thread: AM3358, SYSBIOS

Hi Sir :

I work on AM335x platform, the tools's version are as below.

CCS V6

am335x_sysbios_ind_sdk_1.1.0.8

bios_6_41_04_54

ndk_2_24_01_18

xdctools_3_30_06_67_core

My custom board uses AM3358 1Ghz and DDR3 as beagle bone black does.

So, I use beagle bone black's gel file to initial my custom boards.

Since the CPU frequency of AM3358 is 1Ghz, so I modify the gel file as below.

hotmenu ARM_OPP100_Config()
{
GEL_TextOut("**** AM335x ALL PLL Config for OPP == OPP100 is in progress ......... \n","Output",1,1,1);
GetInputClockFrequency();
if(CLKIN==24)
{
MPU_PLL_Config( CLKIN, 23, 1000, 1);
CORE_PLL_Config( CLKIN, 23, 1000, 10, 8, 4);
DDR_PLL_Config( CLKIN, 23, 400, 1);
PER_PLL_Config( CLKIN, 23, 960, 5);
DISP_PLL_Config( CLKIN, 23, 48, 1);
GEL_TextOut("**** AM335x ALL ADPLL Config for OPP == OPP100 is Done ......... \n","Output",1,1,1);
}
else
GEL_TextOut("**** AM335x PLL Config failed!! Check SYSBOOT[15:14] for proper input freq config \n","Output",1,1,1);
}

However, when I load my out file, the resume button never turn to green.

My question is how to change my CPU frequency and how to confirm my CPU frequency?

Please give me some suggestion.

Best regards,

Marcus

AM335X_beagleboneblack.gel

  • Marcus,

    Your question doesn't seem to be specific to TI-RTOS, so I went ahead and moved this thread over to the device forum in hopes that you will get a faster response there.
  • Looks like you changed the frequency appropriately. However, where did you configure the voltage? If you have not correspondingly increased the voltage you're probably hitting an exception.
  • Hi Brad :

    I appreciate your reply!

    I modify bootloader source code in starterware directory to suit my custom board with DDR3 and 1Ghz of CPU frequency.

    I modify MPU voltage to 1325MV likes code below.

    /* Increase USB current limit to 1300mA */
    TPS65217RegWrite(PROT_LEVEL_NONE, POWER_PATH, USB_INPUT_CUR_LIMIT_1300MA,USB_INPUT_CUR_LIMIT_MASK);

    /* Set DCDC2 (MPU) voltage to 1.275V */
    TPS65217VoltageUpdate(DEFDCDC2, DCDC_VOLT_SEL_1325MV);

    After that, I modify my AP and add statements like below.

    BIOS_getCpuFreq(&frg);
    ConsoleUtilsPrintf("cpu frequency = %d ; %d\r\n",frg.lo,frg.hi);

    However I get 550000000(frg.lo) ; 0(frg.hi) .

    I confirm that in my APP config file does not have CPU frequency statement.

    My question is how to confirm what I modify are correct to get the correct CPU frequency?

    Another question is how to measure task latency in sysbios?

    Is there any tools like cyclictest that can measure latency?

    Best regards,

    Marcus 

     

  • lu yuenjune said:
    My question is how to confirm what I modify are correct to get the correct CPU frequency?

    See this section:

    http://processors.wiki.ti.com/index.php/AM335x_Clock_Tree_Tool#Importing_Data_from_Actual_Hardware

    You can use the script mentioned there to interrogate all the important registers and then import that rd1 file into the Clock Tree Tool to view the corresponding clock configuration.

    lu yuenjune said:

    Another question is how to measure task latency in sysbios?

    Is there any tools like cyclictest that can measure latency?

    That's a much different topic.  Please don't mix threads.  That should be in its own thread in the TI-RTOS forum.

  • lu yuenjune said:
    My question is how to confirm what I modify are correct to get the correct CPU frequency?

    When I was setting the CPU frequency on a third party board, as a sanity check I reported the number of PMU Cycle Count Register increments which occured in one second (as measured by the RTC). Where the PMU Cycle Count Register increments at the CPU frequency.

  • Hi Chester :

    I appreciate your reply!

    Could you tell me the address of PMU Cycle Count Register, because I can not find this register in TRM?

    Best regards,

    Marcus
  • lu yuenjune said:
    Could you tell me the address of PMU Cycle Count Register, because I can not find this register in TRM?

    The Cycle Count Register is part of the Cortex-A8 System control coprocessor registers. Thus the Cycle Count Register is described in the ARM Cortex A8 Technical Reference Manual (as opposed to the TI AM335x TRM)

  • lu yuenjune said:
    Could you tell me the address of PMU Cycle Count Register, because I can not find this register in TRM?

    The SYS/BIOS TimestampProvider for the Cortex A8 uses the internal PMC counter which counts CPU cycles. i.e. you can use the SYS/BIOS TimestampProvider to read the Cycle Count Register.