cancel
Showing results for 
Search instead for 
Did you mean: 

Can't set USART_CR1_RXNEIE to enable

Jemegen
Associate III

I tried to enable RXNEIE with following code:

 

USART2->CR1 = (USART_CR1_TE | USART_CR1_UE | USART_CR1_RE | USART_CR1_RXNEIE); 

 

But when I checked CR1 register, it's still set to 0:

 

gdb: x /8ub 0x40004400
0x40004400:	45	0	0	0	0	0	0	0

 

I checked the manual and there is no requirement for any pre-conditions before enabling the RXNEIE bit. Did I just miss something?

1 ACCEPTED SOLUTION

Accepted Solutions

45 -> 0x2D (UE, RE, TE & RXNEIE)

Seems as expected here USART_CR1 +0

https://www.st.com/resource/en/reference_manual/rm0091-stm32f0x1stm32f0x2stm32f0x8-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

2 REPLIES 2

45 -> 0x2D (UE, RE, TE & RXNEIE)

Seems as expected here USART_CR1 +0

https://www.st.com/resource/en/reference_manual/rm0091-stm32f0x1stm32f0x2stm32f0x8-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Sorry, It's my fault!