Go Down

Topic: Arduino Nano V3 set as Arduino as ISP to load bootloader into nano 33 iot (Read 84 times) previous topic - next topic

yojojonathan

Hi all,

I've gotten my Nano 33 IOT and it doesn't seem to be recognized by the computer.
I've tried pressing the reset button, different cables, different versions of arduino, drivers etc.
Doesn't work.

The "L" led doesn't turn on at all. Now that makes me think it could be a bootloader issue.
I've tried to program its bootloader using an arduino Nano V3 but I get the following error:


avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.04s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.05s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Error while burning bootloader.






Any thoughts?



J

pert

#1
Aug 23, 2019, 07:23 pm Last Edit: Aug 23, 2019, 07:24 pm by pert Reason: Embed image
The Arduino as ISP programmer can only be used for microcontrollers of the AVR architecture. Unlike the classic Nano, the Nano 33 IoT uses a SAMD architecture microcontroller and thus can not be programmed with an Arduino as ISP.

There is a way to use an Arduino board as a programmer for SAMD chips:
https://github.com/adafruit/Adafruit_DAP
Note that the programming interface for the SAMD chip is SWD, not ICSP. This means you can't use the connections to the SPI pins as you would on an AVR target. The SWD pins are accessible via the test points on the bottom of the Nano 33 IoT:



The pinout is shown here:



VERY IMPORTANT: Note that the Nano 33 IoT is a 3.3 V device. Your classic Nano is a 5 V device. If you power the Nano 33 IoT with 5 V from the 3V3 pin or connect the digital pins of the classic Nano directly to the RESETN, PA31_SWDIO, or PA30_SWCLK pins on the Nano 33 IoT's SWD header, you will likely damage or destroy your Nano 33 IoT. You need to use level shifters to change the 5 V logic levels from the classic Nano to the 3.3 V levels safe for the Nano 33 IoT, or else use a 3.3 V Arduino board as the programmer. If you already connected the classic Nano directly to the Nano 33 IoT while attempting to burn the bootloader via Arduino as ISP, there is a good chance you already damaged or destroyed your Nano 33 IoT.

I'll admit that I didn't have any luck with the Adafruit_DAP library. However, two other forum members have reported that it worked fine for them so it was likely just user error on my part. Adafruit_DAP seems like an ideal solution for someone who just needs to to a one-time or occasional use to rescue a board so I think it's definitely worth giving this a try.

What I ended up doing was buying a cheap JLink clone from eBay, like this:
https://www.ebay.com/itm/303205116546
and using that with Adalink:
https://github.com/adafruit/Adafruit_Adalink

yojojonathan

Thank you for the reply. Saves me a lot of trouble trying to do it! I've connected it to a nano v3 when trying to program its bootloader but the nano 33 still seems to powerup.

pert

You're welcome.

I'll admit that I might have made a momentary 5 V connection to one of my 3.3 V MKR boards while I was fumbling around trying to get the Adafruit_DAP library working, and that MKR board still seems to be fine. So it's not guaranteed that you ruined it with the 5 V connection, but it is quite possible. I would still give a good try at getting it working. Just keep in mind that there is now this extra variable in the troubleshooting equation of whether, in addition to whatever problem you encountered when you received the board, it may have also been damaged during the programming attempt.

Go Up