I'm trying to debug my NEO7M GPS-tracker with STM32H7. NEO chip has UART interface so I set up UART and start coding (Keil v5). It's clear but not for me.
What's going on here:
NEO7M is transmitting data periodically so it looks like DATA----IDLE----DATA----IDLE. All I need is to receive the whole information and send it to some parsing functions.
In main.c I have this:
ReadGPS(RecievedData);
ReadTime(RecievedData, Time);
And these functions look like this:
void ReadGPS(char *RecievedData){
HAL_UARTEx_ReceiveToIdle_IT(&huart1, (uint8_t*)RecievedData, GPS_DATA_SIZE);
}
void ReadTime(char *RecievedData, uint8_t *Time){
***parsing algorithm***
}
So I'm pulling RecievedData pointer to ReadGPS function, reading payload and then using RecievedData in parsing function. Great!
My problem:
If I start a debug session without any breakpoints, in Watch Window data in RecievedData variable changes and parsers work great. BUT when I start using breakpoints, only first symbol of RecievedData is changing, and another 400 symbols are the same as before, and parsers give me wrong information. I tried to use UART receiving function without interrupt, but got the same.
UPD:
This is how it looks like when code running without breakpoints. I see whole UART data packet updating every second.
When I use step by step mode only the first symbol of recieved data is updating.