AnsweredAssumed Answered

stm32f427 uart4 interrupts generated without flags

Question asked by Sitnikov.Vjacheslav on Apr 11, 2014
Latest reply on Apr 12, 2014 by Sitnikov.Vjacheslav
In my programm I use uart4 with 115200 baud. I want to receive data from devices - so I configure UART in RxMode.  I enebled only one interrupt source for it
USART_ITConfig(UART4, USART_IT_RXNE, ENABLE);
My interrupt handler looks like this:
void UART4_IRQHandler(void)
{
  Uart_SR = UART4->SR;
  Uart_CR1 = UART4->CR1;
  Uart_CR2 = UART4->CR2;
  Uart_CR3 = GPS_USART->CR3;
  if(USART_GetITStatus(UART4_USART, USART_IT_RXNE) != RESET)
  {
    char symb;
    symb = USART_ReceiveData(UART4) & 0xFF;
    DummyCntr1++;
  }

  if(USART_GetITStatus(UART4, USART_IT_TXE) != RESET)
  {
    /* Write one byte to the transmit data register */
    DummyCntr4++;
  }
  DummyCntr5++;
}
Some time the data was successfully received. But then something strange happens. All CPU time UART4 interrupt handler is executed (except for higher-priority interrupts handlers), while the interrupt flags are reseted.  Uart_SR, Uart_CR1, Uart_CR2, Uart_CR3 variables transmitted via CAN, and there values are: 0x1D8, 0x2024, 0x0, 0x0 respectively. Also DummyCntr's transmitted and only DummyCntr5 grows up. So in CR1 only RXNEIE bit installed, in SR RXNE bit is cleared - why interrupt handler executed?
What have I missed?

Outcomes