Skip to main content
WM_IR
Associate III
October 25, 2021
Solved

I2C MASTER INITIALIZATION QUESTION

  • October 25, 2021
  • 1 reply
  • 1115 views

In the STM32f302R8 Reference manual, it is stated for master initialization, I need to Enable Interrupts and/or DMA in I2C_CR1:

0693W00000FDdXPQA1.jpg0693W00000FDdXbQAL.jpg0693W00000FDdXeQAL.jpg0693W00000FDdXoQAL.jpgDoes this mean I need to enable all the bits that is related to interrupts? Example, from bit 1 until bit 8, do I need to enable all of it? Or is it OK to just ignore it?

This topic has been closed for replies.
Best answer by TDK

You only need to enable interrupts if you want to service them. If you're using polling mode, you don't need to enable any of them. If you're using interrupt mode, seems like you would want all of them enabled, although it's not strictly required.

1 reply

TDK
TDKBest answer
October 25, 2021

You only need to enable interrupts if you want to service them. If you're using polling mode, you don't need to enable any of them. If you're using interrupt mode, seems like you would want all of them enabled, although it's not strictly required.

"If you feel a post has answered your question, please click ""Accept as Solution""."