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.

How to start 2 or more RTI timer function for TMS570LS20216 from Halcogen?

Other Parts Discussed in Thread: TMS570LS20216, HALCOGEN

Dear fellow engineer,

How to start 2 or more RTI timer function for TMS570LS20216 from Halcogen?

Best Regards.

Dzoelham

  • Hello:

    Could you extend a little bit more about what are you trying to do? You can configure each of the 2 available counters independently in Halcogen in the RTI tab. Then, after you call rtiInit, you can start/stop/reset the counters independently by invoking the corresponding APIs.

    Regards,

    Enrique
  • Dear Enrique.

    I just succeed to toggle two gioPin in gioPORTA with two different periods.

    In the VIM Channel, RTI Compare 0 and RTI Compare 1 are enabled using IRQ.

    Then I set the period of RTI Compare 0 and 1:

    Then in the sys_main.c

    void main(void)
    {
    /* USER CODE BEGIN (3) */
        gioInit();
        rtiInit();

        rtiEnableNotification(rtiNOTIFICATION_COMPARE0);
        rtiEnableNotification(rtiNOTIFICATION_COMPARE1);


        _enable_IRQ();

        rtiStartCounter(rtiCOUNTER_BLOCK0);

        while(1);

    /* USER CODE END */
    }


    /* USER CODE BEGIN (4) */
    void rtiNotification(unsigned notification)
    {
        if(notification == rtiNOTIFICATION_COMPARE0)
            gioToggleBit(gioPORTA, 0);
        else if(notification == rtiNOTIFICATION_COMPARE1)
            gioToggleBit(gioPORTA, 3);
    }
    /* USER CODE END */

    It works.