cancel
Showing results for 
Search instead for 
Did you mean: 

Status: errUNKNOWN, State: dfuERROR - What could this error be referring to?

JKell.6
Associate III

I'm getting these errors on the consoles when FSBL (TF-A) is trying to download SSBL (U-Boot). What could this DFU error be? I've added the following to the U-Boot DTSI file so it ignore USB OTG VBUS and USB OTG ID. I've tried this using Linux and Windows with STProgrammer.

&usbotg_hs {
 	u-boot,force-b-session-valid;
 	dr_mode = "peripheral";
 };

Console Output:
 
NOTICE:  CPU: STM32MP157AAA Rev.Z
NOTICE:  (a)Model: STMicroelectronics custom STM32CubeMX board - openstlinux-5.15-yocto-kirkstone-mp1-v22.                     06.15
NOTICE:  board_id = 0
NOTICE:  Board: Board ID is zero
NOTICE:  Checking fixed regulator register
INFO:    fixed_regulator_register() is the problem
INFO:    Entering the loop
INFO:    register fixed reg regulator-vdd!
INFO:    Node: 10728
NOTICE:  Calling stm32mp1_syscfg_init()
WARNING: VDD unknown
NOTICE:  Watchdog refresh
NOTICE:  BSEC read debug configuration
NOTICE:  Arch security setup
INFO:    Reset reason (0x4):
INFO:      Pad Reset from NRST
NOTICE:  Syscfg enable IO
INFO:    FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO:    FCONF: Reading firmware configuration information for: stm32mp_io
NOTICE:  BL MEM param handling
INFO:    Using USB
INFO:      Instance 2
INFO:    Boot used partition fsbl1
NOTICE:  Done with arch setup
NOTICE:  BL2: v2.6-stm32mp1-r2.0(debug):()
NOTICE:  BL2: Built : 17:01:00, Feb  8 2023
INFO:    BL2: Doing platform setup
NOTICE:  STM32MP DDR probe
INFO:    RAM: DDR3-DDR3L 16bits 532000kHz
NOTICE:  stm32mp_ddr_test_addr_bus(size) - size = 536870912
NOTICE:  Checking for address bits stuck high
NOTICE:  Checking for address bits stuck low
NOTICE:  uret Value = 0
INFO:    Memory size = 0x20000000 (512 MB)
INFO:    DFU USB START LOAD...
INFO:    DFU STATE - Phase=3, Address=c7000000, Base=c7000000, Length=16777216
STProgrammer Console Output
 
DFU State = 5
13:36:57:326 : Segment[0] downloaded successfully
13:36:57:326 : File download complete
13:36:57:326 : Time elapsed during download operation: 00:00:01.406
13:36:57:326 : RUNNING Program ... 
13:36:57:326 :   PartID:      :0x01 
13:36:57:326 : DFU status = 0
13:36:57:327 : DFU State = 5
13:36:57:327 : sending a dfu end of download request
13:36:57:328 : DFU status = 0
13:36:57:329 : DFU State = 7
13:36:57:476 : DFU status = 0
13:36:57:477 : DFU State = 2
13:36:57:477 : sending a set alternate setting request with index: 5
13:36:57:478 : receiving packet
13:36:57:479 : DFU status = 0
13:36:57:479 : DFU State = 2
13:36:57:479 : UpLoading data
13:36:57:482 : DFU status = 0
13:36:57:482 : DFU State = 2
13:36:57:482 : sending a set alternate setting request with index: 3
13:36:57:482 : Start operation done successfully at partition 0x01
13:36:57:482 : sending a set alternate setting request with index: 5
13:36:57:483 : receiving packet
13:36:57:483 : sending a clear status request
13:36:57:483 : an error occured after sending the clear status request
13:36:57:483 : Status: errUNKNOWN, State: dfuERROR
13:36:57:483 : sending a clear status request
13:36:57:483 : an error occured after sending the clear status request
13:36:57:483 : Status: errUNKNOWN, State: dfuERROR
13:36:57:483 : sending a clear status request
13:36:57:484 : an error occured after sending the clear status request
13:36:57:484 : Status: errUNKNOWN, State: dfuERROR
13:36:57:484 : sending a clear status request
13:36:57:487 : an error occured after sending the clear status request
13:36:57:487 : Status: errUNKNOWN, State: dfuERROR
13:36:57:487 : sending a clear status request
13:36:57:489 : DFU status = 14
13:36:57:489 : DFU State = 10
13:36:57:489 : an error occured after sending the clear status request
13:36:57:491 : Status: errUNKNOWN, State: dfuERROR
13:36:57:491 : sending a clear status request
13:36:57:491 : DFU status = 0
13:36:57:491 : DFU State = 2
13:36:57:491 : UpLoading data
13:36:57:507 : DFU status = 0
13:36:57:507 : DFU State = 2
13:36:57:507 : sending a set alternate setting request with index: 3
13:36:57:507 : Memory Programming ...
13:36:57:507 : Opening and parsing file: fip-stm32mp153a-xpro-mp1-mx-optee.bin
13:36:57:509 :   File          : fip-stm32mp153a-xpro-mp1-mx-optee.bin
13:36:57:511 :   Size          : 1.41 MB 
13:36:57:511 :   Partition ID  : 0x03 
13:36:57:511 : Download in Progress:
13:36:57:512 :   Size          : 1483254 Bytes
13:36:57:512 : sending packet nbr: 0
13:36:57:512 : Status: 14, State: 10
13:36:57:512 : sending a clear status request
13:36:57:513 : an error occured after sending the clear status request
13:36:57:513 : Status: errUNKNOWN, State: dfuERROR
13:36:57:513 : sending a clear status request
13:36:57:516 : an error occured after sending the clear status request
13:36:57:516 : Status: errUNKNOWN, State: dfuERROR
13:36:57:516 : sending a clear status request
13:36:57:516 : DFU status = 14
13:36:57:516 : DFU State = 10
13:36:57:516 : an error occured after sending the clear status request
13:36:57:516 : Status: errUNKNOWN, State: dfuERROR
13:36:57:517 : sending a clear status request
13:36:57:517 : DFU status = 0
13:36:57:518 : DFU State = 2
13:36:57:519 : DFU status = 0
13:36:57:519 : DFU State = 3
13:36:57:519 : DFU status = 0
13:36:57:519 : DFU State = 5
13:36:57:519 : sending packet nbr: 1
13:36:57:519 : DFU status = 0
13:36:57:519 : DFU State = 5
13:36:57:519 : Status: 0, State: 5
13:36:57:519 : DFU status = 0
13:36:57:519 : DFU State = 3
13:36:57:519 : Error during download get_status
13:36:57:519 : Error: failed to download Segment[0]
13:36:57:519 : Error: failed to download the File
13:36:57:538 : Error: Download partition 0x03 failed
13:36:57:560 : Error: TSV flashing service failed

