cancel
Showing results for 
Search instead for 
Did you mean: 

hard fault after touchgfx::muldivu() called

hbZhao
Associate III

 

Hello,

 

I am working on STM32F426 with TouchGFX. However, after I upgrade STM32CUBEIDE and TouchGFX to latest version, I got a hard fault error. In the stack information, it shows the hard fault happens after touchgfx::muldivu() called.

GaetanGodart_0-1730993629964.png

 

 

And in the fault analyzer, the fault is to attempt to perform a division by zero.

GaetanGodart_1-1730993629983.png

 

 

May I know if there is any way to solve it? Thanks.

 

 

 

Edit : fixed it

6 REPLIES 6
Andrew Neil
Evangelist III

Would be more helpful to describe what was the problem and how you fixed it - then anyone searching in the future could find it.

GaetanGodart
ST Employee

Hello @hbZhao ,

 

Indeed, it would be nice if you could briefly explain the issue you had and how you solved it! :smiling_face_with_smiling_eyes:
I have reverted your message to the original (before edit) so you don't have to rewrite it).

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)
Andrew Neil
Evangelist III

@hbZhao wrote:

the fault is to attempt to perform a division by zero.

:

:

May I know if there is any way to solve it?


Don't attempt to divide by zero!

>>Don't attempt to divide by zero!

100% this..

And perhaps CHECK if this is a posibility, and perhaps use a number for the solution which isn't unrepresentable?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello @hbZhao ,

 

Have you been able to move forward with your issue?
Did you find where you were dividing by 0?

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Looks more deeply in the library, so probably from a parameter or table passed in. Or corruption to said table or structure. 

The call tree might be the most enlightening at this depth. Or some asserts to catch impending failure earlier.

Some thing where you expect a list with 2 elements but pass only one? N-1

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..