2021-12-23 04:58 AM
uint8_t tx_data[2] = "AT";
uint8_t rx_data[10];
HAL_Delay(1000);
while (1)
{
HAL_UART_Transmit (&huart1, tx_data, sizeof(rx_data) , 250);
HAL_Delay(500);
HAL_UART_Receive(&huart1,rx_data, 20,1000);
HAL_GPIO_TogglePin (GPIOA, LED_Pin);
HAL_Delay(500);
}
2021-12-27 04:26 AM
It help me. i was also looking for same problem but got it here.
2021-12-27 04:29 AM
shorted UART pins ...
2021-12-27 04:36 AM
yes I shorted RX pin to TX, should receive what sent from tx, but I only receive first letter
2021-12-27 04:42 AM
2021-12-27 04:42 AM
Maybe you dont understand signals in time .
You can only receive signal when exist. Your call to receive signals is too late.
When you need receive what you tx you must start receive IT on background before call tx.
Next what you need understand is hw FIFOs usw...
2021-12-27 04:43 AM
same code works on L476 MCU, this issue happens only on L072 mcu
2021-12-27 04:47 AM
L476 have hw FIFO buffer , then can receive more as one byte ...
2021-12-27 04:53 AM
Ahh,
how can I solve this issue?