AnsweredAssumed Answered

what is the difference between Transmission complete Interrupt(USART_CR1_TCIE) and TXE interrupt enable(USART_CR1_TXEIE) .

Question asked by NITIN RAWAL on Apr 11, 2018
Latest reply on Apr 12, 2018 by NITIN RAWAL

My  code is run on STM32F427ZIxx

 

SET_BIT(huart2.Instance->CR1, USART_CR1_TXEIE);

void USART2_IRQHandler(void)
{
/* USER CODE BEGIN USART2_IRQn 0 */

/* USER CODE END USART2_IRQn 0 */
HAL_UART_IRQHandler(&huart2);
/* USER CODE BEGIN USART2_IRQn 1 */


HAL_UART_Transmit(&huart3,(uint8_t *)"\r\nTransmission Complete Interrupt",33,100);

}

when i am reading UART3 it is going infinite but CLEAR_BIT(huart2.Instance->CR1, USART_CR1_TXEIE); in ISR, giving two times print of.

 

vs  what is USART_CR1_TCIE  ????    

Outcomes