[SOLVED] COM problem after uploading NANO 33 BLE

Hi everyone.
Here is something very strange that happened to me today.
I worked on NANO 33 BLE and when I uploaded my code, my board seemed to crash . The code did not execute. Furthermore, not respond at all. The orange light blinked into a not normal way.
So I decided to upload my previous code but....IMPOSSIBLE!
NO MORE COM CONNECTION! I tried the standard operations : restart computer, change USB cable, check drivers, IDE, plugged another board (everthing seemes good), pushed restart button...but NOTHING HAPPENED! NO MORE COM CONECTION!
I was so upset that's I pushed reset button about 20 times very quickly and...COM WAS BACK!!!
I uploaded the new code and the same happened...So I pushed about 20 times quickly again on reset button and problem solved again.
The difference between the two code was :
I put "noInterrupt()" in the setup().
My code starts and stops interrupts but I probably did some non "conventionnal line code".
Anyway, now I know that compiled and uploaded codes can cause hardware problem. I think that a bad code (redounded actions or fast loop with maybe interrupt...) can interfer with serial COM and prevent both board and computer to communicate.
If this happened to you I hope this could fix your problem.
Thank for reading.

It should only be necessary to press the reset button twice quickly. This will put the board in bootloader mode, which is indicated by the pulsing "L" LED. In this mode, your sketch doesn't run, so it allows you to upload even when the sketch code causes the board to no longer present a CDC serial port to the computer.

If you then push the reset button a third time it will exit from bootloader mode. So if you push the button 20 times you are just putting it in and out of bootloader mode, without any certainty as to whether it will end up in bootloader mode after you stop pressing the button.

You're welcome. I'm glad if I was able to be of assistance.

This is indeed a very useful technique when using the Nano 33 BLE, as well as the other modern native USB Arduino boards like the MKR series, Nano 33 IoT, and Portenta H7. It's inevitable that you will break/halt/override the USB code on these boards from time to time, in fact you may even do it intentionally such as when you put the microcontroller to sleep to reduce power consumption for a battery powered application.