cancel
Showing results for 
Search instead for 
Did you mean: 

I am using stm8l-discovery board and I have used division by zero in my code and I need to know how to use to watchdog to reset the device if fault occurs

VSrin
Associate II
 
1 REPLY 1
Philipp Krause
Senior II

I don't think the watchdog will help you with division by zero.

From a C perspective, division by zero is undefined behaviour. From an STM8 asm perspective, division by zero just results in an unspecified result.