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.

TMS570LS0432: about RTI register

Part Number: TMS570LS0432

Hello

 If I have already initialize the rti.

in the RTI interrupt function write 

rtiREG1->CMP[2U].UDCPx =20000;

and next RTI interrpt 

rtiREG1->CMP[2U].UDCPx =30000;

Does this count restart or continue from the previous one(20000)?

I dont find the introduction in Technical Reference Manual,change the udcp register ,Whether counting restarts

  • Hello,

    When the value in free running counter matches the compare value in RTICOMPx register, an interrupt is generated. The value in the update compare register (UDCPx) is added to the compare value in compare register (COMPx) after a compare is matched. Let me use an example to show you how UDCPx is used and when COMPx is updated.

    If COMPx = 50000, and UDCPx = 10000

    1. The RTI counter starts,

    2. When the value in FRCx register is equal to 50000, the 1st interrupt is generated and COMPx is updated to 60000 (50000+10000).

    3. Your code write 20000 to UDCPx, this value will not be used until next match detected

    4. When FRCx reaches to 60000, 2nd interrupt is generated, and the COMPx is updated to 80000 (60000 + 20000)

    5. Your code write 30000 to UDCPx, this value will not be used until next match detected

    6. When FRCx reaches to 80000, 3nd interrupt is generated, and the COMPx is updated to 110000 (80000 + 30000)