cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-F767ZI: usb: over-current condition

mo_krauti
Associate II

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?

1 ACCEPTED SOLUTION

Accepted Solutions
mo_krauti
Associate II

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.

View solution in original post

2 REPLIES 2
TDK
Guru

> 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.

If you feel a post has answered your question, please click "Accept as Solution".
mo_krauti
Associate II

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.