LPCXpresso LPC1769 MPU;privileged SRAM memory but even though giving memory managment fault

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by bhaveshshah2310 on Mon Feb 16 05:19:10 MST 2015
I am creating MPU code in freeRTOS+IO environment for LPC 1769 , here i am creating a restricted task which is accessing UART peripheral. uart peripheral is been opened at the starting of main then some regular and restricted tasks are been created. in one of restricted task where UART is been used i change its allocated memory regions. over here i give all those memory spaces which it is been using . . .

as this task is been using UART peripheral in FreeRTOS+IO framework. i am using APIs like FreeRTOS_open FreeRTOS_write. which further uses structure object of Peripheral_Control_t and further more structure objects

first i define memory space for UART3 peripheral as it is been used to communication so i am defining whole UART3 peripheral address 0x4009C000 to 16 kbyts of memory space, and then i give that task the privileges of whole SRAM form 0x10000000 to 0x10007FFF so it can access any stack data as it require . . .

when i debug this program and run them then i find that it gives a memory management fault, and the Memory Management Fault Address Register with the value of 0x10004000.  with Memory Management Fault Status Register  with set bit at data access violation flag & memory management address register valid
this memory mangement fault comes when i m calling FreeRTOS_write API  to write something on terminal.

as i defining whole SRAM region to portMPU_REGION_READ_WRITE even though it is giving me such fault, can anyone explain me why it is giving me such fault. . . .

i am using LPCXpresso IDE and using MPU code from FreeRTOSV7.6.0 and freeRTOS+IO demo for FreeRTOS.org site.