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.

HALCOGEN: Background info on HET and EPWM settings and variables

Part Number: HALCOGEN

Our team is working with HalCoGen and evaluating the HET and EPWM changes.  Is there a guide to what the control and data values changes mean?  is the there guide to the variable names associated with the data moves?

  • Hi NeiBerry,

    This link gives your a very simple example to generate PWM with NHET. It also shows how to use NHET assembler, and NHET simulator.

    In NHET, certain instructions (MOV32, ADM32, etc) can modify the data fields of other instructions. This feature enables the NHET program to implement double buffering on capture and campare functions. For example, an ECMP compare instruction can be follwoed by a MOV32 that is conditionally executed when the ECMP instruction matches. The CPU can update the next compare value by writing asynchronously to the data field of the ECMP instruction. The copy from the buffer (MOV32 data field) to the compare register (ECMP data field) will occur when the MOV32 instruction is actually executed which occurs after the ECMP instruction matches its current compare value. This is the same behavior as one would expect from a double buffered hardware compare register.

    Other instructions (MOV64, RADM64) can modify both the control and data fields of other instructions. This allows the N2HET to implement toggle functionality. For example, an ECMP instruction can be followed by a pair of MOV64 instructions. The MOV64 instruction updates the data field of the ECMP instruction to implement the double buffering behavior. But it also updates the control field of the ECMP instruction which allows it to change things like pin action and the conditional address. If one MOV64 instruction configures the ECMP pin action to SET while the second changes it to CLEAR, and the two MOV64 instructions update the conditional address to point to each other, then a single ECMP instruction can be used to toggle a pin each time the compare match occurs.

    Regards,

    QJ

  • The HalCoGen program has a user help tool.  I discovered the variable and declaration information I was looking for in the help documentation.