cancel
Showing results for 
Search instead for 
Did you mean: 

Button input value always keeps floating

Roshan
Associate III

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

5 REPLIES 5
MM..1
Chief II

Check your pcb board all Vdd pins

@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

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

@MM..1​ Exactly, but this is just a normal IO pin, not the BOOT0x,

I mean aka BOOT in SBSFU, this is separate code started on reset boot and maybe have configured nopull or oposite and use this pin PC6 as damper or init...