Skip to main content
Senior
November 11, 2023
Solved

Reset MCU when invalid opcode or when executing out of used flash

In my design, it is very important that a run-away MCU be stopped before it can do damage.  In my case damage would occur if a specific MCU pin goes high for more than about 5 microseconds.  

Are there any recommendations on the best way to do this (e.g., watchdog timer, Hard Fault interrupt)?

 

This topic has been closed for replies.
AScha.3
AScha.3Best answer
Super User
November 11, 2023

so about hrtim -> protection of mosfet/driver

read in rm about hrtim -> fault protection !

the timer has break inputs, to stop output (go to save level - you have to define, what it should do.)

so "usual" way ( i use also) is: to have current limit protection , you need to test/measure the output current anyway;

you have as shown in circuit some current transformer - right? so use its signal to switch the break input; so you get over current protection (switching in ..some ns time outputs off ) and also protection against program errors.

just - test it working and never (also at power up or reset of cpu) any wrong signal is coming from the cpu pins - check with a DSO !   and only if 100% sure, its working fine AND protection also working, connect power to the mosfet part !!!!  ( or you will blow up some xx mosfets for sure.  :) )

AScha3_0-1699724011149.png

 

If you feel a post has answered your question, please click on " Best Answer ".

4 replies

AScha.3
Super User
November 11, 2023
If you feel a post has answered your question, please click on " Best Answer ".
Senior
November 11, 2023

Yes it is, but I thought my previous post was too complex to expect to get an answer.  The answer to this post, would allow me to fix this issue as best as I can (about 1000 of these controllers are about to be built and I need them to work reliably). 

AScha.3
AScha.3Best answer
Super User
November 11, 2023

so about hrtim -> protection of mosfet/driver

read in rm about hrtim -> fault protection !

the timer has break inputs, to stop output (go to save level - you have to define, what it should do.)

so "usual" way ( i use also) is: to have current limit protection , you need to test/measure the output current anyway;

you have as shown in circuit some current transformer - right? so use its signal to switch the break input; so you get over current protection (switching in ..some ns time outputs off ) and also protection against program errors.

just - test it working and never (also at power up or reset of cpu) any wrong signal is coming from the cpu pins - check with a DSO !   and only if 100% sure, its working fine AND protection also working, connect power to the mosfet part !!!!  ( or you will blow up some xx mosfets for sure.  :) )

AScha3_0-1699724011149.png

 

If you feel a post has answered your question, please click on " Best Answer ".