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 BIOS : TI C6638 Multicore

Other Parts Discussed in Thread: SYSBIOS

Hi ,

I am using c6638 multicore "K2K" EVM board.

I want to create a timer of 120 milli sec using sysBios Timer Module.

Using the timer Id 10 for Timer1 for "120 ms" solved the purpose,

the timer created period "24399960" is dfifferent from defined"120000" AND the period type is different as well.

Please help me in understanding the issue.

Timer_Params timerParams;

Timer_Handle myTimer;

Timer_Params_init(&timerParams);

timerParams.period = 120000;

timerParams.periodType = Timer_PeriodType_MICROSECS;timerParams.arg = 1;

myTimer = Timer_create(10, myIsr, &timerParams, NULL);

ROV : Timer

Address halTimerHandle label id startMode runMode period periodType half prescalar intNum tickFxn arg extFreqLow extFreqHigh HwiHandle

0x008c3228,0x008c3430, ,0,StartMode_AUTO,RunMode_CONTINUOUS,203333,PeriodType_COUNTS,Half_LOWER,,14,ti_sysbios_knl_Clock_doTick__I,0x00000000,0x0,0x0,0x8c3428 0x00864ad0,   , ,10,StartMode_AUTO,RunMode_CONTINUOUS,24399960,PeriodType_COUNTS,Half_LOWER,,15,SwiGsmLteSync,0x00000001,0x0,0x0,0x864b28

Thanks and Regards,

Manav

  • Hi Manav,

    Which core are you running on for creating and initializing your timer?

    Have you specified that this is the core that will initialize the timer in your configuration (*.cfg) file?  For example:

    The following sample .cfg code sets core 1 to initialize a shared timer with id 4.
      var Timer = xdc.useModule('ti.sysbios.timers.timer64.Timer'); // sets core 1 to init and release Timer 4. Timer.timerSettings[4].ownerCoreId = 1;

    Also, where was your program halted when you got your ROV initialization?  Has your timer init code that you posted above had a chance to run yet?

    It may be more helpful to post screen shots of ROV (as opposed to the text that was pasted).

    Steve

  • Hi Steve,

    Thanks for the reply.

    using C6638 EVM board, i am developing AIF2 driver application to send receive IQ samples (GSM/EGPRS) to/from the FPGA, Mapping 208 GSM slots data to 240 LTE slots.
    As the AIF2 is syncronized to LTE slot/frame boundary "AIF2 AT module 500 us Event", i need a reference clock input of 120 milli sec to syncronize between ("208" GSM Slots(577 us), "240" LTE slots(500 us)).


    So i am using the Timer module of SysBIOS to create a "120 milli sec" interrupt and "577 us" sec interrupt.  

    1. Currently I am using the Core "0" for creating and initalizing the Timer.
    2. No have not specified the core that will initialize the timer in the ".cfg" file.
     ----> I am using the below code to create a timer in a API.
        
       Timer_Params_init(&timerParamsSync);
       timerParamsSync.period = 120000;
       timerParamsSync.periodType = Timer_PeriodType_MICROSECS;
       timerParamsSync.arg = 1;
       timerParamsSync.intNum = 8;
       timerHandleSync = Timer_create(4, SwiGsmLteSync, &timerParamsSync, NULL);
       ----> in the ISR printing the GsmSlotCount variable and LteSlotCount variable.
       
          Timer_Params_init(&timerParamsGsm);
       timerParamsGsm.period = 577;
       timerParamsGsm.periodType = Timer_PeriodType_MICROSECS;
       timerParamsGsm.arg = 1;
       timerParamsGsm.intNum = 9;
       timerHandleGsm = Timer_create(5, SwiGsmTs, &timerParamsGsm, NULL);   
       ---->  in the ISR incrementing the GsmSlotCount variable.
       
       
    3. Program is not halted, I am able to execute the timer interrupt ISR.
     ----> But facing syncronization issues.

    ----->When i see the ROV, the timer created shows the different period as defined.

    4. Due to security policies, I am unable to provide the screen shot. But I can share the details as below.-

     

    Answers and Suggestion required :-

    1. Why the timer period type is differnt from the defined ?

    2. As the AIF2 is not having the GSM slot "577 us" and 120 ms events, what will be optimal way to create the interupts for the same. ?

    3. please help me understanding the syncronisation between the BIOS created HWI and AIF2 internal created interrupts. 

     

    ROV: HWI
    Address halHwiHandle intNum fxn
    0x008c5f60 0x008c6028 14 ti_sysbios_knl_Clock_doTick__I
    0x0085fda8 4 Aif2_RadT_Sevt7_FSEVT1_ISR
    0x0085fdc8 11 Aif2_RadT_Sevt5_ISR
    0x0085fde8 10 Aif2_RadT_Sevt6_ISR
    0x0085fe08 6 Aif2_Exception_ISR
    0x00860298 0x00860288 15 SwiGsmLteSync
    0x00860320 0x00860310 12 SwiGsmTs
    arg irp eventId disable mask restore Mask
    0x00000000 0x00819f26 64 0x4000 0x4000
    0x00000000 0x00000000 94 0x10 0x10
    0x00000000 0x00000000 92 0x800 0x800
    0x00000000 0x00000000 93 0x400 0x400
    0x00000000 0x00000000 74 0x40 0x40
    0x00000001 0x00000000 66 0x8000 0x8000
    0x00000001 0x00000000 68 0x1000 0x1000
    ROV: Timer
    Address halTimerHandle id startMode
    0x008c5e20 0x008c6030 0 StartMode_AUTO
    0x00860230 8 StartMode_AUTO
    0x008602b8 9 StartMode_AUTO
    runMode period periodType
    RunMode_CONTINUOUS 203333 PeriodType_COUNTS
    RunMode_CONTINUOUS 24399960 PeriodType_COUNTS
    RunMode_CONTINUOUS 117323 PeriodType_COUNTS
    half prescalar intNum tickFxn
    Half_LOWER 14 ti_sysbios_knl_Clock_doTick__I
    Half_LOWER 15 SwiGsmLteSync
    Half_LOWER 12 SwiGsmTs
    arg extFreqLow extFreqHigh HwiHandle
    0x00000000 0x0 0x0 0x8c6028
    0x00000001 0x0 0x0 0x860288
    0x00000001 0x0 0x0 0x860310

     

  • Can you put a break point at your Timer ISR function SwiGsmLteSync.  When you hit the break point, what value do you see for that Timer's period in ROV?  Similarly, can you check the same for when you hit a break point set to SwiGsmTs?

    Manav Gupt said:
     ----> in the ISR printing the GsmSlotCount variable and LteSlotCount variable.

    What kind of print are you doing here?  Are you using the printf() function?  If so, you should not call this from ISR context as this can cause problems that are hard to debug (random failures, etc.).

    Steve