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.

Changes in SYSCLK frequencies with SYS/BIOS

Other Parts Discussed in Thread: OMAPL138, CCSTUDIO

Hi,

I am using OMAPL138, CCS 5.1.1, Bios 6.33.03.33, PSP 03.00.01.00, xdc 3.23.01.43.
I want to run my DSP and ARM at 405MHz. I changed PLL settings in ARM for all SYSCLK frequencies.

Now I have created a custom RTSC platform and set Clock frequency to 405MHz.
With this both ARM and DSP are running at 405MHz.

I am using PSP drivers and I see that SYSCLK frequencies are still at default 300MHz (based on the clock for some peripherals like UART).
Earlier I have changed SYSCLK frequencies in PSP/CSLR and compiled PSP platform.

Is there any way to do this without PSP/CSLR changes?


thanks, Durga

  • Hi Durga,

    Firstly, If the PLL settings(for 405MHz) is done appropriately in the GEL file, then for any peripheral that use SYSCLK frequencies should receive assigned frequency. For Example, at UART0 (with CSL_SYSCLK_1_FREQ/2) you should be getting approximately 202MHz for PLL settings of 405MHz. Please try probing and check if this is true.

    Secondly, for the UART to work with this frequency, changes have to be done appropriately in the soc_C6748.h file of the BIOSPSP package. Modify "CSL_SYSCLK_1_FREQ". 

    Hope this helps..


    Best Regards,

    Raghavendra

  • Hi Raghavendra,

    1. I am not using GEL file. I am configuring the PLL on ARM using bare metal code. SYS/BIOS is running on DSP.
       I thought setting Clock frequency in RTSC custom platform to 405MHz, will take care of all the peripheral frequencies.

    2. If changes are done to soc_C6748.h in BIOSPSP package, things are fine.
       But I dont want to make changes to BIOSPSP package.
       Is there any other way to handle this? I saw in one of the posts

    thanks, Durga

  • I saw in one of the BIOS posts that we can change clock frequencies in .cfg file.

    Please comment.

  • Hi Durga,

    durga temp said:
    But I dont want to make changes to BIOSPSP package. Is there any other way to handle this

    To my knowledge,I do not think there is any other way..

    durga temp said:
    I saw in one of the BIOS posts that we can change clock frequencies in .cfg file.

    Could you please share the link of the BIOS post?

    Best Regards,

    Raghavendra

  • Hi durga temp,

    You cannot change the CPU frequency in the *.cfg file itself.  To do this, you would need to edit the platform file, which defines the memory map and CPU speed of for the hardware.

    To see an example of how to edit a platform, please refer to the following links:

    http://processors.wiki.ti.com/index.php/Using_CCStudio_v4_to_create_a_custom_RTSC_platform

    http://rtsc.eclipse.org/docs-tip/Demo_of_the_RTSC_Platform_Wizard_in_CCSv4

    Alternatively, the CPU speed can be set at run time using the BIOS API:

        Void BIOS_setCpuFreq(Types_FreqHz *freq);

    Steve

  • Raghavendra,
    I was referring to BIOS_setCpuFreq what Steven has suggested.

    Steven,
    1. I have already created a custom platform and I have set clock frequeny to 405MHz.
       But the other SYSCLK frequencies seem to be not changed.

    2. Are there any bios api's which set other SYSCLK frequencies?
       Or setting CPU speed through BIOS_setCpuFreq takes care of other SYSCLK freq as well?

    thanks, Durga

  • Durga,

    BIOS_setCpuFreq() only changes the speed of the CPU.  I think what you're asking is about the system tick?

    If so, this is handled by the Clock module.  So, if you change the CPU frequency with BIOS_setCpuFreq() then you should call the Clock API Clock_tickReconfig()

    Note that if you are calling Clock_tickReconfig() outside of main, then you will also need to call Clock_tickStop() and Clock_tickStart().

    Here's a snippet from the SYS/BIOS API documentation.  For more information, please refer to the documentation itself; it can be found via the CCS help menu.
    Steve
    When calling Clock_tickReconfig outside of main(), you must also call Clock_tickStop and Clock_tickStart to stop and restart the timer. Use the following call sequence:
     // disable interrupts if an interrupt could lead to
    // another call to Clock_tickReconfig or if interrupt
     // processing relies on having a running timer
     Hwi_disable() or Swi_disable();
     BIOS_setCpuFreq(&freq);
     Clock_tickStop();
     Clock_tickReconfig();
     Clock_tickStart();
     Hwi_restore() or Swi_enable()
  • Hi Steven,

    OMAPl138 PLL generates SYSCLK1, SYSCLK2, SYSCLK3, SYSCLK4, SYSCLK5, SYSCLK6, SYSCLK7.
    Here SYSCLK1 goes to DSP, SYSCLK6 goes to ARM. Other SYSCLK's go to different peripherals.

    When we create a custom RTSC platform, we can set CPU freq ie (DSP - SYSCLK1 in my case) to 405MHz.
    But how will SYS/BIOS know about other SYSCLK's?
    Can we include other SYSCLK frequencies in RTSC custom platform?
    Or SYS/BIOS has any API's to set different SYSCLK frequencies?

    thanks, Durga

  • Hi Durga,

    The custom RTSC platform will only let you set the CPU speed; it is meant to configure the processor as well as memory for a given platform, it doesn't handle peripheral configuration.

    You can use the GEL file to configure SYSCLK properties.  You should be able to find the OMAPL138 gel file in the C:/ti/GEL folder.  You can check that folder for an example.

    Steve