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

NRF52832 boot loader flashing

Hi,

We are going to use NRF52832 for a project, and planning to design our own PCB card and assemble the NRF52832 chips, purchased through Digikey or a similar distributor.

My question is, when we purchase sample chips from a distributor like Digikey,

1. do they come with a standard "bootloader" , or do we have to flash a bootloader?

2. for flashing the boot loader, what are the supported interfaces, software tools?

When it comes to the DFU modes, I am of the view that NRF52832 supports DFU over (a). serial and (b). over the air.

Are there any documentation that shows how to ,

1. setup the bootloader to support over the air DFU

2. setup the bootloader to support over the serial 

3. How to put the device into bootloader mode? (Reset button and a predefined button?)

At the moment, I am evaluating the functionality of the NRF52832 with a SparkFun breakout board, and I am of the view that their board has their own bootloader? Please advise.

If they do, then for me to flash their bootloader, what are the tools required? 

Thanks in advance,

Dinesh.

Parents
  • Hello Dinesh,

    1. The nRFs are not preflashed with a bootloader from the factory. If the SparkFun comes with a bootloader (which it very well may do. I am not sure), then this is a custom bootloader probably based on our bootloader design from the SDK.

    2. Do you mean how to flash the bootloader to the nRF or what DFU protocols we support? (Serial/OTA)? If the question is how to flash it, you need to program the bootloader using a programmer. I am not sure how this is done in large scale, but you should check this with your distributer. They probably have some experience in this field.

    1 and 2: I suggest you look into the DFU getting started guide. It shows how to perform a DFU Over the Air (OTA) using a phone. You can use the same method to perform the OTA using nRF Connect for Desktop and from a computer connected to an nRF using nrfutil (both serial and BLE). Please look at the nrfutil tool documentation. Note that to use nrfutil or nRF Connect for Desktop, it requires an extra nRF device to be used as the BLE client, while using nrfutil for serial DFU, then the target device is connected directly to the computer.

    3. You have several options here. Yes. There is a default way to use reset button + a predefined button. Please study the SDK\examples\dfu\secure_bootloader example, and the function dfu_enter_check() in nrf_bootloader.c, which checks the pin NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN when the bootloader is running. So if you hold this button while you press the reset button it will enter DFU mode. NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN is defined in the bootloader project's sdk_config.h. 

    Another option is something we call the buttonless dfu service, which is a BLE service that you can use to put the device in DFU mode without pressing any physical buttons.

    Best regards,

    Edvin

Reply
  • Hello Dinesh,

    1. The nRFs are not preflashed with a bootloader from the factory. If the SparkFun comes with a bootloader (which it very well may do. I am not sure), then this is a custom bootloader probably based on our bootloader design from the SDK.

    2. Do you mean how to flash the bootloader to the nRF or what DFU protocols we support? (Serial/OTA)? If the question is how to flash it, you need to program the bootloader using a programmer. I am not sure how this is done in large scale, but you should check this with your distributer. They probably have some experience in this field.

    1 and 2: I suggest you look into the DFU getting started guide. It shows how to perform a DFU Over the Air (OTA) using a phone. You can use the same method to perform the OTA using nRF Connect for Desktop and from a computer connected to an nRF using nrfutil (both serial and BLE). Please look at the nrfutil tool documentation. Note that to use nrfutil or nRF Connect for Desktop, it requires an extra nRF device to be used as the BLE client, while using nrfutil for serial DFU, then the target device is connected directly to the computer.

    3. You have several options here. Yes. There is a default way to use reset button + a predefined button. Please study the SDK\examples\dfu\secure_bootloader example, and the function dfu_enter_check() in nrf_bootloader.c, which checks the pin NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN when the bootloader is running. So if you hold this button while you press the reset button it will enter DFU mode. NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN is defined in the bootloader project's sdk_config.h. 

    Another option is something we call the buttonless dfu service, which is a BLE service that you can use to put the device in DFU mode without pressing any physical buttons.

    Best regards,

    Edvin

Children
No Data
Related