cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157C-DK2 How to use external power supply?

MPier.2
Associate

I would like to provide power from PI connector. How to avoid error blocking message at the start of the boot that report:

***********************************************

* ERROR USB TYPE-C connection in unattached mode  *

* Check that USB TYPE-C cable is correctly plugged *

*    Current too low, use a 3A power supply!    *

***********************************************

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi,

We did not recommend using Arduino or GPIO expansion connectors to feed 5V to the DK1/DK2 board. the 5V_VIN power routing is not be guaranteed for 3A.

Furthermore, you will probably need to remove Q1 and Q2 to disconnect Type-C VBUS.

If you still want to do that at your own risk, you could remove the warning by choosing one of this 'hack':

  • SW: remove this check from the source code
  • HW : fake that a Type-C 3A supply is present by connecting a pull-up on one of the CC line (only one).
    • According to USB Type-C standard, you must use either 10 kΩ ± 5% to 4.75 – 5.5 V (e.g. VBUS) or 4.7 kΩ ± 5% to 3.3 V ± 5% (e.g. VDD). Please not that once this is done, I did not recommend to plug anymore an USB Type-C charger (not sure if any side effect of such hack)

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

4 REPLIES 4
PatrickF
ST Employee

Hi,

We did not recommend using Arduino or GPIO expansion connectors to feed 5V to the DK1/DK2 board. the 5V_VIN power routing is not be guaranteed for 3A.

Furthermore, you will probably need to remove Q1 and Q2 to disconnect Type-C VBUS.

If you still want to do that at your own risk, you could remove the warning by choosing one of this 'hack':

  • SW: remove this check from the source code
  • HW : fake that a Type-C 3A supply is present by connecting a pull-up on one of the CC line (only one).
    • According to USB Type-C standard, you must use either 10 kΩ ± 5% to 4.75 – 5.5 V (e.g. VBUS) or 4.7 kΩ ± 5% to 3.3 V ± 5% (e.g. VDD). Please not that once this is done, I did not recommend to plug anymore an USB Type-C charger (not sure if any side effect of such hack)

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MPier.2
Associate

Thanks for the quickly answer.

We would like to use external power only to make a prototype, then we are ready to design our carrier board with the SOM.

For HW solution its clear.

For SW solution, I found on U-Boot source the file stm32mp1.c with function named "board_check_usb_power(void)". What need I do? Force to "return 0" on line 402?

Looking at the code, I propose to replace on line 462

		/* with 125ms interval, led will blink for 17.02 years ....*/
		nb_blink = U32_MAX;

by something like

		/* with 125ms interval, led will blink for 17.02 years ....*/
		nb_blink = 4;

So, the message is still there, but after 4 red led blinks (instead of 2^32 blinks !), the boot will continue.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
allard
Senior

I too want to connect a external power supply. My application is fairly low-power, so it should be OK with the DK2. I tried the HW solution 10K from CC1 to VBUS, but somehow I did not get rid of the message. How do I apply the SW solution to the distrubution package? Do i need to make a .patch file or a .bbappend?

EDIT: HW solution works now, 10K should be connected to 5v_IN, not VBUS.