Question
same STM32 UART1_TX is connected to UART2_RX. But UART2_RX only receive 1st element
If you have time, please help me to find the solution to enhance the code below. In same STM32F103C8T6, UART1_TX is connected to UART2_RX which is received data from TX.
#include "main.h"
#include <stdio.h>
UART_HandleTypeDef huart1;
UART_HandleTypeDef huart2;
...
uint8_t TxData[] = {2, 1, 3};
uint8_t RxData[5] ;
/*#################### usart1Tx = PA9 connect usart2RX = PA3 ####################*/
int main(void)
{
...
while (1)
{
HAL_UART_Transmit(&huart1, TxData, sizeof(TxData), HAL_MAX_DELAY);
HAL_UART_Receive(&huart2, RxData, sizeof(RxData), HAL_MAX_DELAY);
}
}
