Arduino not recognized, COM port missing, not appearing in device manager

Hi,
I attached my new Arduino MKR Wifi 1010 to my Windows 7 laptop. However there was a notification that said that the USB device was not recognized because it had malfunctioned. I unplugged my board, put away the laptop and decided to try again later, because the board was getting hot.
Later, I turned on the computer and plugged in the board but nothing happened. I went to the Arduino IDE and tried to select the COM port, but the one I had plugged it into, COM15, was not there. I went to device manager and the device did not appear. I found another Forum post similar to this one, and somebody who had answered there linked to another post with steps to resolve the issue.

(Loop-Back Test Instructions)
However it didn't work for me.
What do I do?

@abdullahmc Try double tapping the reset button (two times in quick succession) this puts the board into bootloader mode, (the PC should change COM port). If available select the new COM port in the Arduino IDE and try uploading oncemore.

Failing that, try wiggling USB connector in the PC and MKR board sockets. If that doesn't work I'd try changing the USB cable for a different one.

I tried double tapping the reset. Nothing happened.
Also I was using a different cable before when this problem started.

Because the MKR WiFi 1010 uses a USB CDC serial port, the loopback test does not apply to these boards. You can only use that technique with the boards that have a dedicated serial adapter chip (e.g., Uno, Mega). So the loopback test is expected to fail even on a MKR WiFi 1010 that is working perfectly.

Does the LED next to the "5V" pin pulse after you press and release the reset button twice quickly while the board is connected to your computer via the USB cable?

No it does not pulse.

OK, this indicates one of two possibilities:

  • The board was physically damaged by being subjected to conditions outside its rated tolerances.
  • The bootloader on the MKR WiFi 1010's ATSAMD21G18 microcontroller has somehow been corrupted or erased. The most common cause of this is uploading to the MKR board while you have the Arduino Nano 33 BLE selected from the Arduino IDE's Tools > Board menu, but there are likely other ways to accomplish it.

If it is the former cause, it is likely not economically repairable and you should buy a new board.

If it is the latter cause, you can recover the board by burning the bootloader. In case you want to try this advanced technique, I'll provide instructions:


Note: alternative methods are described at the end of the post.

Using an Arduino board as the programmer

