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?

Reply
  • 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?

Children
  • No need to compile the bootloader. There is a section on the git that shows how to burn bootloaders.
    Just make sure you are not flashing the chip on the DK. Have a look at this. VTG need to be equal to VDD to tell the DK it is flashing an external chip.

    Don't see a exposed SW interface on your schematic witch will make it impossible to burn a bootloader on a clean chip.


  • Thank you so much, I followed everything that you suggested.

    1- I checked that the VTG is connected directly to the VDD of my external nRF52832 

    2- ran all the commands from the link you gave to me to burn the bootloader and it worked successfully. 

    However, after burning the bootloader to my external nRF52832, I connected my external nRF52832 to the USB port to program it using Arduino, and the code was successfully uploaded and the board was working fine. But, when I tried to upload another Arduino code to the external nRf52832, I received this error again!!

    So, does it mean that every time I need to upload a code to my external nRf52832 chip using Arduino I will then have to burn the bootloader again?!

    Cause I did burn the bootloader again and I managed to upload only one Arduino code, and when I try to upload another code I receive the same error.

  • Don't see a exposed SW interface on your schematic witch will make it impossible to burn a bootloader on a clean chip.

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

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

Related