Skip to main content
WM_IR
Associate III
October 23, 2021
Question

CONFUSION IN STM32F302R8 MASTER TRANSFER DATA DIAGRAM

  • October 23, 2021
  • 2 replies
  • 2506 views

0693W00000FDVJtQAP.jpgIm having a confusion on my diagram about the EV2. Why does the EV2 happens during the transfer of data1? and it does not happen during transfer of data2? Or could someone explain about my master transfer diagram? the MCU model is STM32F302R8

This topic has been closed for replies.

2 replies

TDK
Super User
October 23, 2021

Once data1 is sent to the shift register to be sent out on the line, the register is available and the TXIS event fires again. It's a hardware design decision. Doing it this way allows for some slack in timing in handling the EV2 event without slowing down the transfer. Note the clock stretch after the first ACK and before data1 can be sent out due to the delay in populating the register. If the hardware waited until the ACK, there would be less time to populate the register without causing another slowdown/clock stretch on the bus.

"If you feel a post has answered your question, please click ""Accept as Solution""."
WM_IR
WM_IRAuthor
Associate III
October 23, 2021

So, actually what does the EV1 and EV2 do? because it says there the EV2: TXIS ISR: wr data2

TDK
Super User
October 23, 2021
EV1 represents the statement within your I2C ISR handler when you’re handing the TXIS flag and you send data to the I2C TXDR data register.
Same for EV2, but with data2 instead of data1.
"If you feel a post has answered your question, please click ""Accept as Solution""."
TDK
Super User
October 23, 2021

More of less. Part way through shifting out data1 on the SDA line, data2 is written to TXDR.

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