cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Unable to reconnect the target device: time out expired // Flashing device // Linux MP13

Theo_
Associate II

Hello all,
Sorry if I'm not doing everything perfect about this post but this is my very first :).

So i'm currently working on the STM32MP13 DK - Starter package (on STM32MP135F-DK)

And when executing the command : STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp135f-dk-optee.tsv 
which job is to flash the image into the sd card i'm getting the following log. I'm working on oracle VM, Ubuntu 24.04.

If you have any question about my setup I'll be happy to answer you.

Théo

 

Log :
Start Embedded Flashing service

 

Opening and parsing file: tf-a-stm32mp135f-dk-optee-programmer-usb.stm32


Memory Programming ...
File : tf-a-stm32mp135f-dk-optee-programmer-usb.stm32
Size : 86.52 KB
Partition ID : 0x01

Download in Progress:
[==================================================] 100%

File download complete
Time elapsed during download operation: 00:00:02.171

RUNNING Program ...
PartID: :0x01

Reconnecting the device ...

Error: Unable to reconnect the target device: time out expired


Error: Start operation failed at partition 0x01
Error: TSV flashing service failed

1 ACCEPTED SOLUTION

Accepted Solutions

It finally worked.

I ended up switching to VMware for my VMs. As said in https://wiki.st.com/stm32mpu/wiki/PC_prerequisites

"ST has selected VMWare as Linux virtual machine solution."

Which I hardly recommand you go trough and listen :) !

 

It does feel like the USB devices managing is done better in VMWare as whenever you plug a device it asks in which (between host OS and VM) you would like to connect the USB to.

Yes @PatrickF there were indeed some settings in VM to tell a peripheral to be directly taken by the VM but it didn't make things better for me.

Thank you for your help.

Théo

View solution in original post

7 REPLIES 7
ThomasB
ST Employee

Hello @Theo_,

Have you checked that boot pin is on 0000 ? Otherwise board couldn't boot on USB.

See https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP135x-DK/Let%27s_start/Populate_the_target_and_boot_the_image#Populate_the_SD_card to get visual aid on boot pin.

 

Tell me if this solves your timeout problem.

Best regards,

Thomas

 

smanger
Associate III

I'm using a STM32MP157F-DK2 and I don't know if this could be your problem: I was having intermittent problems when trying to flash. The STM Linux Device was told to disconnect and would not reconnect. I would have to restart the DK2 because that port was dead.

smanger_0-1752171437471.png

What fixed my problems was disconnecting the cable from the USB Micro port.

PatrickF
ST Employee

HI @Theo_ 

 

that's could be due to VM setting which does not route correctly the USB to VM on USB reconnect (uBoot initialize DFU with slightly different USB profile than BootROM).

 

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.
Theo_
Associate II

Hi,
@ThomasB, Yes the boot pins are on 0000.

@smanger It does look like our devices are getting deconnected. But yours seems to be working correctly for a few partitions dl. While mine seems to be deconnected at the very beginning (for the first partition dl).
You say what fixed your problem was disconnecting a micro USB cable ? But on my board (MP135F), I have only 2 USB-C cables (one for power and one for image flashing). Maybe our boards differ on that point idk.

@PatrickF I've read some things about ST supporting VMware for VMs and so, not especially supporting OracleVM. What do you think ? Should I switch to VMware ?

It does indeed feels like my problem comes from the VM since the peripheral (my st board) is getting disconnected on the VM tools on the top of the UI. Could you give me some more information on how to route correctly the uBoot's usb profile ?

Thank you all for all the answers.

Théo

Hi,

I cannot tell for other VM like the OracleVM, but once USB fail to reconnect (do not reset the board), you might see the DFU on Windows device manager (instead of having it visible inside Linux VM).

There is likely some menu in the VM settings to tell that this peripheral has to be taken by the VM (and not Windows host).

 

As a fallback, you could also load starter package into the board using cubeprogrammer on windows (VM must be stopped).

 

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.

It finally worked.

I ended up switching to VMware for my VMs. As said in https://wiki.st.com/stm32mpu/wiki/PC_prerequisites

"ST has selected VMWare as Linux virtual machine solution."

Which I hardly recommand you go trough and listen :) !

 

It does feel like the USB devices managing is done better in VMWare as whenever you plug a device it asks in which (between host OS and VM) you would like to connect the USB to.

Yes @PatrickF there were indeed some settings in VM to tell a peripheral to be directly taken by the VM but it didn't make things better for me.

Thank you for your help.

Théo

Hwang.11
Associate II

reconnected usb and download again