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: TMS570LS3137ZWT

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN, TMS570LS0432

Hi Team,

Recently, we have procured TMS570LS3137ZWT and started testing HET module using Code composer Studio 6.2 version.

Test case: We have configured in such a way that for pin 30 in NHET1 module, a square wave of 3 volts peak to peak is applied with 32 KHZ. We have configured NHET1 such that if the input frequency >=32 Khz, pin 31 should be set.

Observations:

1. With input frequency < 32 Khz with amplitude of the sampling signal is 3 Vp-p, pin 31 is not set.
2. With input frequency = 32 Kzh with amplitude of sampling signal is 3 Vp-p, pin 31 is set.
3. Now, we restarted the system and repeated step 1. Could see that pin 31 is set.
4. After step 2, we decreased input sampling signal amplitude to 500 mV and repeated step 1 and output is expected (pin 31 is not set).
5. After above step, we increased sampling signal amplitude to 3 Vp-p, still the pin 31 is not set (which is correct).

Problem: Once the pin is set, and after restart, with no change in sampling signal amplitude, always the pin is set.
Is it expected behaviour? How to overcome this?

Regards,

M.Sreenivasan.

  • Hello Sreenivasan,

    500mv input signal is less than 0.8V (vIL), it will be captured as 0x0. The minimum input high signal is 2V (vIH).

    When you restart the program (in CCS, run->reset->system reset, then run->restart), the hetInit() is called. The hetInit() initializes the NHET pins, and it copies the microcode (c-structure generated through HALCoGen) into the N2HET RAM, set up necessary registers and start the N2HET program execution. So the level of pin 31 should be cleared after hetInit().

    You ISR can clear pin 31 if the frequency of sampled signal at Pin 30 is less than 32KHz.
  • Hi Wang,

    Yes, we have used the HALCOGEN generated code for HET initialization and reported issue was observed.
    Please let me know if you need any extra traces further?

    Regards,
    M.Sreenivasan.
  • Hi,

    Any updates on this issue?

    Regards,
    M.Sreenivasan.
  • Hello,

    Is the NHET pin31 configured as GIO pin or NHET functional pin? Is pin32 set in NHET microcode (copied to NHET RAM in nhetInit()) or in your CPU code?

    Does the pin have pull-up?

  •  Hi Wang,

    It is NHET functional pin and please find the snapshot of the configuration in attachment.

    Regards,
    M.Sreenivasan.

  • Hi Wang,

    Can you please share your inputs?

    Regards,
    M.Sreenivasan.
  • Hi Wang,

    Please let me know your comments on this?

    Regards,
    M.Sreenivasan.
  • Hi Wang,

    We are waiting for your comments since August 21. Request you to expedite and provide your comments.

    Regards,
    M.Sreenivasan.
  • Hello Sreenivasan,

    Unfortunately, QJ and the rest of our Hercules team have been impacted by the recent weather events in Houston and have been away from the TI office for a while due to these tragic events. We certainly hope to get back to normal soon and will address your question as that time. Thanks in advance for your patience and understanding.
  • Hi Team,

    Any updates on this issue?

    Regards,
    M.Sreenivasan.
  • Hello Sreenivasan,

    Can you please share your code? My understanding is that your code likes this:

    If (freq >= 32)
    pin is set
    else
    pin is cleared
  • Hi Wang,

    Hope the situation is under control in your place and doing good.
    Please find the attached code snippet which we are using it and we wont clear the pin once the pin is asserted until the board is restarted.

    Regards,
    M.Sreenivasan.
  • Hello,

    I wrote a test case on TMS570LS0432 launchpad, and works as expected.

    1. NHET1 Pin10 output a PWM signal.

    2. NHET1 Pin0 is configured as input to capture PWM signal from pin10 (connect pin 0 and pin10 with a wire on board)

    3. Enable RTI compare0.

    In RTI ISR,

    1. change the PWM period  (33us, 32us, and 31us) every 2 seconds.

    2. capture PWM period every 1 second

    3. turn on 2 LEDs (GIOA2, and NHET1 Pin8) when period<32us (31.25khz) , otherwise turn off the LEDs (clear GIOA2, and NHET Pin8)

    Please test with my test case.

    0511.TMS570LS0432_PWM_ECAP.zip

  • Hi Wang,

    Its the same test case which was shared in other case, where we try to validate the input frequency (square waveform).
    Once the pin is set, after restart, without changing the amplitude of the input signal, pin is always set. This was easily reproducible.

    Can you please try with the sample code and let us know your inputs.

    Regards,
    M.Sreenivasan.
  • Hi Wang,

    Any updates on the issue?

    Regards,
    M.Sreenivasan.
  • Hello Sreenivasan,

    Note that I am replying to the following post by a coleague of yours on the same topic. I am replying here to maintain a single point of discussion so the discussions don't diverge and cause confusion. Kevin's post is at this link: e2e.ti.com/.../633758

    QJ provided a test case that was working per his testing in our lab on our boards. To reproduce exactly, I think we would need to attempt to reproduce your input signal. If possible, a scope plot with accompanying description of the behavior of the NHET relative to the input signal. i.e., I think you should be able to capture the input signal along with the NHET31 output signal in the same plot. This will allow us to explain further what is going on. From QJs example, the NHET code works as expected for an ideal input/square wave; however, if the signal is dropping below VIH or is not a DC signal, operation could be unpredictable as you are seeing.

    Also, in the post by Kevin, it is mentioned that as the "frequency amplitude is varied slightly,' but I don't know what this means since frequency and amplitude are different wave form characteristics altogether.
  • Hi QJ and Chuck,

    Please find the below details about the our testing procedure:

    Test case: We have configured NHET1 in such a way that for pin 30, a square wave of 3 volts peak to peak is applied. We have configured NHET1 such that if the input frequency (at pin 30) >=32 Khz, pin 31 should be set.

    Observations:

    1. With input frequency < 32 Khz with amplitude of the sampling signal is 3 Vp-p, pin 31 is not set. (Expected behaviour)
    2. With input frequency = 32 Kzh with amplitude of sampling signal is 3 Vp-p, pin 31 is set. (Expected behaviour)

    3. Now, we restarted the system and repeated step 1 (i.e., input signal frequency is < 32 Khz and its amplitude is 3Vp-p). Could see that pin 31 is set.

    4. After step 2, we decreased input sampling signal amplitude to 500 mV and restarted the system & repeated step 1 and output is expected (pin 31 is not set).

    Problem: Once the pin is set, and after restart, with no change in sampling signal amplitude, always the pin is set.
    Is it expected behaviour? How to overcome this?

    If require more clarification, can you please setup a meeting, so that we can discuss more on this?

    Regards,
    M.Sreenivasan.
  • Sreenivasan,

    When you state that you restart the system, what does this mean? Do you initiate a power on reset on the device insuring all capacitance has dissipated such that the device is completely powered off? Also, insure that the 3V input into NHET[30] is also removed since this could keep parasitically powering the device keeping it from adequately reaching the full power off state.

    Also note that if you are only using the reset in the IDE/debug, this is never a full system reset meaning that NHET states will not necessarily be cleared. This should be able to be resolved by toggling the TO bit in the HETGCR register along with re-initialization of the NHET RAM and HET registers as described in the HETGCR description of the TO bit in the TRM.
  •   Hi Chuck/QJ,

    Please find the requested information in attachment.

    Details:

    The input and output waveforms are displayed in Oscilloscope.

    The frequency and peak to peak voltage values are displayed.

    Input waveform is in yellow colour (pin 30 is captured) and output is in blue colour (pin 31 is captured).

    Image 1: Input frequency is 33 Khz with amplitude set to 2 Vp-p.

                      Output is set to high (2.4Vp-p)

                      This is an expected behaviour.

    Image 2: After the above test, set the input frequency is 31 Khz with amplitude set to 2Vp-p and performed

                      CPU reset in CCS6.2.

                      When we run CCS6.2, output still shows 2.56 Vp-p as shown in image 2.

                      This is not an expected behaviour.

    Please let us know if you need further information.

    Regards,

    M.Sreenivasan.

  • Hello,

    After the NHET 31 is set (ETDSET register), the CPU reset from CCS doesn't affect the value in the register, but the System Reset from CCS will clear the NHET registers (DOUT, DSET, DIR etc).

    If the code you used for testing is generated with HALCoGen, the systemIni() function call will clear the NHET regsiters too. If you don't call systemInit() or you commended out the peripheralInit() in systemInit(), the NHET registers will not be cleared.

    The NHET pin 31 is set or cleared based on the measured frequency on NHET pin 30.

    Is the measured frequency correct (>32KHz, =32Khz, and >32KHz)? If yes, your NHET code in NHET RAM works fine. If no, please check your NHET code.

    Your c code checks the measured frequency, and your code needs to SET or CLEAR the NHET pin 31.

  • Hi Wang,

    We tried with System reset and we didnt commented systemInit or PeripheralInit calls. Still the problem is reproduced.

    Can you please check if you are able to reproduce the problem at your end with the code we shared?

    It would be good, if we have a call on this to discuss more and speed up.

    Regards,
    M.Sreenivasan.

  • Hello Sreenivasan,

    You use MCMP to SET the pin 31 if the DATA_GE_REG condition is met. After the pin is set, MCMP uses the zero flag set to generate opposite pin action. So please check the zero flag.
  • Hi Wang,

    Can you provide more information on this and also if we want to clear it how it has to be done?

    Regards,
    M.Sreenivasan.