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

Does nrf52820 support USB DFU?

Excuse me:

                   1、 I can't find the USB DFU example of the nrf52820 in the SDK.Does nrf52820 support USB DFU?

                  2、52820 needs to Implement USB OTA ,enumeration as keyboard, mouse and 2.4G wireless communication. Please help to evaluate whether the resources are enough?

Thanks!

Parents Reply
  • Hi,

    The memory usage you see in SES there is misleading, as it includes the reserved flash. You will get a better overview if you click View -> Memory Usage, and expand FLASH:

    Here you see that address 0 - 0x33FFF is reserved (this is where you would have the MBR/SoftDevice, application, etc). The bootloader itself is close to the end, but there are two pages resaved after that for MBR parameters and bootloader settings. You can also see the start address of the bootloader in the linker settings, and for the <SDK17.0.2>\examples\dfu\secure_bootloader\pca10100e_usb project this is 0x34000. The size of this bootloader is 33.2 kB, but as it requires full pages in practice it is 36 kB (0x9000 bytes).

    The SoftDevice sizes can be found from the SoftDevice specification. For S132 7.2.0 the size is 152 kB (0x26000 bytes). And for S112 7.2.0 it is 100.0 kB (0x19000 bytes). Note that you can always find this information in the release notes of the SoftDevice.

Children
  • Excuse me

           1、Is the following diagram the size of the boot loader?

    2、Sorry, I didn't find the size of the SoftDevice  in the specification.

    3、How much ram does the bootloader occupy in this example?Is there only 8 bytes left?

  • Hi,

    helen said:
    1、Is the following diagram the size of the boot loader?

    Yes and not. It is not necessarily the actual size, but it is the reserved flash for the bootloader in this example project.

    helen said:
    2、Sorry, I didn't find the size of the SoftDevice  in the specification.

    Ah, sorry, that was a typo. I meant to say the SoftDevice release notes. These are PDFs that are distributed together with the SoftDevice, also in the SDK. If lookin in the SDK folder you can for example find the relevant fil for S132 under <SDK 17.0.2>\components\softdevice\s132\doc\s132_nrf52_7.2.0_release-notes.pdf:

    helen said:
    3、How much ram does the bootloader occupy in this example?Is there only 8 bytes left?

    No. With the USB bootloader as it does not use a SoftDevice (even if it may be present it is not enabled), 8 bytes are reserved for the MBR, and the rest is used for the bootloader. The RAM usage here is not really relevant as long as it does not use more than is available. The reason is that the bootloader and application never runs at the same time, so the application can re-use the same RAM as is used by the bootloader.

Related