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

serial DFU

I want to use the serial DFU. Do you have any examples? I tried with ble_app_buttonless_dfu, not UART DFU.If you have a detailed reference, please let me know.thank you very munch.

  • Hello,

    Have you tried the SDK15.0.0\examples\dfu\secure_bootloader\pca10040_uart?

    Or do you not want to use UART? I am not quite sure I understand what you mean.

    Best regards,

    Edvin

  • Hi Edvin,thank you help.

    yes I tried the SDK15.0.0\examples\dfu\secure_bootloader\pca10040_uart.But I don't know how to configure application.

  • Oh, ok. I see.

    The secure_bootloader is not the application itself. It is only the bootloader used to update the application. If you want an application to run on top, you can program the application (of your choice) through the bootloader using e.g. the nrfutil tool. 

    You can see what commands to use with the nrfutil tool here.

    Remember that if you program an application that doesn't support entering the bootloader again, you can't use the bootloader anymore.

    I suggest that you try to use the buttonless_dfu application, found in SDK15\examples\ble_peripheral\ble_app_buttonless_dfu.

    Note that you need to connect to it via BLE to activate the DFU mode in this example, but you can see there how it enters bootloader mode.

    A tip is to see in the file ble_dfu.c, line 280, in the function ble_dfu_buttonless_bootloader_start_finalize()

    You can see that it writes BOOTLOADER_DFU_START (=0xB1) to the NRF_POWER->GPREGRET register before it shuts down and enters the bootloader to be ready to receive a new application. It shouldn't matter what bootloader you use in the application, as long as you use the correct transport layer (in your case serial) when you have entered the bootloader.

    But I suggest that you only program the bootloader, and test out how you can use nrfutil to upload an application to get started, and then you can figure out how to get back to the bootloader through the application once you have this up and running.

    Best regards,

    Edvin

Related