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.

TMS570LS3137: TMS570LS3137 ADC Magnitude Threshold interrupt in HALCoGen

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Hi team

My customer wants to use the ADC  Magnitude Threshold interrupt in HALCoGen. He read the following document but no luck.

http://www.ti.com/lit/ug/spnu499c/spnu499c.pdf 

So,does it not support ADC threshold comparison function generate IRQ? Can it only be determined by constantly querying its interrupt flag?

He does not want to use polling mode. 

BR,

susan

  • Hello Susan,

    ADC magnitude compare interrupt is supported. The magnitude compare interrupt is independent of the conversion group being used. This interrupt is based on a selected channel number and can generate an interrupt if the conversion on this selected channel is greater than or equal to or less than a reference value. This reference value can be a fixed (programmable) value or can be the conversion result of another channel.

    The Channel in VIM assigned to ADC1 Magnitude compare interrupt is 31 and for ADC2 Magnitude compare interrupt is 59.

    For enabling interrupt in VIM module HALCoGen can be used.

    In the application ADCn Magnitude interrupts has to be enabled from ADMAGINTENASET register.
    Disabling Magnitude compare interrupt can be done in ADMAGINTENACLR register.

    ISR for Magnitude compare interrupt also has to be added from user (HALCoGen does not generate ISR for these interrutps).