2014-03-06 12:37 AM
Hi
I still could not understand the operation of the analog watchdog. For example I want to protect a short ciruit in the H-bridge ; so I put the shunt resistor and set the limit of the maximum current ; for example if my maximum current is 10A and my shunt resistor is 0.1 ohm ; the voltage on ADC is 1 V ; for 12 bits ( 3.3 ref) =1241 . so if I set the high thr of the analog to 1241 ; when adc result equal or great that 1241 it will generate an interrupt . Is that right ? Thank you2014-03-06 07:46 AM
Hi
Based on the description in the reference manual, the ADC analogue watchdog allows you to set threshold values for the ADC value. The upper value triggers on a value going above. The lower value triggers on a value going below. Both can generate an IRQ. From your description - the circuit you use must be designed very carefully! The ADC input can only withstand a maximum of supply voltage. Is your shunt High side ( from supply voltage to bridge) Or shunt Low Side ( Bridge to ground)? I have worked with the STM32F3 in a switching circuits before. We killed many of them due to spikes on the port pins! Heavily protect the ADC inputs. Also if you are driving the H bridge from the STM32 - try protecting the IO pins as well.