zephyr: drivers/flash/flash_stm32l5_u5.c : unable to use full 2MB flash with TF-M activated

Describe the bug With the current driver, it is not possible to access more than 1MB of the 2MB of stm32u58x MCU when TF-M is activated

To Reproduce Change storage_partition in dts file (b_u585 board for example) to use offset after 1MB Build settings sample west build -b b_u585i_iot02a samples/subsys/settings -p

Expected behavior It is possible to write at this offset of flash

Additional context correction seems to be to add a second bank for stm32u58x boards in drivers/flash/flash_stm32l5_u5.c:l384

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (10 by maintainers)

Commits related to this issue

Most upvoted comments

As mentionned in the PR, this should first be fixed upstream in TF-M, then we can cherry pick that into the Zephyr fork, unless I’m missing something and this is entirely Zephyr-specific and there is a compelling reason not to fix it upstream first?

Sure, I’ve pushed this PR to allow testing. I actually expects @jamike to provide a more complete fix. I’ll keep you posted.