2023-02-19 09:11 PM
As the title suggest I only receive data once. I also tried using HAL_UART_Receive_DMA and HAL_UART_Receive_IT still got the same result (only receiving once). I'm using Teseo-LIV3FL GNSS module and I've tested it before on my ESP32 and it works as expected. Here's my code snippet
while (1)
{
HAL_UART_Receive(&huart1, receivedData, sizeof(receivedData), 1000);
teseoData = Parse_NMEA(receivedData);
char data[1024];
sprintf(data, "GPS READING \n");
printf("%s", data);
sprintf(data, "UTC Time : %.0f \n", teseoData.time);
printf("%s", data);
sprintf(data, "Latitude : %f \n", teseoData.point.latitude);
printf("%s", data);
sprintf(data, "Longitude : %f\n", teseoData.point.longitude);
printf("%s", data);
sprintf(data, "Fix Status : %c\n", teseoData.fix_status);
printf("%s", data);
sprintf(data, "Geofence : %d\n\n", teseoData.geofence_status);
printf("%s", data);
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
I also attached my STM32 project. Where did I go wrong?