cancel
Showing results for 
Search instead for 
Did you mean: 

Custom STM32MP157A board not booting - OTG_VBUS needed? Red LED constantly on.

Elektronomikon
Associate

Hello,

i'm currently trying to boot a custom board which has the bare minimum of STPMIC1, SDRAM and USB closely resembling the STM32MP15-DISCO evaluation board except on power delivery (VBUS from USB-C is switched via STUSB4500 but _not_ connected to OTG_VBUS at the CPU, STPMIC1 is powered from a Li-Ion battery).

STM32CubeProg finds the DFU connection over USB-C and can connect, but fails programming showing:

18:45:29 : UR connection mode is defined with the HWrst reset mode
18:45:29 : USB speed : Full Speed (12MBit/s)
18:45:29 : Manuf. ID : STMicroelectronics
18:45:29 : Product ID : DFU in FS Mode @Device ID /0x500, @Revision ID /0x0000
18:45:29 : SN : 003600443431510130343630
18:45:29 : DFU protocol: 1.1
18:45:29 : Board : --
18:45:29 : Device ID : 0x0500

18:45:53 : Start Embedded Flashing service
18:45:53 : Memory Programming ...
18:45:53 : Opening and parsing file: tf-a-stm32mp157a-dk1-usb.stm32
18:45:53 : File : tf-a-stm32mp157a-dk1-usb.stm32
18:45:53 : Size : 220.41 KB
18:45:53 : Partition ID : 0x01
18:45:53 : Download in Progress:
18:45:55 : File download complete
18:45:55 : Time elapsed during download operation: 00:00:02.239
18:45:55 : RUNNING Program ...
18:45:55 : PartID: :0x01
18:46:25 : Error: Start operation failed at partition 0x01
18:46:25 : Error: TSV flashing service failed

 

I also tried flashing the sdcard directly and boot from there, but no matter what it wont boot and the red light on PA13 stays on.

 

In the wiki is stated that this shows either:

ERROR USB TYPE-C connection in unattached mode

Check that USB TYPE-C cable is correctly plugged

or

USB TYPE-C charger not compliant with USB specification

 

As the "engineering boot mode" [100] also does not blink the LED but just turns it on i'm now looking for more information which might trigger this behavior..

 

Thanks in advance,

Thomas

3 REPLIES 3
debugging
Lead

I am interested in your issue as my board will use an TUSB320 with USB-C connector

 

These are notes from the STM Workshop document:

 

 ☐ USB OTG it is mandatory by Uboot DFU for external flash programming (eMMC,SDcard…), and by Linux driver.
OTG_VBUS pin must be connected to type B receptacle for device or to AB receptacle for (Device/) Dual-role mode.
Note: If USB OTG is only used for Uboot DFU the OTG_VBUS pin can be let unconnected. In this case use a special Uboot DT configuration to disable VBUS sensing (In “usbotg_hs“ node : u-boot,force-b-session-valid; dr_mode = "peripheral";).

Note: OTG_VBUS pin is needed for USB-TypeC receptacle, VBUS sensing must be deactivated with the same node as previous note above.


☐ OTG_ID pin for OTG Dual-Role(DR), must be connected to typeAB receptacle.
Note: OTG_ID pin is not needed for USB-TypeC receptacle
Note: If USB is only used for Uboot DFU for external flash programming, OTG_ID pin is optional (can be left unconnected) to set OTG in device mode


☐ If using TypeC and no controller used, 5.1kOhms pull-downs should be populated on CC lines
Note: Please see AN5260 and AN5225 for more information and more complex designs

Hi,

thanks for your reply - i am currently working on the custom device-tree and will report back with the findings

PatrickF
ST Employee

Hi,

would be very valuable to share the board UART console output.

Red LED could be due to bad reuse of DT from STM32MP15x-DK regarding USB Type-C supply detection (which you don't have if I understand correctly).
Please have a look to this post https://community.st.com/t5/stm32-mpus-boards-and-hardware/type-c-power-supply-not-detected-by-mpu/td-p/717468

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.