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 NHET Assembly Code

Other Parts Discussed in Thread: HALCOGEN

Hi,

I am using the HALCOgen 2.07 vesrion for NHET drivers. When we select the options in the GUI, the tool is creating the het.c and het.h driver files.

When i try to use these files for the measurement of input signal frequecy, i am not able get it. Looks like duty cycle is working but not the pulse period.

So, I would like to see the assembly code for the het.c file.

 

  • Hi

    In HALCoGen we donot create assembly code we directly generate the required opcodes in the het.c and het.h

    I would recommend you to use HET IDE tool if you want to develope custom assembly code. HET IDE ( simulator for NHET) can be downloded  from http://www.ti.com/tool/het_ide

    Best Regards

    Prathap

  • Thanks for the reply Prathap.

    Can you tell me what the function capGetSignal available in the het.c will do? I am using this function function for measuring the period of input signal, but not working.

    I would like to know what is the instruction used for PCNT: Capture Period 0 (highlighted below) in the below code. 

    // Code from the het.c  

    /* PCNT: Capture Duty 0
        *         - Instruction                  = 25
        *         - Next instruction             = 26
        *         - Conditional next instruction = na
        *         - Interrupt                    = na
        *         - Pin                          = 10
        */
        {
            /* Program */
            0x00034E00U | (3U << 6U)  | (10U),
            /* Control */
            0x00000000U,
            /* Data */
            0x00000000U,
        },
        /* PCNT: Capture Period 0
        *         - Instruction                  = 26
        *         - Next instruction             = 27
        *         - Conditional next instruction = na
        *         - Interrupt                    = na
        *         - Pin                          = 10  + 1
        */
        {
            /* Program */
            0x00072000U | (0U << 6U)  | ((10U) + 1U),
            /* Control */
            0x00000000U,
            /* Data */
            0x00000000U,
        },

  • Hi Bindu,

    As the name indicates it is used to capture the Period of the PWM. The instruction above is used to capture the Duty cycle( based on the Polarity you selected in the HALCoGen GUI) .  

    Best Regards
    Prathap

  • Prathap,

    I want to know what is the instruction used for the below value. It is not the PCNT. As you informed it is hand written, so i would like to know what is the instruction used for this. As capturing of period is not working as expected.

    0x00072000U

  • Hi Bindu,

    The opcode does not look right. Could you please give me following details to help you

    1) HALCoGen Version used
    2) Family and Device selected in HALCoGen for generating the code
    3) NHET / HET TAB - Snap shots ( All tabs under HET / NHET) .
    4) Zip the generated code and attach.  

    Best Regards
    Prathap

  • Yes. Prathap. The ope code does not look correct. I am using the HALCOgen Version 2.07, which came with the TMS570 MCU developement kit. I have choosen the TMS570LS20216SPGE processor to generate the code. You can see this with the default settings of of NHET/HET.

    When i though, something is wrong with this opcode, i downloaded the 2.10. But could not able to run it. It may because of two version of HALCOgen. If you have nay idea, please help me about this installation.

     

  • Hi Bindu,

    You should be using ver 2.11 not 2.10 Download 2.11 from http://www.ti.com/tool/halcogen

    There should be no issue in having 2.07 and 2.11 in parellel (Even the ICON's look different ), but it is advised to use the latest always. 
    Worst case you can uninstall 2.07 and 2.10 and have a fresh 2.11 Installed..

    Once you install by default it is installed in c:\program files\texas Instruments\Hercules\HALCoGen\2.11\HALCoGen.exe

    Best Regards
    Prathap