Skip to main content
Visitor II
December 2, 2024
Question

STM32H743 i2c TC status not consistent with the reference documentation

  • December 2, 2024
  • 1 reply
  • 516 views

 

hi all

I have a weird operation on the I2C2 in STM32H743ZI cpu

i am sending 2 bytes to a I2c slave PCA9536DP, address= 0x41

the operation works and the slave IC did toggle the outputs BUT

at the end of the I2C2 transfer, the TC bit did not set even though the manual says it should.

is that normal?

see dump of the registers during the operation

OP: operation, CR1: contents of I2C2_CR1, ISR: contents of I2C2_ISR

 OP: CR1: ISR: comments 
 ISR:00020082 00000001 = condition before start of operation and start bit issued
 STR:00022082 00008001 = busy bit on after start bit issued
 Dta1:00020082 00008003 = first byte send and can send 2nd byte
 Dta2:00020082 00008000 = second byte send and tx reg not empty
 DtaE:00020082 00008001 = second byte send complete and tx reg empty
 STP:00000082 00000031 = stop bit send and detected, 
transmission completed; results appeared at the slave ic outputs
BUT TC is still not set and therefore not working at all, since all operation completed, it should have set
what is wrong??

 

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    February 5, 2025

    Hello @JTse.1,

     

    I apologize for my late reply. 

    Could you please try to reset the I2C peripheral after configuring the GPIOs like this: 

    __HAL_RCC_I2C2_FORCE_RESET();
    __HAL_RCC_I2C2_RELEASE_RESET();

     

    Thank you.

    Kaouthar