Hi,
without seeing your gode it´s like a look into a crystal ball ... wild guessing.
I guess it´s a problem of frame sync.
Klaus
Hi , thank you for your reply
1) at the first variables
/* GPS Variables */
uint8_t GPSData_GPRMC[140] = {0};
2) and then initilization of peripherals
/* Initialize all configured peripherals */
MX_DMA_Init();
MX_USART2_UART_Init();
3) and then receive data from gps with dma
HAL_UART_Receive_DMA(&huart2, GPSData_GPRMC, sizeof(GPSData_GPRMC)); // Receive GPS Data with DMA
__HAL_DMA_DISABLE_IT(&hdma_usart2_rx, DMA_IT_HT) ; //Disable half transfer complete interrupt
4) after dma receive 140 bytes of gps, mcu go to this function
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
if (huart->Instance == USART2)
{
GPSDataValidFlag = 1;
}
HAL_UART_Receive_DMA(&huart2, GPSData_GPRMC, sizeof(GPSData_GPRMC)); // Run DMA again
}
In this function we call receive gps data again