We ran into an issue when trying to use mcuboot on nRF53 with an external QSPI flash.
In hal_nordic/nrfx/drivers/src/nrfx_qspi.c, the function nrfx_qspi_write has the following check:
if (!nrfx_is_in_ram(p_tx_buffer) || !nrfx_is_word_aligned(p_tx_buffer))
But in sdk-zephyr/drivers/flash/nrf_qspi_nor.c, the function qspi_nor_write has this check:
} else if (!nrfx_is_in_ram(src)) {
If qspi_nor_write is called with a non-aligned buffer, nrfx_qspi_write will be called directly, which will fail.
This has happened for us with mcuboot, specifically in the function boot_copy_region in mcuboot/boot/bootutil/src/loader.c
I can't tell where this should best be fixed, and Issues are deactivated on Github, so I'll report it here.
Possibly mcuboot could be modified to have proper alignment.