AnsweredAssumed Answered

UART Question

Question asked by vigelette.george on Sep 3, 2014
Latest reply on Feb 3, 2015 by sobol.andrey
Hello everyone, I was wondering how to turn of the UART Interrupt, I am using HAL_UART_Receive_IT to receive incoming characters on the serial port.  periodically I want to take over the port and control it manually, is there a way to stop IT function once it is waiting?

I have tried:

     __HAL_LOCK(&huart1);
     __HAL_UART_DISABLE_IT(&huart1, UART_IT_PE);
       __HAL_UART_DISABLE_IT(&huart1, UART_IT_ERR);
     __HAL_UNLOCK(&huart1);     
     __HAL_UART_DISABLE_IT(&huart1, UART_IT_RXNE);

Thanks in advance,
George

Outcomes