cancel
Showing results for 
Search instead for 
Did you mean: 

Hard fault while sending huge data through ethernet

"We are facing a hard fault issue in our code when sending a large amount of data. Occasionally, it runs properly, but most of the time, it goes into a hard fault after sending approximately 10,000 bytes. The image data we are sending is around 40 KB. Interestingly, sending 'Hello World' in a loop works successfully without any faults. I have also tried increasing the lwIP options sizes through a trial-and-error approach, but the issue persists. I have been struggling with this problem for the past 20 days and have not been able to resolve it. I am using the STM32H723VGT6 microcontroller. Please help me resolve this issue."

1 REPLY 1

@utkarshchaurasiya36 wrote:

I have been struggling with this problem for the past 20 days and have not been able to resolve it.


So what have you tried in those 20 days?

What have you discovered?

 

Debugging Hard Faults:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/708193/highlight/true#M51

 

LwIP Debugging:

https://community.st.com/t5/stm32-mcus/using-the-itm-console-for-printf-redirects-and-lwip-debug/ta-p/723472

 

PS:

 


@utkarshchaurasiya36 wrote:

Occasionally, it runs properly, but most of the time, it goes into a hard fault after sending approximately 10,000 bytes.."


If it does work occasionally, that could suggest a timing issue somewhere...
 

Some general debugging tips:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/tac-p/706966/highlight/true#M49