Reading Registers in User Mode

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Reading Registers in User Mode

1,491 次查看
simple_xie
Contributor I

Hi All:

   I am using MPC5744P and I want to read some registers in user mode,such as XBAR、APIS and CAN. But I found that the manual description can only be read and written in supervisor mode.

   I also used REG_PROT .I found that once I use this, the program goes into machine check.

   I really hope that you can help me solve this problem.Thanks!!!

标记 (2)
0 项奖励
回复
2 回复数

1,417 次查看
petervlna
NXP TechSupport
NXP TechSupport

hi,

Well, there is a good reason for such registers to be accessible only in supervisor mode.

Surely you don't want user task to cause system critical errors.

Register protection has no influence on read:

The Register Protection (REG_PROT) module offers a mechanism to protect defined memory-mapped address locations in a module under protection from being written.

 I also used REG_PROT .I found that once I use this, the program goes into machine check.

What do the program do to protected registers?

regards,

Peter

0 项奖励
回复

1,417 次查看
simple_xie
Contributor I

Hi,

   We just use these registers when the program in running mode and we need check the value of them in task.It's really thanks for your suggest,We decide to ignore them,because they truely can not read in user mode~

regards,

Simple

0 项奖励
回复