for my project i'm reading I2C data with I2C_master_interrupt. i am also having port interrupt configured. i've also taken care of the priorities of both the interrupts. still whenever the execution is in port interrupt and if i2c interrupt comes, it is not jumping to the new ISR. please help
i've resolved it now. instead of setting priority to 0x03 we are supposed to set priority as 0x30. only upper nibble should be used for priority and lower nibble should be always zero. basically priority should have only 0-15 levels.
Are you clearing the interrupt in the handler of the port interrupt? Based on what you mentioned it seems to me that you are not clearing the port interrupt and due to this your program is stuck in the port handler interrupt.
are you talking about this:
PORTE->PCR |= PORT_PCR_ISF_MASK; /* Clear PORTD ISF flag */
I'm clearing this flag at the end of PORR IRQ and expecting I2C IRQ to be executed before this ISF flag clearing. so all you want to say is that I have to clear the flag before I'm expecting the I2C IRQ???
Yes, I wanted to confirm that you were clearing the port interrupt in the handler. Which of these two interrupts has the highest priority? Could you please share the code that you are using to test this?
as I've told you earlier, I'm keeping port priority lower then i2c. i am expecting i2c interrupt occurring while the execution is in port interrupt. I'm clearing port interrupt status flag like this:
"PORTE->PCR |= PORT_PCR_ISF_MASK; /* Clear PORTE ISF flag */".
I'm doing this immediately after entering port ISR. i don't know what I'm missing. please help.