Arduino MKR WIFI 1010 boot

Hello,
My name is Avi Goldshtein and I would like to ask for assistance to reprogram the boot to MKR board.
From my review, I saw that this is a common issue with this boars and I'll appreciate for guideline how to do so.

Sincerely,
AviG.

Hi Avi. I can help you with that. But first we should check to be sure it's necessary. What is your reason for wanting to do this?

Dear Pert,
I Appreciate your response to my request.
Currently when I'm connecting the device to the USB comm port both leds are lightning (orange and the green) and the device is not seeing at the device manager (before it was).
I change port, no success.
I tried double pressing rst button, but it didn't help.
Bt the way , I connected another Arduino MKR and it worked perfectly.
Therefore my suspiciouse is that there's a boot failure.

Please advise how to proceed.
Best regards,
Avi Goldshtein

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


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.

Dear Pert,
I'll follow yours instruction and hope that I'll suceed to do so.
I'll date you accordingly.
Appreciate your support?
Best Regards,
AviG.

בתאריך יום ב׳, 16 באוג׳ 2021, 03:13, מאת pert via Arduino Forum ‏<arduino@discoursemail.com>:

You're welcome. Looking back at my previous reply, I notice that I accidentally removed my specific responses to you when I copy pasted in my stock burn bootloader instructions. So I'll add a little information now.

When pressing the reset button twice doesn't result in a pulsing "L" LED, this indicates one of two possibilities:

  • Bootloader is missing or corrupted
  • Microcontroller is not running due to physical damage to the board

The former will be fixed by burning the bootloader following the instructions I provided above. The latter is not likely to be repairable.

So I do agree that the best thing to do now is to burn the bootloader.

Thank a lot Pert
Sincerely,
AviG.

בתאריך יום ב׳, 16 באוג׳ 2021, 09:40, מאת pert via Arduino Forum ‏<arduino@discoursemail.com>:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.