2015-11-10 11:35 PM
Hi STM32 forum.
I am working on a custom board with STM32F030 controller on it. In my setup the GPIOs are connected to triac ICs which drive the external load(bulbs). The GPIOs init is as given below: GPIO_InitTypeDef GPIO_InitStructure;
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_3;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP ;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_Level_1;
GPIO_Init(GPIOB, &GPIO_InitStructure);
I am observing an initial spike(on scope) of about 1.5ms on power ON, on the GPIO pin that is connected to one of the triac due to which there is a flicker in the load(bulb). I am not sure what is creating the problem. Any help/suggestions will be very helpful.Thanks..!! #stm32-gpio
2015-11-12 02:41 AM
No, I tried writing the output data register it is still the same.
2015-11-12 02:49 AM
>Yes, the spikes appear between power On and GPIO_Init().
That suggests you can't do much with software, except initialising the GPIO pin quickly, to make the spike as short as possible. The most time before entering main() is usually spent in SystemInit(), especially while waiting for the clock/PLL to stabilize. This would shorten the spike to perhaps a few microseconds. But ''bleeding off'' this capacitor charge by hardware would IMHO be the better solution.
2015-11-12 03:02 AM
Thank you so much for the suggestions.
I will definitely pass it on to my hardware engineer.