cancel
Showing results for 
Search instead for 
Did you mean: 

GPIO pins won't RESET low (always high)

HunterR
Associate II

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!

...

HunterR_2-1707243776809.png

 

HunterR_0-1707243659343.png

/* 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 */
}

 

HunterR_1-1707243732555.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

3 REPLIES 3
HunterR
Associate II

also, both pins have 10k external pull up

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.