2022-07-12 10:41 AM
BQ_GE_GPIO_Port->MODER = GPIO_MODE_ANALOG;//setting to analog to save power
This seems to not work at all. I have a physical pulldown on the pin but the pin stays HIGH. Why is that?
i init the pin via this code here:
__HAL_RCC_GPIOB_CLK_ENABLE();
GPIO_InitTypeDef GPIO_InitStruct = { 0 };
/*Configure GPIO pin */
GPIO_InitStruct.Pin = BQ_GE_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
HAL_GPIO_Init(BQ_GE_GPIO_Port, &GPIO_InitStruct);
my understanding is that i can jsut switch between the modes to save power when going into sleep. And that when its in Analog mode that it will not use any pullup internally. i have apulldown externally on the pin with 400k ohm.
Solved! Go to Solution.
2022-07-13 07:06 AM
ok the problem was i was using a 470k ohm pulldown. with a 10k ohm pulldown it works.
2022-07-13 07:06 AM
ok the problem was i was using a 470k ohm pulldown. with a 10k ohm pulldown it works.