Question
STM32U5 SBSFU external flash questions
Hi,
We are using an STM32U585 with the application running from external flash, on an octospi bus. We are also using external SRAM. The external memory architecture on our board is heavily influenced by the B-U585I-IOT02A design (same ports, slightly different parts used).
We have successfully experimented with the SBSFU solution here and we have a couple of questions:
- Is there a flow diagram anywhere that clearly shows the boot sequence for this example/solution? We understand this is difficult because of all the configuration options, but we are still trying to understand if the application images are authenticated on every boot, or only when being copied to the primary slot by the bootloader and how exactly the MCUBOOT_USE_HASH_REF functionality plays into this.
- We do not need a secure app. Is it possible to remove this and have the bootloader run the non-secure app directly? Any pointers on how to achieve this? This is not a major issue, but it would make the memory map a bit simpler, and presumably would slightly improve boot times.
- Are there any examples of using this SBSFU solution with external flash? From a web search I see there is evidence of examples from X-CUBE-SBSFU that do use external flash (e.g. here, albeit possibly not for the STM32U5 family) but is there anything more up-to-date available? We would like to use OTFDEC for the image(s) in external flash but is this likely to cause problems?
- If not, can you give any pointers about how to go about this? Where do we need to focus and what do we need to be concerned about? We currently have a simple (non secure) bootloader in place to boot from external flash, so should we set this as a second stage bootloader (after the secure bootloader from SBSFU)?
- We don't yet fully understand the MPU and memory protection (WRP) options on this part. Can they be used with external flash and RAM. Anything we need to consider here?
- We have a lot of external flash available (to spare), so plenty of room for a primary slot, and two secondary slots per image (for firmware updates). Are we correct in thinking that mcuboot only supports two slots per image and overwrite or swap (using the intermediate swap flash partition) are the only possibilities?
- Also not a big deal, but as we want a fallback option (if the new image fails to successfully boot/connect to the cloud) using an overwrite scheme for update, with two backup/update slots, seems like it would improve performance (during the update process).
Thanks,
RJH
