cancel
Showing results for 
Search instead for 
Did you mean: 

SMT32F103 Nucleo Hardfault

Jorgie
Associate III

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 

Screenshot 2024-07-05 083757.jpg

When I step into the function to load the register value I get the following:

Screenshot 2024-07-05 083924.jpg

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.

4 REPLIES 4
Jorgie
Associate III

The problem would appear to be related to a call to:

 osDelay(100);

Why would this cause a HardFault?

it seems to be rack of thread stack size. increase the thread stack size more. then test it

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);