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: Output of Complementary Pairs of PWM Signals

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

I already use the LAUNCHXL-TMS57004 for a battery management system application and I would like to control a bidirectional dc/dc converter with the same development kit.

I would like to ask you the following:

1) Can you please provide me the settings of HALCoGen in order to generate complementary pairs of PWM signals?

2) How many complementary pair of PWM signals does the  LAUNCHXL-TMS57004 supports?

Thank you in advance.

 

  • Hi Nikolaos,

    Is a programmable dead band between two PWM outputs required? Is ADC sampling triggered by the PWM signal?

    There is no problem to generate 6 pairs of PWM outputs.

  • Hello QJ Wang,

    Thank you for your quick response.

    First, I would like to generate two complementary pwm signals with dead time. I can generate two complementary pwm signals without dead time in the HALCoGen HET tab, however I would like to know how to insert dead time. 

  • Hi Nikolaos,

    The HAlCoGen doesn't support dead time feature. To insert dead time, you need to write your own N2HET code to generate PWMs

    I created a example to generate two PWM outputs with deadzone. The PWM frequency is 10KHz, the duty-cycle is 38% for PWM1 and 41% for PWM2:

    To use this example, you need to configure HETPFR[15:8] to 0x7, and HETXOR to 0xC000;

  • Here is the HET code:

    pwm1ph.het

    and the project used on HET IDE:

    pwm1ph_ls0432.zip

  • Download HET IDE from the link below:

    https://www.ti.com/tool/HET_IDE

    The HET IDE is a windows based application that provides an easy way to get started developing and debugging code for the HET.

    The simulation kernel provides full visibility into program execution and also break point capability to stop execution on specific instructions. Waveformer Pro from SynaptiCAD provides a professional tool for waveform creation and visualization.

  • You can configure HETPFR and HETXOR using HET IDE project property GUI:

  • Thank you for your response. In order to succeed 10kHz I had to change defper in .het file's code :defper  .equ    1F40h.

    Also, I made  the following changes because I would like to use NHET00 and NHET04 pins.

    PHAHI .equ 4

    PHALO .equ 0

    PEROUT .equ 22

    Also, I activated pins 0_1, 4_5 in XOR tab.

    However, when I run the code to LAUNCHXL-TMS57004 i get the following pulses, that are not complementary:

    Can you please tell if i have to change anything else in .het code? Also, can I change the PWM duty dynamically in my CCS code?

  • This resolved my issue:

    1) HALCoGen:

        a) Enable HET drivers.

        b) In HET/Pwm 0-7 tab:

             Enable Pin0  and set duty=18%, high polarity

             Enable Pin1 and set duty=65%, high polarity

             Enable Pin2 duty=15%, high polarity

             Enable Pin3 duty=68%, low polarity

    2) In sys_main.c :

    hetInit();
    hetREG1->DIR =  0x0000000FU; // Set HET pins 0, 1, 2, 3 direction as outputs 
    hetREG1->XOR = 0x00000003U; // Set Pin[0] XOR Pin[1] ,  Pin[2] XOR /Pin[3]

    3) Probes in NHET 00 and NHET02: