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.

TMS320F28069: Switching Interrupt Functions for ADCINT1

Part Number: TMS320F28069

Hi TI Team,

I’m working with two interrupt functions (ISR Handler), function_a and function_b. The source of the interrupt is ADCINT1. Initially, at the beginning of our program, ADCINT1 runs function_a. However, after certain conditions are met, we need to switch ADCINT1 to execute function_b. and vice versa.

Could you please advise on the proper way to achieve this?

Thanks,

Nitish Sharma

  • Hello Nitish,

    Could you please advise on the proper way to achieve this?

    To change the interrupt handler called, you need to change the address stored in the interrupt vector table. The Example_2806xAdcSoc example shows how to set the interrupt vector table initially, I believe you can use the same steps to change the ISR which is called. I recommend disabling/clearing the interrupts before doing so to make sure no interrupt goes unhandled while you change which ISR function is called.

  • Dear Amir,

    As per your suggestion, we have encountered an issue when transitioning the ISR handler from function_a to function_b. Below, you’ll find the observation table:

    Transition ISR Handler Status
    Initial function_a Working
    function_a to function_b function_b Working
    function_b to function_a Function_a Not working
    function_a to function_b function_b Working
    function_b to function_a function_a Not Working
    function_a to function_b Function_b Working

    Before switching between ISR handlers, we reconfigure all peripherals for different modes (GPIO, ADC, and PWM).

    Thanks

    Nitish Sharma

  • Hello Nitish,

    You need to be more specific than "Working" and "Not working", these statuses don't give me any clue as to what behavior you're seeing. What's happening? What are you expecting to happen? Have you tried stepping through the respective ISR to verify it's functioning correctly? Are there any global variables which are used by both ISRs?

    Before switching between ISR handlers, we reconfigure all peripherals for different modes (GPIO, ADC, and PWM).

    Please be specific, what exactly are you changing? Are there any dependencies between the ISRs?

  • Hello Amir

    Thanks for your support, I found error. Just reset of ADC module before ADC configuration and ISR handler, it's worked..

    Thanks for support

    Nitish Sharma