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.

TMS320F280049: priority setting of interrupt

Part Number: TMS320F280049


if I have 3 interrupt in my code,:ADCA1,I2CA,TIMER0。and the priority  decrease in sequence(ADCA1 > I2CA > TIMER0).

The ADCA1 and TIMER0 in GROUP1,the I2CA in GROUP8,

How should I set the priority of them?

what should the INT1PL and INT8PL be in code?

if INT1PL is lower than INT8PL,then will priority  be ADCA1 > I2CA , TIMER0  > I2CA ?This is not what I want.

  • Hi,

    In your scenario, it might be difficult. Because, if we set the group1 as higher priority than group8 (Global priority), all group1  interrupts will be of higher priority than the group 8 interrupt. Within each group you can update the priorities using Group priorities.

    Why don't you use the TIMER1 or TIMER2 which corresponds to INT13 and INT14?

    Regards,

    Veena

  • Hi Veena,

    it is ok to use the TIMER1 or TIMER2 which corresponds to INT13 and INT14,

    but I want to know whether it can achieve for scenario ADCA1 > I2CA > TIMER0?

    in your words,it's not easy to achieve?

    thanks

  • Hi,

    Technically, I believe it should be possible. If you only have these 3 interrupts in your application, you do something like:

    ADC_ISR(){

    //No interrupts enabled

    }

    I2CA_ISR(){

    // Enable only ADC interrupt

    //  Set the corresponding IER register and Disable TIMER0 interrupt in the PIEIER register

    }

    TIMER0_ISR(){

    // Enable ADC and I2C interrupts

    }

    I have not tried this myself. If you really want to achieve ADCA1 > I2CA > TIMER0, you can try this. But not sure if this would cause any other issues.

    An easier way would be to use TIMER1/2

    Regards,

    Veena

  • Hi Veena,

    ok,I got it.

    thank you