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.

Basic questions about timers omapl137 and sysbios?

Other Parts Discussed in Thread: SYSBIOS

Hopefully this does not snowball too long but I have some basic questions about using timers in sysbios with the omapl137 that I can't figure out from the documentation: sysbios manual and omapl137 technical reference. spruex3q and spruh92d

  1. Is sysbios using 1 of the 2 timers of the omapl137? I think the answer is yes but I'm not 100% sure.
  2. Most of the xdc configuration for timers, in the app.cfg, is in us resolution or counts? Should I control the timer using period in counts if I need less than ms or can I specified fractional ms?
  3. Is count driven by the CPU clock directly or is there some division? In the technical reference I get the impression that count could be drive by the internal clock directly, which then referring to the PLL section looks like the count is driver directly from SYSCLK1.

The timers can be use to Output and Event (TM64P_OUT12) and trigger a DMA. I would like to use the timers in 32 bit mode unchained, one for the out event and one for the DMA. (this is to control the timing of an SPI ADC at 600 KHz)

  1. My first worry, is that, if I'm using sysbios I can't do this since 1 timer is already taken and the omapl137 only has 2 timers.
  2. I did not see support in the app.cfg to perform these two task (DMA and out event), is it supported or do I need to configure it outside the app.cfg?

  • I will ask our TI-RTOS(BIOS) experts to look into this. Thank you for your patience.
  • Hi Hoffiz,

    Are you running SYS/BIOS on the ARM or DSP core ?

    Hoffiz said:
    1. Is sysbios using 1 of the 2 timers of the omapl137? I think the answer is yes but I'm not 100% sure.

    OMAPL137 has 2 64-bit timers which can either be used as 2 32-bit timers (default behavior in SYS/BIOS) or as a single chained timer. So, technically there are 4 timers and SYS/BIOS uses one of them. 

    Hoffiz said:

    2. Most of the xdc configuration for timers, in the app.cfg, is in us resolution or counts? Should I control the timer using period in counts if I need less than ms or can I specified fractional ms?

    You can specify the period in counts or us (< 1ms). I personally prefer "us" unit as I dont have to translate time into timer counts. Specifying a period of less than 1 us can cause problems as timer interrupts will occur frequently and flood the core with interrupts.

    Hoffiz said:

    3. Is count driven by the CPU clock directly or is there some division? In the technical reference I get the impression that count could be drive by the internal clock directly, which then referring to the PLL section looks like the count is driver directly from SYSCLK1.

    Timers are driven by the AUXCLK which I believe is derived directly from the reference clock (oscillator input).

    Best,

    Ashish

  • Thanks Ashish,

    I have another thread investigating an exception related to my code controlling timers directly with the rCSL in sysbios. I'm working on the DSP side and only the DSP side,... for now :).

    My final application does not really need the interrupts but trying to familiarize myself with timers I'm trying to port the timers rCSL example to sysbios. My end goal is to generate a pulse through TM64P_OUT at 600 KHz (could be 50% duty) and trigger a DMA at 900 ns from the timer start. If you have any better suggestions on how to implement such code, please I will really appreciated. 

    I have copied all the necessary parts, build succesfully and mapped the interrupts with sysbios instead of creating an intvec. Interrupt seem to work ok as I can get into them but the behavior is no consistent. There are 5 configuration for interrupts, 2 for timers and 3 CMP. One of the timers runs every 2ms and toggle the leds, first timer just controls the dwell of the code to 20 s and the CMP are used to move from led 1 -3.

    I think I should continue my conversation in the other thread but if you have any insight please let me know.

  • I suppose you have another thread in the TI-RTOS forum. If so, then I agree its best to continue any timer related discussion there.

    Best,
    Ashish