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

How to use the DFU library without increasing the flash size

I am usin the nrf52840 with USB DFU on the nrf52840 dongle. I want to use the DFU since I may be needing the reset button or will not be configuring it. If I don't configure the bsp.c for the reset button will the nrf52840 still go into bootloader when I press the reset button(can me modifying something in the application cause the nrf52840 to not go into bootloader)?

When I tried to compile the bootloader application(dfu\open_bootloader\pca10059_usb_debug\ses) for the nrf52840 pca10059 it looks like the flash used became very large. Why is this? I am using the 15.3 SDK. I did not make any changes.

If I want to integrate DFU USB into blinky what changes do I have to make in SES?

Parents
  • Hi,

    If I don't configure the bsp.c for the reset button will the nrf52840 still go into bootloader when I press the reset button(can me modifying something in the application cause the nrf52840 to not go into bootloader)?

    You don't need to configure anything in the bsp.c for the reset button. The reset button is configured in SystemInit when the CONFIG_GPIO_AS_PINRESET preprocessor symbol is defined. This is done in the bootloader that is alrady on the dongle.

    When I tried to compile the bootloader application(dfu\open_bootloader\pca10059_usb_debug\ses) for the nrf52840 pca10059 it looks like the flash used became very large. Why is this?

    It's just a bug with SES. The bootloader start and end address is close to the end of the flash, but SES thinks it starts at 0x0, so the displayed flash usage becomes incorrectly large.

    If I want to integrate DFU USB into blinky what changes do I have to make in SES?

    The DFU USB bootloader is already flashed on the dongle. So if you plan to use the reset button to enter DFU mode, you don't need to make any changes.

    You might find the nRF52840 Dongle Programming Tutorial useful.

Reply
  • Hi,

    If I don't configure the bsp.c for the reset button will the nrf52840 still go into bootloader when I press the reset button(can me modifying something in the application cause the nrf52840 to not go into bootloader)?

    You don't need to configure anything in the bsp.c for the reset button. The reset button is configured in SystemInit when the CONFIG_GPIO_AS_PINRESET preprocessor symbol is defined. This is done in the bootloader that is alrady on the dongle.

    When I tried to compile the bootloader application(dfu\open_bootloader\pca10059_usb_debug\ses) for the nrf52840 pca10059 it looks like the flash used became very large. Why is this?

    It's just a bug with SES. The bootloader start and end address is close to the end of the flash, but SES thinks it starts at 0x0, so the displayed flash usage becomes incorrectly large.

    If I want to integrate DFU USB into blinky what changes do I have to make in SES?

    The DFU USB bootloader is already flashed on the dongle. So if you plan to use the reset button to enter DFU mode, you don't need to make any changes.

    You might find the nRF52840 Dongle Programming Tutorial useful.

Children
Related