Skip to main content
Explorer II
March 28, 2025
Solved

NUCLEO-F767ZI: usb: over-current condition

  • March 28, 2025
  • 2 replies
  • 407 views

I am using a NUCLEO-F767ZI Board.

Previously I have not used or configured any GPIO. Then I used CubeMX to reconfigure 3 Pins to Inputs with Pull-Down like this:

screenshot-2025-03-28-10_42_22.png

 if (HAL_GPIO_ReadPin(button_uncouple_GPIO_Port, button_uncouple_Pin) == GPIO_PIN_SET) {

In the code I was using a basic check like the one above. After flashing the new code to the board. The board no longer appeared as a usb device. Instead the system log reported

kernel: usb usb1-port1: over-current condition

I was able to recover access to the board by powering the board using an external 5v power supply to the E5V Port and GND. Then I could flash an older version of my code without the GPIO configured and everything is working fine again, also without the external power supply.
I do not understand why the reconfiguration of the pins as input pull-down lead to this. This should not result in an increase of current usage?

    This topic has been closed for replies.
    Best answer by mo_krauti

    Now the issue also sometimes occured on a stm32h7 board. I switched the usb cable and it seems to be working again. So I think it was a faulty usb cable.

    2 replies

    Super User
    March 28, 2025

    > I do not understand why the reconfiguration of the pins as input pull-down lead to this. This should not result in an increase of current usage?

    On its own, it should not. Probably some indirect cause due to whatever else you're doing in the code.

    mo_krautiAuthorAnswer
    Explorer II
    April 29, 2025

    Now the issue also sometimes occured on a stm32h7 board. I switched the usb cable and it seems to be working again. So I think it was a faulty usb cable.