2025-04-17 11:12 AM
Is it necessary to enable interrupts in I2C_CR1 if I only want to look at the flags but don't want to go into the interrupt service routine? For instance, I want to be able to look at the status of RXNE and see if it is set, but I don't actually want go into an interrupt routine. Can I just leave RXIE (the bit that enables the interrupt) as 0?
I am keeping RXIE as 0 for now, and I am still seeing RXNE get set when Rx data comes in. Is this normal?
2025-04-17 12:41 PM
> Is it necessary to enable interrupts in I2C_CR1 if I only want to look at the flags but don't want to go into the interrupt service routine?
No.
> For instance, I want to be able to look at the status of RXNE and see if it is set, but I don't actually want go into an interrupt routine. Can I just leave RXIE (the bit that enables the interrupt) as 0?
Yes.
> I am keeping RXIE as 0 for now, and I am still seeing RXNE get set when Rx data comes in. Is this normal?
Yes.
Nothing wrong with keeping interrupts disabled and looking at flags instead.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.