DA14683: What is the "NVMS_FIRMWARE_PART" used for in a SecureBoot SUOTA system?

System:

Chip DA14683 custom board

SDK = 1.0.14.1081 (last updated in 2018) https://community.renesas.com/wireles-connectivity/f/bluetooth-low-energy/20145/da14683-roadmap-sdk-update-and-part-eol/

Resources:

FLASH adapter tutorial: www.renesas.com/.../flash-adapter-concept-da1468x-soc

Background:

From the document: 

NVMS_FIRMWARE_PART = This entry is used during a non-SUOTA/SUOTA enabled application. When in a non-SUOTA application, this entry contains the current application firmware version, whereas in a SUOTA application, it contains the bootloader that manages the firmware update process.

I'm trying, unsuccessfully and quite frustratingly and expensively, to implement secureboot on an otherwise working firmware application.  One of the major symptom is that FLASH access to my custom partition at the end of FLASH is not working.  While investigating this issue I came across an interesting situation and question. 

Using the TOOLBOX I was looking at the FLASH contents and I saw that the NVMS_FIRMWARE_PART was always unwritten (unwritten flash is 0xFF).  

Looking more into this I came across this section of the flash tutorial that says that the NVMS_FIRMWARE_PART holds the bootloader in the SUOTA enabled application....

..... But with secureboot the bootloader is in OTP.  Working with a system that has the bootloader in OTP (created with the "secure_suota_initial_flash_jtag" script) the NVMS_FIRMWARE_PART is always unwritten 0xFF when I look with toolbox.

Question:

1) If you are using a system that has BOTH Secureboot AND SUOTA (so bootloader is in OTP), is the NVMS_FIRMWARE_PART just unused and wasted?

2) If that is the case, can you reallocate that NVMS_FIRMWARE_PART FLASH memory to other uses so it's not wasted anymore?

  • Hi Nathan,

    Thank you for posting your question online.
    Let me check on this and I will get back to you as soon as possible.

    Kind Regards,
    OV_Renesas

  • Hi Nathan,

    Apologies for the delay.

    1) If you are using a system that has BOTH Secureboot AND SUOTA (so bootloader is in OTP), is the NVMS_FIRMWARE_PART just unused and wasted?

    2) If that is the case, can you reallocate that NVMS_FIRMWARE_PART FLASH memory to other uses so it's not wasted anymore?

    1) Yes, the NVMS_FIRMWARE_PART will be unused.
    2) Deleting the partition will probably be problematic for some scripts. It should be pretty easy just shrinking the partition to the point that it might as well not be there, i.e. to 128 bytes.

    Kind Regards,
    OV_Renesas

  • This is your "Flash Adapter Concept for the Da1468x SoC" document: https://www.renesas.com/tw/en/document/mat/flash-adapter-concept-da1468x-soc?r=1600766

    On page 15 is the following warning:

    "Warning:

    1. The size of a partition entry should be multiple of sector size, 4 kB in our case (this is devicespecific information).

    2. The first declared entry should always be the place where the firmware dwells. The minimum allowable size is 128 kB and it should be 64 kB aligned. Keep in mind that, the DA1468x platforms has a read-only cache controller. That is, cache will not be updated when a cacheable area is re-written"

    Follow up questions:

    Note: Remember we are talking about the OTP bootloader partition table here.  That OTP stands to One-Time-Programmable, so once you write to it you cannot fix any errors and if there are errors that board would be destroyed.

    1) From your document quoted above, Given that the partition entry should be a multiple of the sector size (4kB), AND that the firmware partition minimum allowable size is 128kB and it should be 64kB aligned, The question is: What would be the consequences of using your recommendation and creating a 128byte "NVMS_FIRMWARE_PART" partition?

  • Hi Nathan,

    Thank you for the reply.
    Let me check this with our Team internally and I will get back to you as soon as possible.

    Kind Regards,
    OV_Renesas

  • It would be great if you could maybe let me know if the instructions you provided will break my boards.

    Thanks.

    Here is the question again:

    Follow up questions:

    Note: Remember we are talking about the OTP bootloader partition table here.  That OTP stands to One-Time-Programmable, so once you write to it you cannot fix any errors and if there are errors that board would be destroyed.

    1) From your document quoted above (in the previous post), Given that the partition entry should be a multiple of the sector size (4kB), AND that the firmware partition minimum allowable size is 128kB and it should be 64kB aligned, The question is: What would be the consequences of using your recommendation and creating a 128byte "NVMS_FIRMWARE_PART" partition?

  • Hi Nathan,

    Apologies for the delay.
    We are still working on this issue and I will get back to you as soon as possible.
    There is a delay due to Summer Vacations.

    Kind Regards,
    OV_Renesas

  • Hi Nathan,

    Apologies for the delay.
    If the secondary bootloader in OTP is running in OTP mirrored mode the part will boot successfully regardless of flash contents, as the booter won't setup the caching.
    The secondary bootloader can be tested without burning OTP, running it from RAM is identical to the booter copying it from OTP into RAM.
    We don't see any real hardware limitations for the numbers in the warning. QSPI cache size is set in 64kB increments, but it should probably just be set to the entire flash.

    Best Regards,
    OV_Renesas