STM32H750 MPU XiP
Hey together,
I have a question regarding MPU settings for an external QuadSPI Flash. We have a project where the full application code is placed onto the 4MB Quad SPI Flash memory W25Q32JVSIM. We have set up the QuadSPI in MemoryMapped moded and placed the application into the location 0x90000000. So far everything is fine and works as expected. Now we want to setup the MPU correct for this section. The only thing I found was in the document AN4760 on page 46. There is the follwoing indicated:
So I set up the region as follows:
MPU_InitStruct.Enable = MPU_REGION_ENABLE;
MPU_InitStruct.Number = MPU_REGION_NUMBER3;
MPU_InitStruct.BaseAddress = 0x90000000;
MPU_InitStruct.Size = MPU_REGION_SIZE_4MB;
MPU_InitStruct.TypeExtField = MPU_TEX_LEVEL0;
MPU_InitStruct.AccessPermission = MPU_REGION_FULL_ACCESS;
MPU_InitStruct.DisableExec = MPU_INSTRUCTION_ACCESS_ENABLE;
MPU_InitStruct.IsShareable = MPU_ACCESS_SHAREABLE;
MPU_InitStruct.IsCacheable = MPU_ACCESS_NOT_CACHEABLE;
MPU_InitStruct.IsBufferable = MPU_ACCESS_NOT_BUFFERABLE;
HAL_MPU_ConfigRegion(&MPU_InitStruct);
/* Enables the MPU */
HAL_MPU_Enable(MPU_PRIVILEGED_DEFAULT);Is this the correct setting for code execution from an external quad-spi memory?
By the way: There is another region defined which prevents the access to the rest of the unsed area.
Many thanks in advance,
Eric
