2023-07-17 11:51 PM
I use PC3_C pin as an GPIO_Input, but when i debug it is flickering between 1 and 0 even without any connection to the pin. anyone knows what happened?
this is the setup i use
GPIO_InitStruct.Pin = Emergency_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
HAL_SYSCFG_AnalogSwitchConfig(SYSCFG_SWITCH_PC3, SYSCFG_SWITCH_PC3_CLOSE);
Solved! Go to Solution.
2023-07-18 01:29 AM
And check this:
https://community.st.com/t5/stm32cubemx-mcu/stm32h723-pinout-pc2-c-pc3-c/td-p/155569
BTW, always post the exact STM32 model you are using.
2023-07-18 01:15 AM
This:
> even without any connection
combined with:
> GPIO_InitStruct.Pull = GPIO_NOPULL;
might lead to the "flickering".
Activate the GPIO's pull-up or pull-down and see if it gets better.
2023-07-18 01:29 AM
And check this:
https://community.st.com/t5/stm32cubemx-mcu/stm32h723-pinout-pc2-c-pc3-c/td-p/155569
BTW, always post the exact STM32 model you are using.