You'll need

  • An extra Arduino board that runs at 3.3 V to use as the programmer.
    • Note: certain Arduino boards can't be used with the sketch that converts it to a programmer.
      • Working: SAMD architecture boards (e.g., MKR boards, Nano 33 IoT, Zero).
      • Untested: AVR architecture boards (e.g., Uno), but the sketch does compile for them.
      • Not working: Nano 33 BLE
    • It is possible to use an Arduino board that runs at 5 V as the programmer, but you'll need to use level shifting circuitry on the programming lines to avoid exposing the target board to 5 V logic levels, which would damage it.
  • An SD slot. This could be built into your Arduino board (e.g., MKR Zero), a shield (e.g., MKR SD Proto Shield), or one of the common SD modules.
  • An SD card that fits your SD slot.
  • A way to connect the SD card to your computer.
  • A way to make the connections to the SWD pins on your target Arduino board. For the MKR WiFi 1010, I like to use a 0.1" pitch 2x3 POGO adapter. You could also solder a header or just wires directly to the test points if you prefer. On the MKR WiFi 1010, the SWD header is on the bottom of the board and is the footprint for a 0.1" pitch 2x3 SMD header (e.g., https://www.digikey.com/short/z3dvdv).

Instructions

  1. Connect an SD card to your computer.

  2. Open this link in your browser: https://github.com/arduino/ArduinoCore-samd/tree/master/bootloaders

  3. Click the folder that matches the name of your target board.

  4. Click the file that ends in .bin

  5. Click the Download button.

  6. Rename the downloaded file to fw.bin

  7. Move fw.bin to the SD card.

  8. Eject the SD card from your computer.

  9. Plug the USB cable of the Arduino board you will be using as a programmer into your computer.

  10. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.

  11. Wait for the download to finish.

  12. In the "Filter your search..." field, type "Adafruit DAP library".

  13. Press Enter.

  14. Click on "Adafruit DAP library by Adafruit".

  15. Click the Install button.

  16. Wait for the installation to finish.

  17. Click the Close button.

  18. Select File > Examples > Adafruit DAP library > flash_from_SD from the Arduino IDE's menus.

  19. Change this line:

    #define SD_CS 4
    

    according to the Arduino pin connected to the SD CS pin. If your programmer board has a built-in SD slot (e.g., MKR Zero), then you can change this line:

    if (!SD.begin(SD_CS)) {
    

    to:

    if (!SD.begin()) {
    
  20. Select the correct board from the Tools > Board from the Arduino IDE's menus for the programmer board.

  21. Select the correct port from the Tools > Port from the Arduino IDE's menus for the programmer board.

  22. Select Sketch > Upload from the Arduino IDE's menus.

  23. Wait for the upload to finish successfully.

  24. Unplug the programmer Arduino board from your computer.

  25. Plug the SD card into the SD slot connected to your programmer Arduino board.

  26. Connect the programmer Arduino board to the target Arduino board as follows:

    Programmer Target
    VCC +3V3
    10 SWDIO
    9 SWCLK
    GND GND
    11 RESETN

    SWD pads on MKR boards (the picture is MKR Zero, but it's the same for MKR WiFi 1010):
    MKR SWD

  27. Plug the USB cable of the programmer Arduino board into your computer.

  28. Select Tools > Serial Monitor from the Arduino IDE's menus. You should now see the Serial Monitor output showing the target board detected, and the bootloader file flashed to it successfully.

  29. Unplug the programmer Arduino board from your computer.

  30. Disconnect the programmer Arduino board from the target Arduino board.


Alternatives

These are some alternatives to the "Adafruit DAP" method I described above.

Using a CMSIS-DAP debug probe as the programmer

If you have a CMSIS-DAP compliant debug probe, you can just do this instead:

  1. Connect the debug probe to your Arduino board.
  2. Select Tools > Programmer > Atmel EDBG from the Arduino IDE's menus.
  3. Select Tools > Burn Bootloader from the Arduino IDE's menus. - The "Burn Bootloader" process should now finish successfully.

I use this little open source debugger.


Using a J-Link as the programmer

Segger J-Link debug probes (e.g., J-Link EDU Mini) can be used with the Adalink software:
https://github.com/adafruit/Adafruit_Adalink

This is a fairly complex procedure, so I recommend against this option unless you already own a J-Link and don't have the supplies on hand for one of the other options.

1 Like

I thought it was physically damaged, so I bought a new board. However I will try the method you stated, but only when I have all the parts (I am not going to buy an SD card and shield until I need them for a project). Can I confirm with you that the programmer board will work afterwards if the method does not work?

I have some excellent news for you. There is now an easy method for doing this without the need for an SD card. I'll share the updated instructions:

You'll need

  • An extra Arduino board that runs at 3.3 V to use as the programmer.
    • Any of the SAMD architecture boards (e.g., MKR boards, Nano 33 IoT, Zero) will work fine.
    • The sketch is too large for the AVR architecture boards (e.g., Mega), so they can't be used.
    • The sketch doesn't compile for the Nano 33 BLE, so it can't be used.
  • A way to make the connections to the SWD pins on your target Arduino board. For the Nano 33 IoT and the MKR Boards other than MKR1000, I like to use a 0.1" pitch 2x3 POGO adapter. You could also solder wires to the test points if you prefer. On the MKR boards other than the MKR1000, the SWD header is on the bottom of the board and is the footprint for a 0.1" pitch 2x3 SMD header (e.g., https://www.digikey.com/short/z3dvdv).

Instructions

  1. Select Sketch > Include Library > Manage Libraries... from the Arduino IDE's menus.

  2. Wait for the download to finish.

  3. In the "Filter your search..." field, type "Adafruit DAP library".

  4. Press Enter.

  5. Click on "Adafruit DAP library by Adafruit".

  6. Click the Install button.

  7. Wait for the installation to finish.

  8. Click the Close button.

  9. Select File > Examples > Adafruit DAP library > samd21 > flash_MKR_bootloaders from the Arduino IDE's menus.
    (despite the "MKR" in the sketch name, this also supports the Nano 33 IoT)

  10. Select your programmer Arduino board from the Tools > Board from the Arduino IDE's menus.

  11. Select the port of the programmer Arduino board from the Tools > Port from the Arduino IDE's menus.

  12. Select Sketch > Upload from the Arduino IDE's menus.

  13. Wait for the upload to finish successfully.

  14. Unplug the programmer Arduino board from your computer.

  15. Connect the programmer Arduino board to the target Arduino board as follows:

    Programmer Target
    VCC +3V3
    1 SWDIO
    2 SWCLK
    GND GND
    0 RESETN

    SWD pads on MKR boards other than MKR 1000 (board in picture is MKR Zero, but it's the same for your MKR WiFi 1010):
    MKR SWD

  16. Plug the USB cable of the programmer Arduino board into your computer.

  17. Select Tools > Serial Monitor from the Arduino IDE's menus.

  18. Select "No line ending" from the dropdown menu near the bottom right corner of the Serial Monitor window.

  19. You should see some instructions for using the sketch in the Serial Monitor output field. This includes a menu of the boards supported by the sketch:

    Select Arduino MKR board to erase and flash with bootloader:
    
    Z     -> Arduino Zero (6504 bytes)
    MZ    -> Arduino MKR Zero (6408 bytes)
    1000  -> Arduino MKR 1000 WIFI (6408 bytes)
    1010  -> Arduino MKR WIFI 1010 (7984 bytes)
    
    [...]
    

    Find your target Arduino board on the list and note the code written to the left of it on the list.

  20. Type the code for the target Arduino board in the Serial Monitor's input field.

  21. Click the Send button to the right of the Serial Monitor input field.

  22. The Serial Monitor output field should now show the board you selected and the progress of flashing the bootloader to the target Arduino board. Wait for it to show "Done!"

  23. Unplug the programmer Arduino board from your computer.

  24. Disconnect the programmer Arduino board from the target Arduino board.

The programmer board will not be affected in any way by this process. It's just the same as running any other sketch on the board. Just make sure to be careful with your wiring. As is always the case, if you make a short circuit or expose the board to voltage levels exceeding its rated specification (3.3 V), you can cause physical damage.