Hello,
I'm using LPC1788 in my project and I need to execute some code from SDRAM at address 0xA0000000, but there is one issue. The issue is that MPU considers this address a non executable memory space.
What I need is to how to set MPU registers to make the SDRAM as a executable memory space.
I could not understand how to do this by user manual, it is very confusing because the information is not clear enough.
Does anyone knows how to setting it?
Thankyou!
Henrique
Usage:
// memory pool size must be a power of 2 // memory pool address must be a multiple of the size void user_tasks_enable_ddc_access(void) { portBASE_TYPE xRunningPrivileged = portRaisePrivilege() ; // MPU->CTRL = 0 ; // Disable MPU first mpu_region_setup( (uint32_t)&umm_heap, 7, // always reprogramming MPU region 7 e_mpu_region_size_4_mega_byte, 3, // full access 0, // strongly ordered, shareable 0, // subregion disabled 0, // don't allow instruction execution 1) ; // region enabled // MPU->CTRL = 1 ; // Enable MPU portRESET_PRIVILEGE( xRunningPrivileged ) ; }