Skip to main content
Visitor II
February 6, 2024
Solved

GPIO pins won't RESET low (always high)

  • February 6, 2024
  • 2 replies
  • 3448 views

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

 

    This topic has been closed for replies.
    Best answer by Tesla DeLorean

    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.

    2 replies

    HunterRAuthor
    Visitor II
    February 6, 2024

    also, both pins have 10k external pull up

    Graduate II
    February 6, 2024

    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.

    HunterRAuthor
    Visitor II
    February 6, 2024

    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.