2024-07-04 04:16 PM
I'm running a GPS application based on @Tesla DeLorean application that he kindly shared here:
https://github.com/cturvey/RandomNinjaChef/blob/main/f746g_disco_gps.c
I'm now encountering a HardFault
When I step into the function to load the register value I get the following:
It appears to be a problem adding an entry to a queue.
My initial thought is that when I'm processing the NEMA sentences one of more of the entries in the string are NULL.
int size = sprintf(&Buffer,"{\"src_addr\":\"%s\",\"PDOP\":%5.2f,\"HDOP\":%5.2f,\"VDOP\":%.2f,\"Volts\":%.2f}\n","Node1", pdop, hdop, vdop,Volts);
I've spent a fair bit of time looking for an easy way to understand what is going on but so far nothing useful.
2024-07-04 05:14 PM
The problem would appear to be related to a call to:
osDelay(100);
Why would this cause a HardFault?
2024-07-04 07:51 PM
it seems to be rack of thread stack size. increase the thread stack size more. then test it
2024-07-05 01:20 AM
2024-07-06 04:22 PM
Thanks Andrew, very much appreciated I will use that next time I get a hardfault.
I believe that i may have solved my issue by changing osDelay to Hal_Delay
osDelay(100);
to
HAL_Delay(50);