Burn bootloader on nano 33 BLE with another arduino

Hello,

After a bad manipulation i have unfortunately deleted the bootloader of my arduino nano 33 BLE (nRF52840).
I saw that it was possible to reburn the bootloader with another arduino using the ICSP pins of the target arduino, but I did not find how to do it on the nano 33 BLE.
thanks for your answer, any help will be welcome.

P.S.: I have at my disposal an arduino UNO, an arduino DUE and another 33 BLE.

not with another Arduino but with a J-link

--> Burn bootloader Arduino nano 33 BLE | Djynet

1 Like

yes I have seen this site before, the problem is that I don't have a J-link.
and having seen that we could use another arduino as a programmer, i wanted to do it without j-link

may be that one would help then?

Unbrick Nano 33 IoT - #2 by pert?

EDIT:
oops : * Not working: Nano 33 BLE

1 Like

I had seen this article too, it gave me a lot of hope.

I'm going to start to believe that it's not possible.

There is a report that the Adafruit DAP library approach described in the tutorial J-M-L linked above can also be used with the Nano 33 BLE:

I haven't had time to try it yet.

I'll share the method I have tested to work:


You'll need

  • ARM CMSIS-DAP compatible debug probe.
  • A way to make a connection to the debug probe. These usually use a 2x5 0.05" pitch header/cable.
  • A way to make the connections to the SWD pads on the Nano 33 BLE. Options:
    • Pogo adapter like https://www.sparkfun.com/products/11591
      Even with this adapter, it's a bit challenging to get the pogo pins aligned with the small test pads on the Nano 33 BLE, but if you keep at it you'll get it eventually. Better would be to have a jig like this, but if you're not going to be doing this regularly then that's probably overkill.
    • Some people have managed to use a regular 0.1" pitch 2x3 male header pressed down on the test pads to make the connections. I think that would be a bit more challenging, but it's cheap enough and something you might already have on hand.
    • Soldering wires to the test points.

Instructions

  1. Start the Arduino IDE.

  2. Select Tools > Board > Arduino Nano 33 BLE from the Arduino IDE's menus.

  3. Select Tools > Programmer > ARM CMSIS-DAP Compatible from the Arduino IDE's menus.

  4. Make the connections between the debugger/programmer and the Nano 33 BLE:

    Programmer Target
    Vref +3V3
    SWDIO SWDIO
    SWCLK SWCLK
    GND GND
    RESET RESETN

    Here's the pinout of the test pads on the Nano 33 BLE:
    Nano 33 BLE SWD1. Connect the USB cable of the programmer to your computer.

  5. Power the Nano 33 BLE (you can do this via the USB connector on the board). The debugger doesn't power the board.

  6. Select Tools > Burn Bootloader from the Arduino IDE's menus.

1 Like

thank you for this method i think that's what i'm going to do, even if i was looking for a way to do it without having to buy a programmer

You're welcome. I'm glad if I was able to be of assistance.
Best wishes for success with your bootloader burning endeavors!
Per

can this be done with an FTDI cable instead of J-Link by any chance?

has anyone done this?

Not that I'm aware of.

I'm using the recommended CMSIS-DAP debugger above along with a pogo pin board.

But I keep getting an error:

Error: Error connecting DP: cannot read IDR
Error while burning bootloader.

Any ideas what this is indicating?

Thanks.

Hi @ghcd. I'm sorry to hear you're having some difficulties with the bootloader burning process.

I'm going to ask you to post some additional information that might help us to identify the problem.

Please do this:

  1. Select File > Preferences from the Arduino IDE's menus.
  2. Check the checkbox next to "Show verbose output during: upload".
  3. Click the OK button.
  4. Select Tools > Burn Bootloader from the Arduino IDE's menus.
  5. After the Burn Bootloader process fails, you'll see a button on the right side of the orange bar: Copy error messages. Click that button.
  6. Open a forum reply here by clicking the Reply button.
  7. Click the </> icon on the post composer toolbar. This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  8. Press Ctrl+V. This will paste the compilation output into the code block.
  9. Move the cursor outside of the code block markup before you add any additional text to your reply.
  10. Click the Reply button to post the output.

Folder locations removed before line "Open On-Chip..." as a security precaution.

Arduino: 1.8.15 (Windows 10), Board: "Arduino Nano 33 BLE"

Open On-Chip Debugger 0.11.0+dev-gab95bac57-dirty (2021-05-11-10:45)

Licensed under GNU GPL v2

For bug reports, read

	http://openocd.org/doc/doxygen/bugs.html

debug_level: 2



Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.

Info : CMSIS-DAP: SWD  Supported

Info : CMSIS-DAP: JTAG Supported

Info : CMSIS-DAP: FW Version = v1.0

Info : CMSIS-DAP: Serial# = 093BFE7F

Info : CMSIS-DAP: Interface Initialised (SWD)

Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 1 TDO = 0 nTRST = 0 nRESET = 1

Info : CMSIS-DAP: Interface ready

Info : clock speed 1000 kHz

Error while burning bootloader.

Error: Error connecting DP: cannot read IDR






Also it seems strange to me that when I measure the VCC pin before attempting to burn the bootloader I am not getting a voltage, is that normal?

Do you mean the VCC pin on the debugger?

Correct the VCC pin on the debugger.

Yes. I actually should have written "Vref" instead of VCC in the instructions. I'll correct that. This pin is intended to tell the debug probe the appropriate logic levels to use for the circuit. So the debug probe will not power your Nano 33 BLE through this pin. Did you power the Nano 33 BLE via the USB cable while you were attempting to burn the bootloader?

Yep, I have the Nano 33 BLE powered by USB.

I just gave it a try to make sure everything is still working with the latest version of the "Arduino Mbed OS Nano Boards" platform of the Nano 33 BLE and everything worked fine for me.

Double check that all your connections are correct. Note that jumper wires sometimes are defective or damaged and don't conduct electricity. Getting the pogo pins pressed down in just the right position on those tiny test pads and avoiding having the pins or board shift position while you are juggling all the other parts of the procedure with your other hand is infuriatingly difficult to manage. I usually need a couple of attempts before I manage a successful bootloader burning, but with persistence I always get there in the end.