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.

TMS570LS1224: nHET Pin Set/Reset querry

Part Number: TMS570LS1224

Hello,

I need to prepare a test SW for HET using only HET instruction set.

Test SW should read PWM status of one of HET input pin and similar waveform should be generated from another HET output pin.

Currently , I am using following code to set/reset HET output pin according to HET input pin status. But it’s not working.

PulseRISE: BR      

{  next = PFALL, cond_addr = RISE_SET, pin = HET4, event = RISE ; Jump to RISE_SET at rising edge of HET4

}

PulseFALL: BR      

{

   next = DNDEND, cond_addr = FALL_RESET, pin = HET4, event = FALL ;Jump to FALL_RESET at falling edge of HET4

}

RISE_SET: ECMP {next = END, cond_addr = END, hr_lr = LOW, en_pin_action = ON, pin = HET2, action = SET, reg = A, data = 0x00}   ;Set HET pin HET2 high

FALL_RESET: ECMP {next = END, cond_addr = END, hr_lr = LOW, en_pin_action = ON, pin = HET2, action = CLEAR,reg = A, data = 0x00} ;Reset HET pin HET2

END:

 Is there anything wrong in the code? This code seems to be missing some of the rising and falling edges at HET4 pin and hence doesn't generate similar output at pin 2.

Kindly let me know if I am doing something wrong here.

Best Regards,

Padmrish

  • Hello Padmrish,

    ECMP compares data value stored in the data field D[31:7] to the value in register A (reg=A in your design). But you never define the register A. Is HET4 configured as input and HET2 configured as output? What is the default state of HET2 (pull-up, or pull-down)?

    You have 2 ECMP, but only one of them is used, either RISE_SET or FALL_RESET, so you will not generate similar waveform as the input of HET4.

    Please Change the NEXT address of ECMP to the first instruction.
  • Hello Wang,
    Thank you for your reply!
    HET4 is used as input pin and HET2 is used as output pin.
    If HET4 is high i want to set HET2 high and if HET4 is low i want to set HET2 pin low. HET2 default configuration is pull down.

    In BR instruction , i am branching to RISE_SET when it detects rising edge at input pin and branching to FALL_RESET when it detects falling edge at input pin.
    But ECMP instruction will not work as it will set or reset pin only if reg (A,B or T) is equal to Data field. Can i use any other HET instruction which can set HET2 high or low without checking any condition.
    Best Regards,
    Padmrish
  • Hello, I need to set/reset HET2 pin . kindly let me know if there is any HET instruction which can be used to set/reset HET pin.
    Best Regards,
    Padmrish
  • Hello Padmrish,

    There is not an instruction to set or reset NHET pin explicitly based on an input HW event. The pin can be reset/set based on the timer.