PWM shutdown using internal comparator
Hi im using stm32g474vet6 mcu , in that im using internal comparator for PWM SHUTDOWN for protection purpose.
im using comp4. comp4 input pin is directly shorted to ADC pin and reference voltage is giving using DAC.
in the below attached image
yellow color : sudden change in adc signal which is going to comparator input.
blue color : comparator output is taken out using gpio of mcu
green color : pwm signal from mcu.
in that image u can see that the sudden change in adc crosses the threshold value of comparator, and comparator output is become high , during that time pwm signal is not stoping exactly , it is shutdown at after the completion of that ON cycle, where as in pwm OFF cycle this is not happening pwm is shutting down fastly.'
to shutdown that pwm fastly what to do ? these things are done in stm32cubeide ioc file configuration setting of timer1, in that i have enabled only comparator output and not the TIM1_BKIN.
