Switching relay causes hardFault on MCU
I am switching 5V relay with BJT using MCU(STM32G030) pin. When clock speed is 64MHz(max speed) and 1ms timer update interrupt is enabled, not every time I switched relay but sometimes MCU goes into hardFault handler. But if I disable timer update in...