2024-02-06 10:29 AM
I took the default STM32F101VFTx, enabled PB8 & PB9 as GPIO Output, and then tried to pull the pins low. I am having an issue that caused me to create this isolated test. Configurations, code, and scope on the pins below. Repo for this test case is found at https://github.com/Octochi/GPIO_toggle_test
I have checked for shorts to ground, power, and between the pins, all passed. The MCU is otherwise operating normally on the board. I tried changing mode to open drain. Shorting the test points to ground pulls them low (observed on waveforms).
I'm not sure what I need to look at next to understand why these pins are stuck high. Any help is appreciated!
...
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
//HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_8);
//HAL_GPIO_TogglePin(GPIOB, GPIO_PIN_9);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_8, GPIO_PIN_RESET);
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_9, GPIO_PIN_RESET);
HAL_Delay(1000);
/* USER CODE BEGIN 3 */
}
Solved! Go to Solution.
2024-02-06 10:47 AM
Would start by looking at the schematic and the board as fabricated.
Shouldn't have a problem overcoming 10K pull-up. Check resistors, and if there's a short to the power rail.
Check nothing else connected to the node, check the netlist.
Check you've identified the right pins.
PB8 / PB9 shouldn't be involved with anything else.
Dump RCC and GPIO registers in debugger or code.
2024-02-06 10:41 AM
also, both pins have 10k external pull up
2024-02-06 10:47 AM
Would start by looking at the schematic and the board as fabricated.
Shouldn't have a problem overcoming 10K pull-up. Check resistors, and if there's a short to the power rail.
Check nothing else connected to the node, check the netlist.
Check you've identified the right pins.
PB8 / PB9 shouldn't be involved with anything else.
Dump RCC and GPIO registers in debugger or code.
2024-02-06 10:56 AM
Honestly, I though I had already checked this... I went back to schematic, checked the mapped pins, and found I had the wrong ones configured. Thanks.