Skip to main content
Associate II
January 23, 2024
Solved

stm32c0 enableIT i2c1 and usart1

Hi, here I am facing the problem on I2C interrupt if USART enabled IT, my I2C IT does not work but it work correct if USART does not enable it interrupt. Any setting i missed out?

    This topic has been closed for replies.
    TDK
    TDKBest answer
    January 23, 2024

    USART and I2C are independent peripherals and can have interrupts enabled at the same time. Perhaps debug your code and look for issues as to why it's not working.

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

    3 replies

    TDK
    TDKBest answer
    January 23, 2024

    USART and I2C are independent peripherals and can have interrupts enabled at the same time. Perhaps debug your code and look for issues as to why it's not working.

    "If you feel a post has answered your question, please click ""Accept as Solution""."
    Hollis_KAuthor
    Associate II
    January 23, 2024

    Hi @TDK, I noticed that interrupt when LL_USART_EnableIT_RXNE and LL_USART_EnableIT_TXE, it will cause I2C unable trigger its interrupt although I tried send data to I2C. May I know why it happen? 

    But, I have solved my issues because I only require Transmit complete in my program, just wondering why enable TXE and RXNE will lead these problems. 

    Anyway, thanks.

    TDK
    January 23, 2024

    > Hi @TDK, I noticed that interrupt when LL_USART_EnableIT_RXNE and LL_USART_EnableIT_TXE, it will cause I2C unable trigger its interrupt although I tried send data to I2C. May I know why it happen? 

    Probably your code has a bug.

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