Skip to main content
MMora.10
Associate
Dec 6, 2021 5:15 PM UTC
Solved

STM32G474 Crashes Laptop when unplugging USB

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.

This topic has been closed for replies.
MMora.10
MMora.10Best answer
Associate
Dec 8, 2021 1:35 PM UTC

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!

11 replies

Uwe Bonnes
Chief
Dec 7, 2021 10:26 AM UTC

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

MMora.10
MMora.10Author
Associate
Dec 7, 2021 1:01 PM UTC

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.

Uwe Bonnes
Chief
Dec 7, 2021 1:26 PM UTC

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.

MMora.10
MMora.10Author
Associate
Dec 7, 2021 1:00 PM UTC

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.

Pavel A.
Dec 7, 2021 10:00 PM UTC

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.
Dec 7, 2021 10:28 PM UTC

>  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 ...

MMora.10
MMora.10Author
Associate
Dec 8, 2021 12:41 PM UTC

Hi Pavel,

When I tried this, windows crashed on the spot, with the same error as I see when physically unplugging the hardware.

MMora.10
MMora.10AuthorBest answer
Associate
Dec 8, 2021 1:35 PM UTC

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!