Question
G491 HAL_UART_RECEIVE issue
I am developing a project in which I need to read data that is sent on the UART.
Since it was not working i tried to write a new firmware that only reads from UART, with the following code:
/* USER CODE BEGIN 2 */
volatile HAL_StatusTypeDef huart3RxStat;
uint8_t PWR_Received_data[10];
uint16_t received_bytes;
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
huart3RxStat=HAL_UART_Receive(&huart2,PWR_Received_data, 10, 1000); //for debug
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
Even with the simplest code i can think of the result is still the same:
The UART only reads one byte and then stops, going into timeout before the time actually expires
(i also tried setting timeout to 10000 to make sure and it goes instantly to timeout)
I then tried testing the same code on a F401 nucleo board and another g491, and it only works
I then tried testing the same code on a F401 nucleo board and another g491, and it only works
oon the F401.
What could be the issue?
