MPU access error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MPU access error

3,723件の閲覧回数
Ccccc
Contributor I

Hi,

We followed the following steps and found that the phenomenon  did not meet expectations.

1. write 0x11 into 0x2000_0000 address, read 0x2000_0000  ----> 0x2000_0000 =0x11

2. modify RGD0_WORD2 to 0x69a69a (-w-, only write)

3. write 1 into RGD0_WORD3[0] to enable RGD0

4. read 0x2000_0000=0x11, Why can the value still be read even though it has been changed to an unreadable permission?

5. write 0x22 into 0x2000_0000 address

6. read 0x2000_0000, it report can not read memory

Do I need to perform a write operation to take effect after modifying the permissions of the region descriptor?

0 件の賞賛
返信
9 返答(返信)

3,599件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Ccccc

I reproduced your problem, but I can't explain the phenomenon!

I read about MPU related materials, but I never found such a limitation.

I think maybe this may also have something to do with J-LINK.

If you encounter such a problem in your application, then we may need to further verify this problem.

0 件の賞賛
返信

3,587件の閲覧回数
Ccccc
Contributor I

Hi Senlent,

Thanks for your reply.

We just thought it was a bit strange, so we raised a question, which doesn't affect our functionality.

 

0 件の賞賛
返信

3,572件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Ccccc

Thank you,

I will put this question on my list note, if I have time or encounter similar problems, I will repy you again.

0 件の賞賛
返信

3,567件の閲覧回数
Ccccc
Contributor I

Hi Senlent,

Thank you very much.

0 件の賞賛
返信

3,656件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Ccccc

Please try to add a little delay after step 3 and test again,

If the problem still exists, I need you to provide the test code, and I need to reproduce the problem.

0 件の賞賛
返信

3,641件の閲覧回数
Ccccc
Contributor I

Hi Senlent

We use the standard J-Link to send commands, the process is as follows:

step1:

J-Link>w4 20000004 11
Writing 00000011 -> 20000004
J-Link>mem32 20000004 1
20000004 = 00000011

step2:
J-Link>w4 4000d408 69a69a
Writing 0069a69a -> 4000D408
J-Link>mem32 4000d408 1
4000D800 = 0069a69a

step3:

J-Link>w4 4000d40C 1
Writing 00000001 -> 4000D40C
J-Link>mem32 4000d40c 1
4000D800 = 00000001

step4:

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

We try to read multiple times about address 0x2000_0004, This address can always be read out.

step5:

J-Link>w4 20000004 22
Writing 00000022 -> 20000004

step6.:
J-Link>mem32 20000004 1
Could not read memory.

When we perform a write operation, it becomes unreadable. So, after we modify the permissions, do we need to perform the operations corresponding to the modified permissions to make them effective?

0 件の賞賛
返信

3,624件の閲覧回数
Senlent
NXP TechSupport
NXP TechSupport

Hi@Ccccc

below is my test process, I see no problem here.

Senlent_0-1688439216001.png

0 件の賞賛
返信

3,616件の閲覧回数
Ccccc
Contributor I
Your steps has a little different from mine, please follow the following steps to reproduce the problem, thans.
step1:

J-Link>w4 20000004 11
Writing 00000011 -> 20000004
J-Link>mem32 20000004 1
20000004 = 00000011

step2:
J-Link>w4 4000d408 69a69a
Writing 0069a69a -> 4000D408
J-Link>mem32 4000d408 1
4000D800 = 0069a69a

step3:

J-Link>w4 4000d40C 1
Writing 00000001 -> 4000D40C
J-Link>mem32 4000d40c 1
4000D800 = 00000001

step4:

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

J-Link>mem32 20000004 1
20000004 = 00000011

We try to read multiple times about address 0x2000_0004, This address can always be read out.

step5:

J-Link>w4 20000004 22
Writing 00000022 -> 20000004

step6.:
J-Link>mem32 20000004 1
Could not read memory.
0 件の賞賛
返信

3,617件の閲覧回数
Ccccc
Contributor I

Hi Senlent,

Before configuring 0x4000d408 as 0x69a69a, the default permissions are read, write, and execut.

Your steps has a little different from mine.

First, perform the write operation on 0x20000004  (as step1),then perform all the steps in your screenshot again.

Please refer to my previous reply,even if configured as read-only (step2 and step 3), the value of 0x2000-0004 can still be read out (as step4)

 

 

0 件の賞賛
返信