Skip to main content
Roshan
Associate III
Jul 22, 2021 2:20 PM UTC
Question

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

This topic has been closed for replies.

5 replies

MM..1
Super User
Jul 22, 2021 3:04 PM UTC

Check your pcb board all Vdd pins

Roshan
RoshanAuthor
Associate III
Jul 22, 2021 3:08 PM UTC

@MM..1​  Connection are all fine, Recently I change the button input to another board. both work really well without any issue. Till button, the connection is attached it works really fine, but once I remove the pin connection (here the cable from other PCB), from the next start itself it will go to the SBSFU Boot menu

MM..1
Super User
Jul 22, 2021 3:16 PM UTC

When this pin is BOOTx pin then you need external pull, because on RESET state internal ...