This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how can I burn adafruit nRF52 Bootloader to nRF52832 chip

Hi

I have the Adafruit Feather nRF52 Bluefruit - nRF52832 board that I can program it using Arduino via Adafruit library in Arduino without any problems. 

Now I have an external nRF52832 chip and I have nRF52 DK too. I tried to program the external nRF52832 using the Adafruit library in Arduino but seems like it won't work until I burn the adafruit Bootloader to the external nRF52832 first (excuse me for not figuring this out from the beginning cause I'm a beginner in this field).

So, the question now is how can I burn the adafruit bootloader to my external nRF52832 so that I can program it using Adafruit Arduino library?

Thanks in advance!

Parents
  • Working under assumptions.
    The output hex is getting signed by nrfutil before flashing the chip. If you can find where the hex file is stored before getting signed you can directly flash the external nRF52832 with your application.

    File > preferences. Settings tab > verborse output during. Tick compilation and upload will help you see where files are going on your system.

    Not aware of any support for using J-links with the IDE.

    You can also try using the DK to flash the bootloader from here.

  • I downloaded the bootloader from the github link that you gave to me and I built and ran the project to my chip and it was downloaded successfully as shown in the following figure

    However, when I connect the chip to the USB to program it using Arduino, I get the following error

    So, this Arduino error means that the bootloader is not installed successfully on the chip or it means what?

  • I'm sorry, but I don't understand what you mean?!

    Was referring to the pins SWDIO and SWCLK used to program the chip. Clearly not the case since you get the chip programmed.

    I received this error again!!

    Since you can flash the chip once it tells me that it is the last point in the error log is the cause: "target is not in DFU mode"

    dfu/p0.20, are you pulling this pin low and pulling the resetting low before flashing from Arduino? This will activte the DFU mode.
    hold dfu/p0.20 low > press reset > release dfu/p0.20
    Assuming these pins are connected to buttons.

  • in my schematic design, I have the following:

    1- the DFU/P0.20 is not connected to anything. 

    2-the RESET/P.21 is connected to a switch to the ground as shown 

    I followed what you suggested, hold DFU low, pressed the reset button to the ground and released, then released the DFU and then Uploaded my code using Arduino and it worked successfully

    But why I don't have to hold the DFU and the RESET to Low when I program it the first time?

    Why do I need to do that in the second time and all the times after?

    Thank you!

  • But why I don't have to hold the DFU and the RESET to Low when I program it the first time?

    Cause there is nothing for the DFU to jump too. Think of it like having two separate applications running.

    When the chip is powered or reset. The dfu runs first. It then checks if there is another application to run or if the button presses. If the button is not press and there is a application, jump to application. So the button basically tells the DFU wait I want to flash, don't jump. 

    This method is standard practice. There are ways to get around this using CTS and DTR pins on the usb-to-serial chip.

    Also please verify the answer. 

  • OK, I understood your point. 

    But this doesn't happen when I program the Adafruit nrf52832 feather board. I mean that I can program the Adafruit nrf52832 board over and over again without having to press the DFU or the RESET buttons, unlike my external nRF52832 chip which has to press its DFU and RESET every time!

    BTW I've connected my nRF52832 chip exactly as the Adafruit nRF52832 board, so I was expecting to get the same behaviour, but this is not happening in terms of having to press on the DFU and the RESET in my external chip. 

    Can you please explain to me why this is happening to my chip and not happening to the Adafruit board?

    Can you also please tell me how using the CTS and the DTR can solve the problem?

    This is the pin connection of the RESET and the DTR on my own PCB

  • Can you please explain to me why this is happening to my chip and not happening to the Adafruit board?

    They are doing this.

    There are ways to get around this using CTS and DTR pins on the usb-to-serial chip


    Can see it from your post.

    This is the pin connection of the RESET and the DTR on my own PCB

    This is starting to go off topic as your original questions has been answered and this is not related to the Nordic chip. You'd be better off asking on the adafruit forums or arduino forms and referencing this post. Regarding your last post.

    Your other potion is a tutor. If you are interested in this add me.

Reply Children
No Data
Related