A dfu error occurs when downloading an image
I am currently developing using the STM32MP157FAD. And I want to create a distribution image and download the image using STM32CubeProgrammer.
However, while downloading the image, the following error message is displayed in the log of STM32CubeProgrammer.
15:34:17:270 : DFU status = 0
15:34:17:270 : DFU State = 5
15:34:17:270 : Segment[0] downloaded successfully
15:34:17:270 : File download complete
15:34:17:270 : Time elapsed during download operation: 00:00:01.440
15:34:17:270 : RUNNING Program ...
15:34:17:270 : PartID: :0x01
15:34:17:270 : DFU status = 0
15:34:17:270 : DFU State = 5
15:34:17:270 : sending a dfu end of download request
15:34:17:270 : DFU status = 0
15:34:17:271 : DFU State = 7
15:34:22:259 : DFU status = 0
15:34:22:259 : DFU State = 2
15:34:22:259 : sending a set alternate setting request with index: 5
15:34:27:259 : receiving packet
15:34:32:260 : sending a clear status request
15:34:42:262 : an error occured after sending the clear status request
15:34:42:262 : Status: errUNKNOWN, State: dfuERROR
15:34:42:262 : sending a clear status request
15:34:52:263 : an error occured after sending the clear status request
15:34:52:263 : Status: errUNKNOWN, State: dfuERROR
An error message is continuously displayed and the connection with the device is disconnected, and the following error is displayed.
16:18:01:268 : unable to switch the device to dfuIDLE state
16:18:01:268 : Error: an error occured while uploading data from the virtual partition 0xF1
16:18:01:288 : Error: Start operation failed at partition 0x01
16:18:01:312 : Error: TSV flashing service failed
16:18:46:271 : Warning: Connection to device 0x500 is lost
16:19:51:499 : Disconnected from device.
For OTG Device Tree, refer to the following site.
&usbotg_hs{
pinctrl-names = "default", "sleep";
pinctrl-0 = <&usb_otg_hs_pins_mx>;
pinctrl-1 = <&usb_otg_hs_sleep_pins_mx>;
compatible = "st,stm32mp15-hsotg", "snps,dwc2";
phys = <&usbphyc_port1 0>;
phy-names = "usb2-phy";
u-boot,force-b-session-valid ;
dr_mode = "peripheral";
usb-role-switch;
role-switch-default-mode = "peripheral";
status = "okay";
/* USER CODE BEGIN usbotg_hs */
/* USER CODE END usbotg_hs */
};
I would be grateful if you could teach me how to solve this problem.
