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 II

What is connected to your UART tx pin?

I Can't Believe It's Not Butter. If you find my answers useful, click the accept button so that way others can see the solution.