Skip to main content
Visitor II
January 4, 2022
Solved

Setting D2 and D3 as GPIO inputs on NUCLEO-G0B1RE and power cycling appears to be causing a permanent short circuit between D2 and D3. Can you give me any knowledge or insight about this?

  • January 4, 2022
  • 11 replies
  • 3340 views

My program sets D1, D2 and D3 up as identical GPIO inputs. All are pull-ups. Tests using STM32CubeIDE in debug shows both working perfectly and independently as the circuit is opened and closed to pull the input down and allowing it to pull up again.

Now the board is power cycled.

The test is repeated using the same code but now D2 is showing as 0 (it is being pulled low despite being open circuit) . Pulling D3 low makes it change from 1 to 0 but now D2 goes from 0 to 1 (it is now being pulled high).

Now power is removed from the board.

Measuring the resistance between D2 and ground shows a different resistance between it and measuring other inputs D1 and D3. Also there appears to be a lower resistance than expected between D2 and D3 but only in one direction.

We have repeated this test on three different NUCLEO-G0B1RE boards and the result has been the same and permanent each time.

Is there anything different about D2 that might explain this change? Is there anything in software that could fix it or protect against this happening?

    This topic has been closed for replies.
    Best answer by waclawek.jan

    What do you mean by D2 and D3, the Arduino signals (i.e. PA10 and PB3) or PD2 and PD3?

    In the latter case, this is the infamous USBC PD dead-battery gotcha - PD2 is UCPD2_CC2 and PD3 is UCPD2_DBCC2, the latter controlling *directly* a transistor switching pulldown in the former (i.e. even without power supply connected). Search the forum for "dead battery".

    JW

    11 replies

    THunn.1Author
    Visitor II
    January 4, 2022

    I am told that LL_SYSCFG_DisableDBATT(LL_SYSCFG_UCPD1_STROBE | LL_SYSCFG_UCPD2_STROBE); soon after start up appears to have fixed the problem. Thank you everyone for your help.