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

secure_bootloader_ble_s112_pca10040e SDK15.3 Keil

Hello!

In SDK15.3 project "secure_bootloader_ble_s112_pca10040e" for Keil, write flash incorrect and not work.

In SDK15.2 this prodject work fine.

Please correct in the new version.

Best regards.

Parents
  • : I downloaded a fresh version of the nRF5x SDK v15.3.0 and compiled the Secure Bootloader for the pca10040e, i.e.  nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10040e_ble\arm5_no_packs. 

    Flashing the compiled project together with the S112 SoftDevice to a nRF52810 device did not result in any errors on my end. The "Error: Flash Download failed - "Cortex-M4"" error is usually due to the flash not being erased prior to flashing the compiled binary. Could you try erasing your nRF52810 device using nrfjprog, i.e. nrfjprog -e?

    Best regards
    Bjørn

  • Hello!

    Yes, I did that.

    All other projects, which I tried to open, start debug fine, except for this.

    I unpacked the project from SDK15.2 and SDK15.3 several times and rechecked that the project from 15.3 was not write all the times.

    All other examples do not require any additional memory cleaning so that they work normally. Therefore, I think that this is something else.

  • I think I managed to reproduce it and that I know the cause. 

    In SDK v15.3.0 we have started storing the bootloader start address on the MBR params page in addition to the UICR register. This means that the compiled bootloader binary will write to the MBR section (starting at 0x00000000). This page already contains some data and unfortunately, the flash algorithm used by Keil requires the entire page to be erase prior to writing to it. 

    So when using Keil you will have to merge the bootloader hex with the S112 SoftDevice hex and then flash the merged hex file. If you're using Segger Embedded Studio, then this is not an issue as it does not require the page to be erased. 

    Best regards

    Bjørn

Reply
  • I think I managed to reproduce it and that I know the cause. 

    In SDK v15.3.0 we have started storing the bootloader start address on the MBR params page in addition to the UICR register. This means that the compiled bootloader binary will write to the MBR section (starting at 0x00000000). This page already contains some data and unfortunately, the flash algorithm used by Keil requires the entire page to be erase prior to writing to it. 

    So when using Keil you will have to merge the bootloader hex with the S112 SoftDevice hex and then flash the merged hex file. If you're using Segger Embedded Studio, then this is not an issue as it does not require the page to be erased. 

    Best regards

    Bjørn

Children
Related