6 REPLIES 6
JKell.6
Associate III

Is there not a version of this for TF-A? It almost seems like it's waiting for something to happen on the USB/DFU side but it never does. Eventually just times out. Custom target does not use USB OTG VBUS or USB OTG ID.

&usbotg_hs {
	u-boot,force-b-session-valid;
	dr_mode = "peripheral";
};

PatrickF
ST Employee

Hi @Community member​ 

according to https://wiki.st.com/stm32mpu/wiki/OTG_device_tree_configuration#DT_configuration_example_as_high-speed_OTG_in_Host_or_Peripheral_mode-2C_with_micro-B_or_Type-C_connector-2C_and_with_VBUS_and_ID_left_unconnected

you need to add also:

usb-role-switch;

role-switch-default-mode = "peripheral";

Don't know if the various warning around VDD setting on your TF-A boot log might hurt.

Btw (maybe not the root cause of error), I see that your TF-A version (v2.6-stm32mp1-r2.0) is maybe not aligned with the Ecocsystem version (openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15)

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.

Hi Patrick,

Great catch! That's one Wiki page set I haven't run across. I'll give that a go in the TF-A DTS file.

As for the VDD warning, that's from my addition to get around my fixed power supply. I found nothing very concise on handling not using a PMIC but found example DTS's and parroted those. Here's how I've done that. Had other regulators listed as well but the compiler didn't like those so removed them.

regulators {
	vdd: regulator-vdd {
		compatible = "regulator-fixed";
		regulator-name = "vdd";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-always-on;
	};
};
 
&pwr_regulators {
	pwr-supply = <&vdd>;
};

That's weird my TF-A version isn't aligned with my Ecosystem. It should be, it all came together in 4.1.0 recently.

So I tried adding the following to the TF-A DTS

&usbotg_hs{
	pinctrl-names = "default";
	pinctrl-0 = <&usb_otg_hs_pins_mx>;
	status = "okay";
 
	/* USER CODE BEGIN usbotg_hs */
	/*compatible = "st,stm32mp15-hsotg", "snps,dwc2";		/* 0: UTMI switch selects the OTG controller */
	/*phys = <&usbphyc_port1 0>;
	/*phy-names = "usb2-phy";								/* could be "host", see USB generic bindings */
	dr_mode = "peripheral";								/* see USB generic bindings */
	usb-role-switch;									/* could be "host", see USB generic bindings */
	role-switch-default-mode = "peripheral";			/* enable OTG */
	/* USER CODE END usbotg_hs */
};

I tried with/without the compatibility and the phy entries. Same result. On the console TF-A is waiting on something to happen over USB it seems. I've added prints to the USB area in TF-A and it repeatedly tries to get started but never does. Sometimes it'll show on the programmer side stage 2 indicating it's going to download the optee bin file but never gets started. Seems to have gotten a little more difficult to track down in source code what's happening so a bit of a challenge to debug.

0693W00000YAU6kQAH.png

PatrickF
ST Employee

Did you check for classic pitfalls ?

https://community.st.com/s/article/FAQ-STM32MP1-Bring-up-procedure

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.

Yeah, gone through that several times now.