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.

CCS/AM5708: Timer Val Configuration

Part Number:

Tool/software: Code Composer Studio

Tool/software: TI C/C++ Compiler

Tool/software:    TI C/C++ Compiler

IDE:                     CCS studio v 9.1.0.00010

SDK:                   C:\ti\pdk_am57xx_1_0_15\packages\ti\csl

Core:                  DSP Core 

OS:                     Single Loop System(No OS/ RTOS)

 

I have configured 130 us timer Interrupt for Timer 9  in DSP core. It is working fine.

But I want 130.208 us timer interval how to configure 130.208 us  Interval? 

Kindly any one help me . I have Shared my timer interval configuration below 

uint32_t INP_CLK_FREQ = 20000000U;      // Input clock 20Mhz Default

Timer_val(INP_CLK_FREQ, 130U,1U);        // Timer Delay 130us , Prescaler 1u

 

void Timer_val(uint32_t inp_clk, uint32_t delay, uint32_t prescl_val)
{
      uint32_t divisor = 1000000U, count = 0U;

      divisor = divisor * prescl_val;
      count = (inp_clk / divisor) * delay;


       if(count <= 0xffffffffU)
       {
            TIMER_INITIAL_COUNT = 0xffffffff - count;
            TIMER_RLD_COUNT = 0xffffffff - count;
      }
      else
      {
           TIMER_INITIAL_COUNT = 0U;
           TIMER_RLD_COUNT = 0U;
      }
}