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.

TMS570LS3137: N2HET

Part Number: TMS570LS3137

Hi,

As per 3137 TRM,

What could be the possible error while measuring the Tperiod if we use two instructions with hr_lr = HIGH as shown below. I see it against the TRM recommendation but I have a limitation not to change this code.

;Ton
Test_TON   PCNT {hr_lr=HIGH,reqnum=1,request=GENREQ,type=RISE2FALL,pin=TEST_PIN};

;Tperiod
TEST_TP    PCNT {hr_lr=HIGH,reqnum=1,request=GENREQ,type=RISE2RISE,pin=TEST_PIN};

Thanks

  • Hello,

    Only one instruction is allowed to use high resolution per high resolution pin. To over this restriction, you can use HR share, but the pin number in 2nd PCNT should be TEST_PIN + 1, TEST_PIN must be EVEN number.

    Your code still works, but the 2nd PCNT instruction is ignored by the high resolution. The maximum measurement error is up to the LRP (loop resolution period).