I own both a Nano 33 BLE Sense and a Nano 33 IoT.
After using my 33 BLE for a while, I've connected the Nano 33 IoT, loaded the Blink example sketch and clicked the compile and flash button. Unfortunately I forgot to change the board from BLE to IoT.
My Nano 33 IoT seems to be bricked now. The LED is constantly on. Double tapping the Reset button doesn't help and it is not recognized by Windows when connected through USB.
Does anyone have any ideas what else I can try? Do I need to manually re-flash the bootloader? How would I do that given that the USB-connection doesn't work?
Untested: AVR architecture boards (e.g., Mega), 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 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). On the MKR1000, it is a 0.05" pitch 2x5 male header on the top of the board, which you will need an adapter and cable for.
Plug the USB cable of the programmer Arduino board into your computer.
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.
Unplug the programmer Arduino board from your computer.
Disconnect the programmer Arduino board from the target Arduino board.
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.
Hello, I have bricked my Nano 33 IoT as well. The only other boards that I have for bootloader include UNO R3 SMD EDITION with ADAFRUIT Music Maker MP3 Shield with SD card slot. AND a MKR WAN 1310 but no SD Card.
When I try the solution above, at the burn bootloader command, I get an error
Please select a programmer from Tools->Programmer menu
Has anyone tried this method to flash a bootloader in a ATsamd21? I have a few Arduino Nano clones but SWD pins are not available and same thing with my Teensy 3.5. I guess I will need to buy a real Nano !
I have seen other posts about flashing the bootloader with an Arduino as ISP, but it means I would need to do it from a Arduino Zero (since Uno/Nano/... don't use a samd21) ?
owartique:
Has anyone tried this method to flash a bootloader in a ATsamd21?
That's exactly what we're doing here. Unlike the classic Arduino Nano, which uses the ATmega328P microcontroller, the Nano 33 IoT uses the ATSAMD21G18 microcontroller.
owartique:
I have seen other posts about flashing the bootloader with an Arduino as ISP, but it means I would need to do it from a Arduino Zero (since Uno/Nano/... don't use a samd21) ?
From a hardware standpoint, it doesn't matter which microcontroller is on the board you are using as an Arduino as ISP. It's true that some board architectures aren't compatible with the Arduino as ISP sketch, but that's only a software problem. If someone made the effort, those boards could be made to work as Arduino as ISP programmers.
However, it's important to understand that, although you can use a board with any microcontroller for the Arduino as ISP Programmer board, the protocol of the Arduino as ISP programmer only works with target boards that use a microcontroller of the AVR archtecture (e.g., ATmega328P, ATmega32U4, ATmega2560). Even if you were to use an Arduino Zero as an Arduino as ISP programmer, you couldn't use it to program a Nano 33 IoT because the ATSAMD21G18 microcontroller on the Nano 33 IoT is not AVR architecture.
I am currently designing a custom board based on the ATsamd21 and I will certainly follow the steps you have carefully written. I just need to order a Nano33 IoT and use it as my programmer (much cheaper than Atmel-ICE!!).
You're welcome. I'm glad if I was able to be of assistance.
It sounds like you're doing a fun project! I always like the idea of being able to turn an Arduino board into a cool tool to assist me in my explorations of microcontrollers.
That said, I will add another think I learned since the time I wrote the instructions above, just for the sake of providing all the alternatives I've tried:
Note: if you have a CMSIS-DAP debugger, you can just do this instead:
Connect the debugger to your Arduino board.
(In the Arduino IDE) Tools > Programmer > Atmel EDBG
If you're interested in "ICE" debugging, that debugger is a useful tool to have. If not, maybe you'd prefer ending up with a spare Nano 33 IoT to play with. After all, you can never have too many Arduinos!
All the steps you have listed above can be replaced by those 3 steps with a CMSIS-DAP?
Tell me if I'm wrong but if I understood well :
I connect the SWD pins of my custom board to a CMSIS-DAP debugger (via JTAG or SWD connector) and then the CMSIS-DAP to my computer (via usb) and I should be able to burn the bootloader ?
If that's right then I'll probably choose this method over the other since it looks way easier !
The Arduino IDE's Tools > Burn Bootloader feature really makes the process convenient. On the other hand, many Arduino users already have a spare Arduino board on hand, and will only ever need to flash a bootloader to recover their board once or twice in their lives. So those users might prefer to do a little extra setting up the Adafruit DAP system with the tools they already have rather than be delayed on their project for some days waiting for a debugger to be delivered.
Hi pert,
thanks for this info, got me right out of the .....
I used a NANO 33 to do this to another NANO 33, so i used an SD card module,
one thing to not, especially with the modules i have , they have a 5 to 3.3v regulator on them. (AMS1117)
If you try to use 3.3v from the board it wont power up.
So i linked the Vusb pads on the base of the board to get the 5 volts working and connected to VCC.
I checked the signal levels in and out with my scope and they were 3.3V
also i had to move the RESETEN to pin 8 as , 11 is the MOSI pin and it stopped the sd card from reading
and adjust
I've tried to follow this but I am using a nano BLE sense as the Programmer board to flash the bootloader to a Nano 33 IOT. I am getting an error on compile. Do I need a different board to use as the programmer?
I get this warning
WARNING: library Adafruit_DAP_library claims to run on samd architecture(s) and may be incompatible with your current board which runs on mbed architecture(s).
and then an error when trying to compile. Any help would be appriciated.
Hi @ltortuya. Unfortunately, I think this library can only be used with the boards of the SAMD architecture like MKR boards, Nano 33 IoT, and Zero. I apologize if my instructions were misleading.
It's confusing because the documentation for Adafruit_DAP says this:
Tested with a Metro M0 / Arduino Zero as the 'host' and with ATSAMD21's as the client but in theory any 3.3V Arduino board will work as host (just slower)
This is the reason is why I didn't specify that the programmer board must be of the SAMD architecture in my instructions, but it seems clear that at least the Nano 33 BLE boards are not supported. I have now updated my instructions to prevent future confusion.
I'm sending you best wishes for eventual success with your bootloader burning endeavor.
I'm glad to hear you were able to burn the bootloader! Thank you for taking the time to post an update with your solution. I'm sure those who find this thread while searching for a solution to the same problem will be very grateful.