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.

Not able to start TIMER0 in 64 bit GP timer mode on C674X

Other Parts Discussed in Thread: OMAPL138

Hi,


I am using OMAPL138 logic pd board. I am connected with omapl138 through CCS5.5. I'm trying to initialize a timer0 on dsp  with following steps,

step followed:

1) Launching CCS 5.5 with xds v2 emulator. target configuration omapl138

2) loading arm gel file only to wake up dsp. no PLL initialisation are done from arm gel file.

3) Loading DSP (c6748 gel file) , which will initialize all (core, peripherals, clocks etc)

4) within gel file created new hotmenu entry for handling timer0

/*Timer register*/
#define TGCR  *(unsigned int*)(0x01C20024) /* Timer Global Control RegisteR */
#define TCR   *(unsigned int*)(0x01C20020) /* Timer Control Register */
#define PRD12 *(unsigned int*)(0x01C20018) /* Timer Period Register 12 */
#define PRD34 *(unsigned int*)(0x01C2001C) /* Timer Period Register 34 */
#define TIM12 *(unsigned int*)(0x01C20010) /* Timer Counter Register 12 */
#define TIM34 *(unsigned int*)(0x01C20014) /* Timer Counter Register 34 */

hotmenu Timer64()
{
    
    TIM12 = 0x00000000;
    TIM34 = 0x00000000;
    PRD12 = 0xFFFFFFFF;
    PRD34 = 0xFFFFFFFF;
    TGCR  = 0x00000003;
    TCR   = 0x00000040;        
            
}

After running the above hot menu command from scripts in CCS. In memory browser i don’t see the TIM12(0x01C20010) , timer counter register incrementing . But TGCR and TCR PRD12, PRD34 gets set to the values which are mentioned above. but timer doesn't run.

Is there anything else, i need to do ?

Any ideas, please let me know.

Thanks

 

  • Hi Chaitanya,

    I Have run csl based timer example project
    \pdk_OMAPL138_1_01_00_02\packages\ti\csl\exampleProjects\timer_exampleProject

    I have done same modifications in dsp gel file which you have mentioned in your post. and "TIM12" value is incrementing.

    Which example you are working with? Is it TI example code or your own custom code.
  • Hi,


    Can you tell what is timer expiry duration in secs or milli secs. since i'm watching on ccs for TIM12 register to change the counter values, but i don’t see it moving.

    is there any clocks or power domains which has to enabled before. By the way, i'm trying to use internal clock as the source. CLKSRC12 = 0.

    if any proved step to make it work, please provide me, which i can use it in ccs and try it out.

    Thanks

  • Hi Chaitanya,

    2) loading arm gel file only to wake up dsp. no PLL initialisation are done from arm gel file.

    You should call "ARM gel" file to initialize the every peripherals and clocking etc., and then connect DSP through DSP gel file.(DSP gel file just do the memory map and it won't do any initialization and enable etc.,)
    Otherwise you could see unexpected behavior.
    Have you modified the DSP gel file for initialization the peripheral ?
    What is the purpose of doing "Timer64()" in gel file and why not in your code ?
  • I'm actually initializing the clocks for core and peripherals from the dsp gel.

    Anyways my problem got solved. I'm actually using it through the jtag interface, so the timer will not be driven by cpu clock. It will be driven by timer peripheral clock. so when u r in emulation mode, we have to take care of handling emulation events to cpu. basically we have emulator management register for each timer, which determine how the timer should responds to an emulation suspend event. By handling this i was able to handle the timer.

  • Sound's good that your problem is resolved.