cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f0 uart1 rx interrupt problem

mohamad pb
Associate
Posted on November 04, 2017 at 11:50

hello

I have stm32f030f4p6 Microcontroller and using iar Compiler , library cmsis , After confige Uart1 the RXNE , FE and CMF bits return 1 whereas not recieve or send was done if I dont set RXNE bit to 0 thats Stuck on interrupt routine And that recieve nothing here is my Uart Config:

USART1->BRR = 0x1388; USART1->CR1 = USART_CR1_UE | USART_CR1_TE | USART_CR1_RE; and GPIO config and Nvic:

NVIC_InitTypeDef NVIC_InitStructure; USART1->CR1 |= USART_CR1_RXNEIE; NVIC_InitStructure.NVIC_IRQChannel = USART1_IRQn; NVIC_InitStructure.NVIC_IRQChannelPriority = 0; NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; NVIC_Init(&NVIC_InitStructure);

and the register after this 2 line USART1->BRR = 0x1388; USART1->CR1 = USART_CR1_UE | USART_CR1_TE | USART_CR1_RE;

http://s9.picofile.com/file/8310890334/photo_2017_11_04_14_10_29.jpg

rx tx connected to sim800 module and its answer to AT Properly

thank you

#stm32f0 #rx #interrupt #usart
0 REPLIES 0