2024-08-19 10:00 AM
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
2024-09-05 05:58 AM - edited 2024-09-05 06:00 AM
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
2024-09-10 08:00 AM
Hi,
thanks for your reply - i am currently working on the custom device-tree and will report back with the findings :)
2024-09-10 11:24 PM
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.