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.

Timer not working with ARM processor (OMAPL137)

Other Parts Discussed in Thread: OMAPL138

Hi guys, 

Fairly new to the board and the processor, I cannot somehow get my timer to run on the evaluation board (EVMOMAPL137 from Spectrum Digital). 

I am using the bsp provided by them. The timer works perfectly fine for the dsp. But when i try to use the same code for arm, it somehow does not work. 

Timer initialization

void TimerInit(unsigned short timerId)
{
timerId = timerId;

//Use Timer 0
TIMER0_TGCR = 3; //0bxx...0011, reset, 64bit general purpose timer.

TIMER0_PRD12 = 0xffffffff; //Period, lower limit, equ. (0x1 0000 0000 * 1/24) us, e..g, 1 clock tick = 12.5 dsp clock
TIMER0_PRD34 = 0xffffffff; //peroid, higher limit

TIMER0_TRC = 0x00000080; // continous timer
}

Reading timer registers

unsigned int GetTime()
{
//WARNING: THIS TIMER DOES NOT HAVE OVERFLOW DETECTION
return TIMER0_TIM12;

}

Calling timer from main

void main(void)
{
unsigned int i,tRef,tRef2,tRead,t1,t1Again;
int q=0;

TimerInit(0);

tRef = GetTime();
tRef2 = GetTime();

}

Any help would be appreciated.

Thanks, 

Sh

  • Hi,

    I am using the bsp provided by them. The timer works perfectly fine for the dsp. But when i try to use the same code for arm, it somehow does not work.

    Could you please provide the link & package name and version that you have downloaded.

    Thank you.

  • Downloaded from their website 

    http://support.spectrumdigital.com/boards/evmomapl137/revg/

    I guess that's revision G and test code is dated 10/10/12

  • Hi 1898541,

    I am not sure that the code pasted here is enclosed in any of the packages released by SDI

     (For example: "revg_EVMOMAPL137_BSL" or "quickStartOMAPL1x_rCSL-2.0-Setup") ?

    Please provide the name of the package and it's examples.

    And also, as this is the third party package, you can only expect very limited support on their software.

    Provide more information on what do you expect from software on timer peripheral and what you actually got?

    Did you try the on-board emulator to debug your code?

     

    Regards,

    Shankari

    -------------------------------------------------------------------------------------------------------

    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  • I got it working. Initially i i was under the impression that i need to start a debug session, connect dsp (as it enables the arm in gel file) and then run the arm. The timer does not work that way. 

    It works when i start the debug session and just run the arm processor. Somehow it would run the gel file settings from the dsp gel file cause i see the sdram working on the emifb interface.

    Is there a place which can explain to me this phenomenon. What exactly is the boot procedure when the boot config pins are in emulation mode and i start the debugger.

     thanks, 

    AQ

  • On a second note, this is not the case. 

    I realize that it somehow fails to initialize the sdram if i open a new session of CCS (btw using ccs 4). 

    I then run another sample project which initiates the dsp and runs only the dsp. Then i stop the debugging and start debugging my arm project. I guess it remembers the old settings and initializes the sdram. 

    This is totally bizarre. Can you explain to me what is going on ? So every time i connect the debugger, the SOC never flushes its data ??

    Please enlighten me with your high end environment + processor + debugger. 

    Thanks, 

    AQ

  • Hi,

    This is totally bizarre. Can you explain to me what is going on ? So every time i connect the debugger, the SOC never flushes its data ??

    No, It won't behave at all.

    When you start debug session, the gel file initialize all the peripheral including memories,

    It could behave as you said only when you "reload" or "load" option to run the DSP/ARM app.

  • Do i need to run the DSP gel file to activate the arm ?? 

    What does the arm gel file do ??

    Can you outline here the boot sequence for debugging mode ???

  • Hi,

    In general, If you want to run DSP app, Select DSP core and choose "connect target" option to enable DSP core.

    If you want to run ARM app, Select ARM core and choose "connect target" option to enable ARM core and load your ARM app on it thorough "Load" option.

    CCS will call appropriate gel file for mentioned boards (OMAPL138 EVM or LCDK).