2024-07-19 04:34 PM
I have made my own STM32MP1 board with the STM32MP151AAC3 processor. Right now I'm faceing issues with the software STM32CubeProgrammer and I don't know why this happens.
My goal is to flash the eMMC via the UBS OTG.
What we can see here is that:
So the question is simple:
Why does STM32CubeProgrammer get timeout?
The full log can be found here: https://pastebin.com/q9GttMiR
00:57:35:752 : UR connection mode is defined with the HWrst reset mode
00:57:35:918 : Device Descriptor:
00:57:35:918 : |_bLength : 0x12
00:57:35:918 : |_bDescriptorType : 0x01
00:57:35:918 : |_bcdUSB : 0x0200
00:57:35:918 : |_bDeviceClass : 0x00
00:57:35:918 : |_bDeviceSubClass : 0x00
00:57:35:918 : |_bDeviceProtocol : 0x00
00:57:35:918 : |_bMaxPacketSize : 0x40
00:57:35:918 : |_idVendor : 0x0483
00:57:35:919 : |_idProduct : 0xdf11
00:57:35:919 : |_bcdDevice : 0x0200
00:57:35:919 : |_iManufacturer : 0x01
00:57:35:919 : |_iProduct : 0x02
00:57:35:919 : |_iSerialNumber : 0x03
00:57:35:919 : |_bNumConfigurations : 0x01
00:57:35:919 : Configuration Descriptor:
00:57:35:919 : |_bLength : 0x09
00:57:35:919 : |_bDescriptorType : 0x02
00:57:35:919 : |_wTotalLength : 0x48
00:57:35:920 : |_bNumInterfaces : 0x01
00:57:35:920 : |_bConfigurationValue : 0x01
00:57:35:920 : |_iConfiguration : 0x02
00:57:35:920 : |_bmAttributes : 0xc0
00:57:35:920 : |_bMaxPower : 0x01
00:57:35:920 : Interface Descriptor Alternate Settings: 0x00
00:57:35:920 : |_bLength : 0x09
00:57:35:920 : |_bDescriptorType : 0x04
00:57:35:920 : |_bInterfaceNumber : 0x00
00:57:35:920 : |_bAlternateSetting : 0x00
00:57:35:920 : |_bNumEndpoints : 0x00
00:57:35:920 : |_bInterfaceClass : 0xfe
00:57:35:920 : |_bInterfaceSubClass : 0x01
00:57:35:920 : |_bInterfaceProtocol : 0x02
00:57:35:920 : |_iInterface : 0x06
00:57:35:921 : Interface Descriptor Alternate Settings: 0x01
00:57:35:921 : |_bLength : 0x09
00:57:35:921 : |_bDescriptorType : 0x04
00:57:35:921 : |_bInterfaceNumber : 0x00
00:57:35:921 : |_bAlternateSetting : 0x01
00:57:35:921 : |_bNumEndpoints : 0x00
00:57:35:921 : |_bInterfaceClass : 0xfe
00:57:35:921 : |_bInterfaceSubClass : 0x01
00:57:35:921 : |_bInterfaceProtocol : 0x02
00:57:35:921 : |_iInterface : 0x07
00:57:35:921 : Interface Descriptor Alternate Settings: 0x02
00:57:35:921 : |_bLength : 0x09
00:57:35:921 : |_bDescriptorType : 0x04
00:57:35:921 : |_bInterfaceNumber : 0x00
00:57:35:921 : |_bAlternateSetting : 0x02
00:57:35:921 : |_bNumEndpoints : 0x00
00:57:35:921 : |_bInterfaceClass : 0xfe
00:57:35:921 : |_bInterfaceSubClass : 0x01
00:57:35:921 : |_bInterfaceProtocol : 0x02
00:57:35:922 : |_iInterface : 0x08
00:57:35:922 : Interface Descriptor Alternate Settings: 0x03
00:57:35:922 : |_bLength : 0x09
00:57:35:922 : |_bDescriptorType : 0x04
00:57:35:922 : |_bInterfaceNumber : 0x00
00:57:35:922 : |_bAlternateSetting : 0x03
00:57:35:922 : |_bNumEndpoints : 0x00
00:57:35:922 : |_bInterfaceClass : 0xfe
00:57:35:922 : |_bInterfaceSubClass : 0x01
00:57:35:922 : |_bInterfaceProtocol : 0x02
00:57:35:922 : |_iInterface : 0x09
00:57:35:922 : Interface Descriptor Alternate Settings: 0x04
00:57:35:922 : |_bLength : 0x09
00:57:35:922 : |_bDescriptorType : 0x04
00:57:35:922 : |_bInterfaceNumber : 0x00
00:57:35:922 : |_bAlternateSetting : 0x04
00:57:35:922 : |_bNumEndpoints : 0x00
00:57:35:922 : |_bInterfaceClass : 0xfe
00:57:35:922 : |_bInterfaceSubClass : 0x01
00:57:35:922 : |_bInterfaceProtocol : 0x02
00:57:35:923 : |_iInterface : 0x0a
00:57:35:923 : Interface Descriptor Alternate Settings: 0x05
00:57:35:923 : |_bLength : 0x09
00:57:35:923 : |_bDescriptorType : 0x04
00:57:35:923 : |_bInterfaceNumber : 0x00
00:57:35:923 : |_bAlternateSetting : 0x05
00:57:35:923 : |_bNumEndpoints : 0x00
00:57:35:923 : |_bInterfaceClass : 0xfe
00:57:35:923 : |_bInterfaceSubClass : 0x01
00:57:35:923 : |_bInterfaceProtocol : 0x02
00:57:35:923 : |_iInterface : 0x0b
00:57:35:923 : Functional Descriptor :
00:57:35:923 : |_bLength : 0x09
00:57:35:923 : |_bDescriptorType : 0x21
00:57:35:923 : |_bmAttributes : 0x0f
00:57:35:923 : |_wDetachTimeOut : 0xff
00:57:35:923 : |_wTransferSize : 0x0400
00:57:35:923 : |_bcdDFUVersion : 0x0110
00:57:35:923 : USB speed : High Speed (480MBit/s)
00:57:35:923 : Manuf. ID : STMicroelectronics
00:57:35:924 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
00:57:35:924 : SN : 002600373431510433383938
00:57:35:924 : DFU protocol: 1.1
00:57:35:924 : Board : --
00:57:35:924 : Device ID : 0x0500
00:57:47:117 : Start Embedded Flashing service
00:57:47:151 : sending a set alternate setting request with index: 5
00:57:47:152 : receiving packet
00:57:47:153 : DFU status = 0 : OK
00:57:47:153 : DFU state = 2 : dfuIDLE
00:57:47:153 : UpLoading data
00:57:47:153 : DFU status = 0 : OK
00:57:47:153 : DFU state = 2 : dfuIDLE
00:57:47:153 : sending a set alternate setting request with index: 1
00:57:47:154 : Memory Programming ...
00:57:47:154 : Opening and parsing file: tf-a-stm32mp157a-ev1-usb.stm32
00:57:47:197 : File : tf-a-stm32mp157a-ev1-usb.stm32
00:57:47:197 : Size : 220.41 KB
00:57:47:197 : Partition ID : 0x01
00:57:47:197 : Download in Progress:
00:57:47:198 : Size : 225702 Bytes
00:57:47:199 : sending packet nbr: 0
00:57:47:200 : DFU status = 0 : OK
00:57:47:200 : DFU state = 2 : dfuIDLE
00:57:47:201 : Status: 0, State: 2
00:57:47:204 : DFU status = 0 : OK
00:57:47:204 : DFU state = 4 : dfuDNBUSY
[.....]
00:57:49:178 : sending packet nbr: 152
00:57:49:179 : DFU status = 0 : OK
00:57:49:179 : DFU state = 5 : dfuDNLOAD-IDLE
00:57:49:179 : bwPollTimeout = 1
00:57:49:180 : Status: 0, State: 5
00:57:49:183 : DFU status = 0 : OK
00:57:49:183 : DFU state = 4 : dfuDNBUSY
00:57:49:184 : bwPollTimeout = 1
[......]
00:57:49:488 : DFU state = 4 : dfuDNBUSY
00:57:49:488 : bwPollTimeout = 1
00:57:49:492 : DFU status = 0 : OK
00:57:49:492 : DFU state = 5 : dfuDNLOAD-IDLE
00:57:49:492 : bwPollTimeout = 1
00:57:49:495 : sending packet nbr: 162
00:57:49:495 : DFU status = 0 : OK
[.....]
00:57:50:059 : DFU status = 0 : OK
00:57:50:060 : DFU state = 5 : dfuDNLOAD-IDLE
00:57:50:060 : bwPollTimeout = 1
00:57:50:061 : Status: 0, State: 5
00:57:50:090 : DFU status = 0 : OK
00:57:50:090 : DFU state = 4 : dfuDNBUSY
00:57:50:090 : bwPollTimeout = 1
00:57:50:094 : DFU status = 0 : OK
00:57:50:095 : DFU state = 5 : dfuDNLOAD-IDLE
00:57:50:095 : bwPollTimeout = 1
00:57:50:099 : Segment[0] downloaded successfully
00:57:50:099 : File download complete
00:57:50:099 : Time elapsed during download operation: 00:00:02.454
00:57:50:099 : RUNNING Program ...
00:57:50:099 : PartID: :0x01
00:57:50:099 : DFU status = 0 : OK
00:57:50:099 : DFU state = 5 : dfuDNLOAD-IDLE
00:57:50:099 : bwPollTimeout = 1
00:57:50:101 : sending a dfu end of download request
00:57:50:102 : DFU status = 0 : OK
00:57:50:102 : DFU state = 7 : dfuMANIFEST
00:57:50:102 : bwPollTimeout = 1
00:58:22:076 : DFU status = 0 : OK
00:58:22:345 : DFU state = 2 : dfuIDLE
00:58:24:127 : sending a set alternate setting request with index: 5
00:58:29:426 : receiving packet
00:58:59:455 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
00:58:59:455 : sending a clear status request
00:59:59:496 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
00:59:59:496 : an error occured after sending the clear status request
00:59:59:496 : Status: errUNKNOWN, State: dfuERROR
00:59:59:551 : sending a clear status request
01:00:59:498 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:00:59:498 : an error occured after sending the clear status request
01:00:59:498 : Status: errUNKNOWN, State: dfuERROR
01:00:59:498 : sending a clear status request
01:01:59:500 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:01:59:500 : an error occured after sending the clear status request
01:01:59:500 : Status: errUNKNOWN, State: dfuERROR
01:01:59:500 : sending a clear status request
01:03:05:691 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:03:05:827 : an error occured after sending the clear status request
01:03:05:828 : Status: errUNKNOWN, State: dfuERROR
01:03:05:829 : sending a clear status request
01:03:59:506 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:03:59:507 : an error occured after sending the clear status request
01:03:59:507 : Status: errUNKNOWN, State: dfuERROR
01:04:00:400 : sending a clear status request
01:04:59:544 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:04:59:544 : an error occured after sending the clear status request
01:04:59:544 : Status: errUNKNOWN, State: dfuERROR
01:04:59:544 : sending a clear status request
01:05:59:546 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:05:59:546 : an error occured after sending the clear status request
01:05:59:546 : Status: errUNKNOWN, State: dfuERROR
01:05:59:546 : sending a clear status request
01:06:59:550 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:06:59:550 : an error occured after sending the clear status request
01:06:59:550 : Status: errUNKNOWN, State: dfuERROR
01:06:59:550 : sending a clear status request
01:07:59:555 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:07:59:555 : an error occured after sending the clear status request
01:07:59:556 : Status: errUNKNOWN, State: dfuERROR
01:07:59:556 : sending a clear status request
01:08:59:556 : libusb get status error [-7] : LIBUSB_ERROR_TIMEOUT
01:08:59:556 : an error occured after sending the clear status request
01:08:59:557 : Status: errUNKNOWN, State: dfuERROR
01:08:59:742 : unable to switch the device to dfuIDLE state
01:08:59:857 : Error: an error occured while uploading data from the virtual partition 0xF1
01:09:03:186 : Error: Start operation failed at partition 0x01
01:09:06:454 : Error: TSV flashing service failed
01:09:39:537 : Disconnected from device.