mfgtools icon indicating copy to clipboard operation
mfgtools copied to clipboard

'Failure to open USB device' Error When Flashing IMX8 with UUU on Windows 10

Open Exbo7 opened this issue 4 months ago • 6 comments

Good morning,

I have been experiencing some problems when flashing IMX8 recently. I will provide as much information as possible about the system and the issue I have encountered.

Information of the system

  • The microcontroller I am trying to flash is an IMX8.
  • I am using Windows 10 64-bit as the operating system.
  • Version of UUU used v1.5.201.

Analyzing the flash logs, we observed that during the flash_init sequence, UUU produced error 2:2->Fail: 'Failure to open USB device' (1.497e+16 s). However, as can be seen in the log, UUU continued to execute the script. Despite executing the entire script correctly, however, the UUU program returned an error message saying 'USB device not open' and marked the script execution as 'NOK'. (Flash log attached with the name Flash_init.txt)

I am also attaching the script that is run to flash. (Script used attached with the name FILE 1.txt)

Does anyone know what might be happening? Could it be a Windows configuration problem? Or could it be that UUU is reporting a 'NOK' when the script has finished running correctly? Alternatively, could it be a configuration issue with the script used?

I would be grateful for any support from those who have experienced a similar problem or know how to mitigate this error.

Thank you in advance.

Flash_init.txt

FILE 1.txt

Exbo7 avatar Aug 05 '25 10:08 Exbo7

@nxpfrankli @nxpweilincao Can you help me with this issue?

Exbo7 avatar Sep 02 '25 06:09 Exbo7

@Exbo7, do you start UUU with "-d" flag?

AndreyLalaev avatar Sep 24 '25 05:09 AndreyLalaev

Good morning @AndreyLalaev ,

We do not start UUU with the -d flag.

Let's try activating the -d flag as you suggest to see if that solves the problem.

Thank you for your reply.

We will try it and let you know the results.

Exbo7 avatar Sep 25 '25 06:09 Exbo7

@Exbo7, -d will force uuu to run indefinitely (is useful when you need to flash N devices in parallel). To get more info about flashing, you may also need to enable -V flag for libusb debug messages and -pp 100 (it sets USB polling period to 100ms. Try different values, maybe it will help).

AndreyLalaev avatar Sep 25 '25 06:09 AndreyLalaev

Perfect @AndreyLalaev

We tried with -d and with -pp with different values.

Thank you for your help.

I will keep you informed.

Exbo7 avatar Sep 25 '25 08:09 Exbo7

Hello again @AndreyLalaev ,

I'm sorry for taking so long to give you feedback.

We have tried daemon mode -d and USB polling -pp as you suggested, but having daemon mode enabled does not work for us.

Let me explain our process and the main problem we are having in a little more detail:

PROCESS: When we receive a new PCB, we must flash two different UUU files (File 1 and File 2). Once UUU File 1 has been OK, we continue with File 2. The test system we use to perform this entire sequence checks the UUU output response to verify that everything has gone correctly. If there is an error, the UUU returns an ExitCode, and if everything has gone well, it returns nothing.

PROBLEM: We have a 15% rejection rate because when the SDPS: boot -f imx-loader command is executed, the UUU loads the image and once the image is loaded, the device restarts and has to redetect the USB device.

These NOK PCBs do not detect the device after restarting, causing an error due to a timeout defined by UUU, but after this error, it instantly detects the device and continues to execute the script without any problems. (Image Problem UUU). The problem is that UUU is returning an error with its Exitcode = -1 (Image Problem UUU_2). Image Image

YOUR SOLUTION Putting UUU in daemon mode is not a viable solution for us, since we run two UUU scripts. When we activate it, UUU always stays with the first script and does not indicate whether the process was successful or not.

Any new ideas on how to solve the problem described?

Thank you very much for your help and interest in the problem described.

FILE 1.txt FILE 2.txt

Exbo7 avatar Oct 03 '25 11:10 Exbo7