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.

TMS570LS1227: TMS570 Interrupt using HET

Part Number: TMS570LS1227
Other Parts Discussed in Thread: HALCOGEN

Hi,

For my project requirement, I need to generate interrupt using HET (CNT instruction) and call a function when the interrupt is triggered.
Please could you help me in the following:

1)
In HET IDE, I have set the following:
T1_CNT: CNT {next=T2_CNT, reg=NONE, irq=ON, max=1000}
T2_CNT: CNT {next=T1_CNT, reg=NONE, irq=ON, max=3000}

2)
In het.c (generated using halcogen by importing the files from HET IDE)
In hetInit() function, what values do I have to configure for these:
  a) hetREG1->PRY
  b) hetREG1->INTENAS

3)
In vim.c (generated using halcogen)
I have enabled:
channel 10 - HET high [halcogen generated the function: het1HighLevelInterrupt()]
channel 24 - HET low [halcogen generated the function: het1LowLevelInterrupt()]

Please could you guide me if the steps I am following are correct.

Thanks.

  • Hello Abrar,

    a) hetREG1->PRY
    Can be set to either HIGH or LOW? If bit 0 is set to "1", the interrupt from the instruction 0 will use het1HighLevelInterrupt() as its ISR.

    b) hetREG1->INTENAS
    The bit should be set to "1" for the corresponding instruction whose IRQ is turned on. For example, the IRQ of instruction 1 is ON, the bit 1 of INTENAS should be set to "1"