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.

CPU clock configuration?

Other Parts Discussed in Thread: OMAP-L138, OMAPL138, SYSBIOS

I'm wondering about how the clock configuration is done in SYS/BIOS6.

If I have a 24MHz reference clock, how do the SYS/BIOS know that? Where do I adjust that parameter?

I only find CPU clock frequency (Hz) setting under Platform Settings.

 

  • Marko,

    The platform is indeed where the input clock frequency should be accounted for. 

    What device and platform are you using? 

    Are you seeing an issue with your clock period?

  • I'm just wondering where the PLL and clocking is set up. Does the SYS/BIOS do any of this setup or is it the GEL file that shall do that?

     

  • Again, what device and platform are you using? 

  • It is a C6748 on a OMAP-L138 EVM.

     

  • Hi Marko Siponen,

    The platform sets a default CPU speed.  For OMAPL138 this is set to 300MHz.  You can view and/or edit the platform using the RTSC platform wizard (see this link for details on the platform wizard: http://rtsc.eclipse.org/docs-tip/Demo_of_the_RTSC_Platform_Wizard_in_CCSv4)

    The GEL files also allows you to change this using different PLL multipliers and dividers.  For example, the OMAPL138 GEL script that I have has a function:

    Set_Core_300MHz() {
        device_PLL0(0,24,1,0,1,11,5);
        GEL_TextOut("\tPLL0 init done for Core:300MHz, EMIF:25MHz\n","Output",1,1,1);
    }

    I've attached the GEL file so you can see more details on the above code if you like.

    Steve

    1754.omAPL138_DSP.txt

  • Hello again

    I have now moved my code to a custom board. The board uses a 25MHz oscillator. On the evaluation board it was 24MHz.

    I have made the changes in the GEL script to run at 300MHz. But how do I tell SYS/BIOS what frequency the oscillator has? I can’t find a setting for it.

    If I debug my code in CCS4 I can see in the register view that TIMER64P0DSP->TIM12 is set to 24000. Shouldn’t it be 25000 to get a 1ms timer?

    And one more question. I would need to use the Timer0 to drive pin TPM64P0_OUT12. Is this possible or do we have to re-CAD the board?

     

  • I found some settings under Target Specific Support:

    I have seen that this changes the TIMER64P0DSP->TIM12. Is this the correct place to change this?

    And one more question. Why does it say C64P and not C67P under Target Specific Support. I use a C6748, so I have selected a "Generic C674P Device":

  • Now I have tested more things. I found a way to select which timer to use for systick:

     

    This enables me to use timer3. :-)

    But now I have one more question (again). I see that this change make SYS/BIOS use CPUINT7 instead of CPUINT14. What defines which CPUINT is used?

     

     

  • Marko --

    Unfortunately, there's no way to specify which interrupt id for the Clock module to use for the timer.  This information cannot currently be passed down thru our hal.Timer interface.

    There is a workaround.

    [1]  update the Clock module to specify that the application call Clock_tick() by adding the following to your .cfg file:

    var Clock = xdc.useModule('ti.sysbios.knl.Clock);
    Clock.tickSource = Clock.TickSource_USER;

    [2]  create a timer object that uses timer 3 and have it call an ISR that calls Clock_tick().  Add the following to your .cfg:

    var timer0Params = new Timer.Params();
    timer0Params.instance.name = "myTimer3";
    timer0Params.period = 1000;
    timer0Params.intNum = 14;
    Program.global.myTimer3 = Timer.create(3, "&myTimer3isr", timer0Params);

    [3]  Add the myTimer3isr() C function to your app.c:

    Void myTimer3isr()
    {
        Clock_tick();
    }

    I verified that this works on my 6748 setup and I've attached a CCSv5.1 project.  You can extract the .c and .cfg and create a project of your own if you are using CCSv4.2.

    7433.task6748.zip

    Regards,
    -Karl-

     

    P.S.  This thread was marked answered.  It would be good to open a new thread for the next issue so that it shows up as a new issue.  Threads that are marked answered don't get as much attention as threads that are still open.  But, we can continue to work this issue on this thread.

     

  • Thank you for your reply. I will follow your suggestion.

    And how about the C64P under the under Target Specific Support. Why does it say C64P and not C67P?

     

  • The 67P is the 672x device which is much different than the 674x.

    The 674x is really just a 64x+ (64P) with floating point.   So, some of the support modules to support 674x are identical to the 64x+ and we therefore use 64P for them.   If you go to cdoc in the family package, you should see a "Delegates" link and you can see the delegates for your given target.

    -Karl-