cancel
Showing results for 
Search instead for 
Did you mean: 

I2C MASTER INITIALIZATION QUESTION

WM_IR
Senior

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?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

1 REPLY 1
TDK
Guru

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".