Skip to main content
Roshan
Associate III
July 22, 2021
Question

Button input value always keeps floating

  • July 22, 2021
  • 1 reply
  • 1504 views

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.

1 reply

MM..1
Chief III
July 22, 2021

Check your pcb board all Vdd pins

Roshan
RoshanAuthor
Associate III
July 22, 2021

@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
Chief III
July 22, 2021

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