While Non-Secure Flash range is set in SAU, there is no MPC initialisation for NonSecure QSPI address range.
I am not sure whether it is required but the existing code does not work and even secure execution (before jumping to NS) cannot read the NS address range so tfm_spm_hal_get_ns_entry_point(); function return 0 so secure execution cannot jump to NS.
If we initialise the QSPI_MPC in the mpc_init_cfg() function as below, Secure execution can read the NS range and can get to be jumped address.
Driver_QSPI_MPC.Initialize(); Driver_QSPI_MPC.ConfigRegion(memory_regions.non_secure_partition_base, memory_regions.non_secure_partition_limit, ARM_MPC_ATTR_NONSECURE); Driver_QSPI_MPC.LockDown();
Existing code somehow enables the QSPI MPC interrupt while no one initialises it.
Are we missing something?