Skip to main content
Associate III
November 5, 2024
Question

hard fault after touchgfx::muldivu() called

  • November 5, 2024
  • 3 replies
  • 1178 views

 

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

3 replies

Andrew Neil
Super User
November 6, 2024

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

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
GaetanGodart
Technical Moderator
November 7, 2024

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,

Andrew Neil
Super User
November 7, 2024

@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!

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Tesla DeLorean
Guru
November 7, 2024

>>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 VenmoUp vote any posts that you find helpful, it shows what's working..