This issue can either be caused by an outdated IRST driver or by a USB driver issue (either the main drive driver ot the underlying USB port driver).  Here are a few confirmed fixes that you can follow to troubleshoot this issue:

1. Update or Install the IRST driver

If you’re using an outdated Rapid Storage Technology (RST) driver from Intel, chances are you will experience freezing issues every time an external drive is forced to wake up from a ‘soft hang’. This well-known problem affects every IRST driver iteration from version 15 to version 18. Intel has finally patched it with version .19 and above.  To tackle this issue, you will need to update your IRST (Intel Rapid Storage Technology) from the official website of Intel.  Note: You can use this method even if you’re using a generic driver Instead of IRST. When you install the latest version of IRST, you will override the generic driver with the Intel equivalent. Here’s how to update or install the IRST driver: If the problem is still present even after you’ve ensured that you’re using the latest IRST driver version, move down to the next method below. 

2. Uninstall malfunctioning USB ports Drivers

It’s not uncommon for a computer to freeze once a USB device has been inserted. The problem frequently manifests itself when either the USB disk or the USB port driver is affected by corruption. The most common causes of USB malfunctioning problems are faulty USB disk ejection or a defective port driver. Important: This scenario only applicable if you use an external drive plugged in via USB. If you connect it via SATA cable, skip this method and move to the next one below.  Unless there’s a hardware issue, you should be able to fix any type of corruption affecting the USB drive by updating the underlying driver.  But before you do this, the first action you must undertake is to ensure that you don’t have any malfunctioning USB drive that are currently active (but hidden) on your Windows computer.  Note: These malfunction USB-based drives won’t show up inside Device Manager if they are in the state mentioned above. To make them visible, you’ll need to make some adjustments inside the Environment Variables menu.  Follow the steps bellow to make the malfunctioning USB port drivers visible inside Device Manager and uninstall them: If the problem is still not fixed, move down to the next step below. 

3. Update the USB controller drivers

If you’ve used the method above to ensure that you are not dealing with a corrupted USB drive, the next step should be to troubleshoot for a potential USB port issue. First things first, plug the external hard drive into a different USB port and see if the same freezing issue occurs.  Note: Avoid using a USB hub since all of them use the same underlying USB controller drivers. In case the same problem occurs even when you plug it into a different port, go ahead and uninstall the entire fleet of USB controller drivers. This will force your OS to install fresh driver equivalents during the next startup procedure. Here’s how to do this:

Fix: Cant Eject External Hard Drive on Windows 10Fix: External Hard drive not showing up Windows 10How to Fix Format Disk Error External Hard DriveFix: External Hard Drive ‘No Media Error’  FIX  Applications Freeze When External Hard Drive is Connected - 53 FIX  Applications Freeze When External Hard Drive is Connected - 68 FIX  Applications Freeze When External Hard Drive is Connected - 1 FIX  Applications Freeze When External Hard Drive is Connected - 92 FIX  Applications Freeze When External Hard Drive is Connected - 80 FIX  Applications Freeze When External Hard Drive is Connected - 33 FIX  Applications Freeze When External Hard Drive is Connected - 5 FIX  Applications Freeze When External Hard Drive is Connected - 54 FIX  Applications Freeze When External Hard Drive is Connected - 74 FIX  Applications Freeze When External Hard Drive is Connected - 56 FIX  Applications Freeze When External Hard Drive is Connected - 32 FIX  Applications Freeze When External Hard Drive is Connected - 85