Button input value always keeps floating
Hi all,
I am using button input from separate input (Separate PCB). After I disconnect that PCB, SBSFU automatically goes into the Updating mode. Even I tried to do an internal pull-up but it also doesn't work.
I tried two methods of internal pull-ups but still, I have that problem. please can anyone help me with this?
method 1)
GPIO_InitTypeDef GPIO_InitStruct; \
GPIO_InitStruct.Pin = GPIO_PIN_6; \
GPIO_InitStruct.Pull = GPIO_PULLUP;\
GPIO_InitStruct.Mode = GPIO_MODE_INPUT; \
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; \
__HAL_RCC_GPIOC_CLK_ENABLE(); \
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); \method 2 )
GPIOC -> PUPDR |= GPIO_PUPDR_PUPD6_0;But nothing is working
problem is happening due to floating of the pin (button)
Thanks
Roshan
