cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G474 Crashes Laptop when unplugging USB

MMora.10
Associate II

Currently when I unplug my Nucleo Board from my computer, my computer blue screens with a "SYSTEM_THREAD_EXCEPTION_NOT_HANDLED" error. Any ideas on what would cause this?

It happens every time I unplug the board, even if all I do is plug it in, then unplug it right away.

1 ACCEPTED SOLUTION

Accepted Solutions
MMora.10
Associate II

Thanks to all that replied, I have found an answer.

The issue was that company policy around USB devices would not agree with the nucleo board being mounted as a USB device. We do not use the USB storage on the nucleo board, so within the STM32Cube Programmer application, there is an option to do a firmware upgrade for the ST-LINK debugger. When doing the upgrade, you can change its type to remove the Mass Storage option.

0693W00000HnvlFQAR.pngThis fixed the issue!

View solution in original post

11 REPLIES 11
Uwe Bonnes
Principal III

Try on another laptop. I suspect a problem on the laptop side.

MMora.10
Associate II

Hi Uwe,

I am working with a small team, all of us on different computers. And all of them show this error. Any other thoughts?

We also have multiple different boards, and every board / laptop pair has this issue.

Hi Uwe,

I am working with a small team, all of us on different computers. And all of them show this error. Any other thoughts?

We also have multiple different boards, and every board / laptop pair has this issue.

So tell what you OS you use and if updates are applied regulary. The crash happens in the Laptop, and a the OS should cope with not-so benevolent devices.

We are using Windows 10. The device shows up as a USB Mass storage device, and even when using the "eject" feature, it shows a message that says "safe to remove hardware" and the system still BSOD

Is perhaps some strange company policy and driver involved? I have plugged-and unplugged Nucleo and Disco boards a zillion time with now problem. Perhaps try on a PV/Laptop at home, configured different as the company PCs.

Sadly plugging it into a personal device is not an option. Reading some other posts, I have seen that sometimes the device shows up as a USB Mass Storage device. Do you think this could be causing the problem? Do you know of any ways to stop the device from appearing as a mass storage?

Pavel A.
Evangelist III

Do you all have installed same antivirus or something else by company IT? or maybe all of you play same game?

Can you share the crash dump (minidump) online?

-- pa

Pavel A.
Evangelist III

>  Do you know of any ways to stop the device from appearing as a mass storage?

Yes. Begin from the simplest. While the device is plugged in, locate its mass storage function in Device Manager and disable it.

If Windows won't crash on spot, that's all. Else ...