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

dfu checking bootloader version/revision?

Hi,

In SD100v8, there is capability of checking the application version, to make sure no downgrade (or any other criteria required). The reference is in Link to SDK

However, I think this safe checking cannot be applied to a bootloader upgrade, as

  1. There is no bootloader version field in the INIT PACKET
  2. The actual library function that is called to check the init packet, dfu_init_prevalidate(uint8_t * p_init_data, uint32_t init_data_len) does not know whether the update is for bootloader/application/sd. So when the function is called

Just wanted to know, is there any simple way of checking the bootloader version before and upgrade when using the current library functions?

Thanks, Mike

Parents
  • Hi Mike,

    While it is true that the bootloader version field is missing, note that the dfu_init_packet_t uses a very generous 32bits for the app_version. You could for example use the first 16bits in app_version for the bootloader version, and the last 16 for the actual application version.

    Unfortunately there is currently no template example for checking the application version.

    Hopefully this answers your question,

    -Øyvind

  • Just a comment, as Øyvind pointed, there is no bootloader version field on the initdata, so no information for the current bootloader to detect which version the new bootloader is coming.

    The reason for that is that we want to do it on the master side and before we send the image. There is a DFU revision characteristic in the DFU service. The DFU master should read this characteristic to detect which version of the bootloader is on the target. The DFU master or the maker of .zip image file should take care of the match between softdevice and bootloader.

    As far as I know there are following revision: 0x0001: DFU Application (the DFU service embedded in application to start the bootloader) 0x0005: Bootloader in SDK v7.x 0x0006: Bootloader in SDK v8.x

    The bootloader in SDK earlier than SDK v7.x doesn't have this revision characteristic.

Reply
  • Just a comment, as Øyvind pointed, there is no bootloader version field on the initdata, so no information for the current bootloader to detect which version the new bootloader is coming.

    The reason for that is that we want to do it on the master side and before we send the image. There is a DFU revision characteristic in the DFU service. The DFU master should read this characteristic to detect which version of the bootloader is on the target. The DFU master or the maker of .zip image file should take care of the match between softdevice and bootloader.

    As far as I know there are following revision: 0x0001: DFU Application (the DFU service embedded in application to start the bootloader) 0x0005: Bootloader in SDK v7.x 0x0006: Bootloader in SDK v8.x

    The bootloader in SDK earlier than SDK v7.x doesn't have this revision characteristic.

Children
No Data
Related