MCU failsafe question

Hello All!

I’m designing a a BLDC controller and came to think about fail safe in case the controller crashes/freezes.

Current plan is to use one timer/pwm to charge parallel capacitors with bleed resistors and a nand gate to control the ir2104 enable input.

My specific question is: Is it possible that a timer keeps running if the MCU freezes/crashes/hangs for any other reason than code getting stuck on loop?


Look up “watchdog timer”. Most MCUs have them.

If failure of your motor control could cause harm or death to humans or animals, I would recommend you investigate products that were designed for safety critical systems.

Otherwise, I would recommend you build your motor control and power hardware in a way that the system is save no matter what the state of the control pins are (input, output, tri-state).

Regarding your question, yes, a PWM peripheral will create a PWM signal even if the software does not write to it anymore. The most likely case is a constant duty cycle. You could imagine a system where the duty cycle is updated inside an interrupt service routine and therefore the pattern could be different.

As jremington recommended the use of a watchdog can help if properly implemented.

You can build a simple watchdog timer based on an NE555 chip .