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.

LAUNCHXL-TMS57004: HET PWM not starting

Expert 1965 points
Part Number: LAUNCHXL-TMS57004
Other Parts Discussed in Thread: HALCOGEN

I'm going minimal to test PWM gen on a pin.   All using HalCoGen + CCS.

Followed this 

https://training.ti.com/hercules-how-tutorial-using-nhet-generate-pwm

.. and after hetInit(), I expect the signal / PWM on my output pin.  I've set this to be pin 0,   which is on this Lauchpad should be pin1 on J4 (booster pack ).

But I get nothing... No PWM signal.   What am I doing wrong?

The only thing I saw working is that, if I change the default state (DOUT)  on that output pin to 1, then I see that's changing. But after that nothing.. still no PWM.

Any help?

In main() i just do this nothing else:

hetInit();
// pwmStart(hetRAM1, pwm0);    These don't help... By HalCOGen auto gen code these should start automatically anyway if enabled in that gui
// pwmStart(hetRAM1, pwm1);

while(1);

  • 1. Please enable the NHET in "Enable Drivers" window.

    2. Check hetINSTRUCTION_t het1PROGRAM[58U] ={}, make sure nhet[0] is used for PWM1 (instruction 43). 

    3. check the hetInit() to make sure the nhet instructions are copied to nhet RAM:

    line 1324:

     (void)memcpy((void *)hetRAM1, (const void *)het1PROGRAM, sizeof(het1PROGRAM));

    4. PWM start API should be called:

    pwmStart( hetRAM1, pwm1)

    If still no PWM signal on NHET[0] pin, can you manually toggle nhet[0] to check if nhet[0] and pin 1 of J4 are ok:

    gioSetDirection(hetPORT1, 0xFF);

    gioToggleBit(hetPORT1, 0);

  • I somehow got it fixed, but nothing of the above. I don't understand what did it, BUT, originally - see above - I have had changed the loop time from default as HC had it to 100 ns.   I then reset changed it back, and it seems have fixed it - I see my PWM's out.

    But I don't know if that was it.    I have other questions on HET I'll ask on separate thread;

    Thanks for getting back to me so quick to help.