cancel
Showing results for 
Search instead for 
Did you mean: 

usart receive

soundarya_h_s
Associate III

USART receive is not providing the output please check and reply me asap

selected USART2 made it to asynchronous also enabled global interrupt
code lines that i have added

uint8_t txbuf[10]="hello ";

uint8_t rxbuf[10];

 

while (1)

{

/* USER CODE END WHILE */

HAL_UART_Receive(&huart2, rxbuf, sizeof(rxbuf), 100);

/* USER CODE BEGIN 3 */

}

void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)

{

HAL_UART_Transmit(&huart2, rxbuf, sizeof(rxbuf), 100);

}

11 REPLIES 11

@Tesla DeLorean can you please  tell it in simple words or modify the code which you think is not correct

Karl Yamashita
Lead III

What is connected to your UART tx pin?

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.