2021-10-06 05:40 AM
Is there a way to prevent a crash while there is a division at zero.
For example when there is a division by zero it will return zero
2021-10-06 11:19 AM
> I can not find all the places and situations when these cases occur.
Is your hope that your code will work in spite of ignoring all divisions by zero?
Surely dividing by zero indicates a flaw somewhere in code logic or otherwise. How is your code so riddled with these errors that you can't isolate where it happens?
2021-10-06 03:02 PM
AFAIK in Cortex-M4 the division by 0 trap is not enabled by default, so there's some code which explicitly enables it (in some sort of SystemInit() or similar obscure piece of code which comes automagically with the environment).
JW