cancel
Showing results for 
Search instead for 
Did you mean: 

stm32c0 enableIT i2c1 and usart1

Hollis_K
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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

View solution in original post

3 REPLIES 3
TDK
Guru

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

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
Guru

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