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.
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,
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.
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.